OpenXML SDK having borders for cell

后端 未结 2 743
再見小時候
再見小時候 2020-11-29 10:40

I have the following code that adds a cell with values and data-type for that cell in OpenXML SDK:

Cell cell = InsertCellInWorksheet(column, row, workshee         


        
2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-29 10:53

    The SpreadsheetDocument is structured as collection of WorkbookParts. One of these, the WorkbookStylesPart, contains all the styles used in the document. The WorkbookPart contains your Worksheets. In order to apply a style to a cell or range of cells, you need to set the StyleIndex property to the corresponding style in the WorkbookStylesPart.

    This answer should help get you started: https://stackoverflow.com/a/11118442/741326

提交回复
热议问题