Hello,
What if I programmatically format 500 cells with difference styles?
The target spreadsheet now contains huge number of styles.
Khanh
-----Original Message----
A cellstyle can be "shared" by many cells in a workbook. Currently you are
modifying the "shared" cellstyle, and this affects all cells that use that
style.
Instead, try to create a new style using HSSFWorkbook.createCellStyle(), and
then use cell.setCellStyle(HSSFCellStyle).
In other words, replace:
HSSFCellStyle cellStyle = cell.getCellStyle();
with:
HSSFCellStyle cellStyle = workbook.createCellStyle();
cell.setCellStyle(cellStyle);
- Rob