Quantcast
Channel: NPOI
Viewing all articles
Browse latest Browse all 1621

New Post: ICellStyle

$
0
0
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.

Viewing all articles
Browse latest Browse all 1621

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>