This project is read-only.

ICellStyle

Mar 8 at 9:52 PM
Edited Mar 8 at 9:54 PM
I have the same code to generate XLS and XLSX and I use SS.UserModel interfaces.
    If Excel2007 Then
        oWorkBook = New NPOI.XSSF.UserModel.XSSFWorkbook()
    Else
        oWorkBook = New NPOI.HSSF.UserModel.HSSFWorkbook()
    End If
When I create ICellStyles with oWorkBook.CreateCellStyle(), if I change i.e FillForegroundColor property of iCellStyle A, also other iCellStyles change the same property...
    Dim csNormal As ICellStyle, csCOL As ICellStyle
    csNormal = oWorkBook.CreateCellStyle()
    csNormal.WrapText = False
    csNormal.SetFont(fNormal)

    csCOL = oWorkBook.CreateCellStyle()
    csCOL.CloneStyleFrom(csNormal)
    csCOL.FillForegroundColor = IndexedColors.Grey25Percent.Index
WHY (csNormal..FillForegroundColor == IndexedColors.Grey25Percent.Index) ALSO?


Thank you for your help.
Apr 24 at 10:20 PM
Armando, I'm not sure what you are asking about the last line in your code. Can you explain a little more?