作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
Workbook workbook = new HSSFWorkbook();
Sheet worksheet = workbook.createSheet("test sheet");
Row row1 = worksheet.createRow(0);
Cell cell0 = row1.createCell(0);
CellStyle testStyle = workbook.createCellStyle();
testStyle.setFillBackgroundColor(IndexedColors.RED.getIndex());
cell0.setCellStyle(testStyle);
我正在尝试将单元格的背景颜色更改为红色。但实际上单元格的背景颜色并没有改变。还是白色的
最佳答案
你错过了这一行:
testStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
这将告诉 apache-poi 颜色的可见度。
关于java - Apache 兴趣点。 style.setBackgroundColor 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48460047/
我正在尝试检索用户兴趣列表。所以我正在调用 graph api 来检索书籍、音乐等内容。似乎“喜欢”下的所有内容也包括书籍、音乐等下列出的所有内容。他们有任何异常(exception)吗,或者我可以调
这是一道代码组织题。我有将渐变背景放在 View 上的代码。我想在多个 View 上使用相同的代码 - 因此,我想将代码放在一个函数中,并在配置相关 View 时调用它。 我的问题是,放置这样一个函数
我是一名优秀的程序员,十分优秀!