Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

New Post: Excel 2013 - 2010 compatibility

$
0
0
I know this is old, but just in case it helps someone, I got around this using the following code;
Private Sub FixWorkBook(ByVal ms As MemoryStream)
    Try
        Dim owb As SpreadsheetDocument = SpreadsheetDocument.Open(ms, True)

        For Each element In owb.WorkbookPart.Workbook.ChildElements
            If element.LocalName = "extLst" Then element.Remove()
        Next

        For Each element In owb.WorkbookPart.WorkbookStylesPart.Stylesheet.ChildElements
            If element.LocalName = "extLst" Then element.Remove()
        Next

        owb.Close()

    Catch ex As Exception
        LogError(ex, "FixWorkBook")
    End Try
End Sub

Viewing all articles
Browse latest Browse all 1877

Trending Articles



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