我正在使用Apache POI将数据导出到Excel工作表中。它工作正常。问题是我需要在生成Excel工作表时为Excel工作表中的几行应用黄色背景色。请帮助我在生成时如何为Excel工作表的行应用背景色。
谢谢,雷迪
直接来自官方指南:
// Aqua background
CellStyle style = wb.createCellStyle();
style.setFillBackgroundColor(IndexedColors.AQUA.getIndex());
style.setFillPattern(CellStyle.BIG_SPOTS);
row.setRowStyle(style);
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句