SpreadSheet exception when saving to Excel 2016

Posted by: Jose.Aguirre on 16 September 2018, 5:53 pm EST

    • Post Options:
    • Link

    Posted 16 September 2018, 5:53 pm EST

    Hello,

    I have a spreadsheet control that I tried to save to excel. When I save to Excel 2013 it works properly but when to Excel 2016 the following inner exception is raised and the file is saved but corrupted and not possible to open:

  • Posted 16 September 2018, 5:53 pm EST

    (continuation)…

    2018/09/11 11:43:32.423|1|Error|Procam.Gdm.Controls.Canvas.UserControls.GdmSpreadSheet.OnGdmSpreadSheetExcelError|Code = General || InnerException = System.InvalidOperationException: No open entry

    at ICSharpCode.SharpZipLib.Zip.ZipOutputStream.CloseEntry()

    at GrapeCity.Excel.OOXml.c.a(g A_0)

    at GrapeCity.Excel.OOXml.c.a(n A_0, Stream A_1)

    at GrapeCity.Excel.OOXml.f.d(Stream A_0) || Message = Failed to save the file.|

    2018/09/11 11:43:32.423|1|Error|Procam.Gdm.Controls.Canvas.UserControls.GdmSpreadSheet.OnGdmSpreadSheetExcelError|Code = General || InnerException = System.InvalidOperationException: No open entry

    at ICSharpCode.SharpZipLib.Zip.ZipOutputStream.CloseEntry()

    at GrapeCity.Excel.OOXml.c.a(g A_0)

    at GrapeCity.Excel.OOXml.c.a(n A_0, Stream A_1)

    at GrapeCity.Excel.OOXml.f.d(Stream A_0) || Message = Failed to save the file.|

    I use the following command:

    spreadSheet.SaveExcel(fileName, ExcelFileFormat.XLSX, ExcelSaveFlags.SaveAsViewed);

    Spread Studio version: 10.40.20171.0

    The Excel 2013 is 15.0.5059.1000 MSO (15.0.5059.1000) 64-bit (english version)

    The Excel 2016 is 16.0.4639.1000 MSO (16.0.4639.1000) 64-bit (english version)

    Please advice. Thanks!

  • Posted 18 September 2018, 1:18 am EST

    I was unable to reproduce the issue you’ve described. The SaveExcel method saves Spread to an excel file that can be opened in any Excel version (97 and above). I have attached a sample application that I tried replicating the issue with. Could you please test it at your end as well.

    If I’ve missed anything, please send across your application or modify the application I’ve sent to reproduce the issue.

    Spread_WPF_ExportExcel.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels