Hi,
I have a question about the HSSFStyle object:
I need to change the style for a few cells in my spreadsheet - setting a thick
border and so on. However, when I try that the style gets applied to the whole
spreadsheet!! Even if I set the style for just for one cell, it seems to apply
it to all cells.
Here is the code snippet that does that:
int col = 10;
for (int i = startRow; i <= endRow; i++)
{ HSSFCell cell = sheet.getRow(i).getCell(col,
HSSFRow.CREATE_NULL_AS_BLANK); HSSFCellStyle style = cell.getCellStyle();
style.setBorderRight(HSSFCellStyle.BORDER_THICK);
style.getRightBorderColor(); cell.setCellStyle(style); }
What am I doing wrong? Is there a workaround?
Thanks,
Ravi.
_________________________________________________________________
Want to do more with Windows Live? Learn “10 hidden secrets” from Jamie.
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008