How to set background & text color of row by range using NPOI

  • Thread starter Thread starter Sudip_inn
  • Start date Start date
S

Sudip_inn

Guest
I am first time working with NPOI library. so very keen to know how could i apply back & text color of rows by mention range.

After searching google i found people are setting style for cell not rows. here is a small snippet.


CellStyle style1 = hssfworkbook.CreateCellStyle();
style1.FillForegroundColor = NPOI.HSSF.Util.HSSFColor.BLUE.index;
style1.FillPattern = FillPatternType.BIG_SPOTS;
style1.FillBackgroundColor = NPOI.HSSF.Util.HSSFColor.PINK.index;
sheet1.CreateRow(0).CreateCell(0).CellStyle = style1;
basically i want to how could i give back and text color of rows by range say A1:D5.

if it is possible then please help me with code sample. thanks

Continue reading...
 
Back
Top