Use SSIS to populate Excel workbook generated using OOXML

Posted by Maulik on Stack Overflow See other posts from Stack Overflow or by Maulik
Published on 2010-04-12T03:25:16Z Indexed on 2010/04/12 3:33 UTC
Read the original article Hit count: 520

Filed under:
|
|

We are trying to generate MS Excel workbook using OOXML and populate data using SSIS. We are able to generate Workbook and sheets, also able to create columns and insert data in Header cell. We can also populate data using SSIS. But the Sheet (DocumentFormat.OpenXml.Spreadsheet.Sheet) and all cells (DocumentFormat.OpenXml.Spreadsheet.Cell) becomes OpenXmlUnknownElement. So we are not able to read sheet / cell using following Code. Sheet sheet = workbookPart.Workbook.Descendants().Where(s => s.Name == "Sheet1").SingleOrDefault(); We are able to read the same file if we first open it using MS Excel and save.

© Stack Overflow or respective owner

Related posts about ssis

Related posts about ooxml