Last active
November 25, 2018 11:45
-
-
Save DDzia/e29737170b6dd0f071c90b12f66c293d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach (Row currentRow in rows) | |
{ | |
//write the row start element with the attributes added above | |
_writer.WriteStartElement(currentRow); | |
foreach (OpenXmlElement currentCell in currentRow.ChildElements) | |
{ | |
var cell = (Cell)currentCell; | |
//write the start of the cell element with the type and cell reference attributes | |
_writer.WriteStartElement(cell); | |
//write the cell value | |
_writer.WriteElement(cell.CellValue); | |
//write the cell end element | |
_writer.WriteEndElement(); | |
} | |
//write the row end element | |
_writer.WriteEndElement(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment