Spreadbuilder XLSX not working

Posted by: philip.persson on 27 November 2019, 10:50 am EST

    • Post Options:
    • Link

    Posted 27 November 2019, 10:50 am EST

    I have a program where i do excel exports to xls but want to upgrade them to xlsx.

    Code is basically:

    var wb = new WorkBook();
    wb.Sheets.AddNew()
    wb.Sheets[0].cell(0,x) = ...
    
    

    Wich has worked fine for many years. Now I however added the line (just after creating the workbook)

    wb.FileFormat = FileFormat.xlsx
    

    I have many different reports and content does not seem to have any effect, even reports with just a single row of some strings never completes anymore.

    And now the wb.Save() (to a memorystream) never finishes.

    Before it took a few seconds to generate and now it never finishes.

    The wierd part is it works perfectly on my dev machine but in production above happens. What could cause this to happen?

    I am using AR10 if that matters

  • Posted 28 November 2019, 2:19 am EST

    Hello,

    Please make sure that you have the following dll in your deployed application:

    DocumentFormat.OpenXml.dll

    Thanks,

    Mohit

  • Posted 28 November 2019, 4:31 am EST

    I do, and it is only xlsx format that is not working, I can add that I do not get any exceptions the export just never completes. The method it gets stuck on is:

    workbook.Save(ms);

  • Posted 28 November 2019, 4:40 am EST

    Hello,

    Actually, AR uses Open XML SDK in order to support Excel2007. So, "DocumentFormat.OpenXml should be present in your production environment.

    Could you please share the version of “DocumentFormat.OpenXml.dll” that you are using in your project. Also, please check that version of “DocumentFormat.OpenXml.dll” in the GAC folder of the production machine.

    Thanks,

    Mohit

Need extra support?

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

Learn More

Forum Channels