apache poi cell- getCellstyle和cellstyle- setCellstyle提供不同的背景颜色
我正在尝试复制单元格样式(背景颜色、格式等)并将其设置为另一个单元格。
使用这种方法:
CellStyle style = originalCell.getCellStyle();
newCell.setCellStyle(style);
CellStyle cellstyle = workbook.createCellStyle();
cellstyle.cloneStyleFrom(originalCell.getCellStyle())
但不知何故,新的单元格样式具有与原始单元格样式不同的背景颜色。
有什么建议吗?
I'm trying to copy a cell style (background color, format, etc) and set that to another cell.
Using this methods:
CellStyle style = originalCell.getCellStyle();
newCell.setCellStyle(style);
CellStyle cellstyle = workbook.createCellStyle();
cellstyle.cloneStyleFrom(originalCell.getCellStyle())
But somehow the new cell style has different background color then the original one.
This is how my cell backgrounds looks like
Any suggestion why is that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论