Xlsx export

Posted by: nairolfo on 14 September 2017, 9:40 am EST

    • Post Options:
    • Link

    Posted 14 September 2017, 9:40 am EST

    [activereports_archive]hi everyone,

    is there a property to set in orderto export as an xlsx format,

    i get an error when opening the excel file after export.

    regards

    florian[/activereports_archive]

  • Posted 14 September 2017, 9:40 am EST

    [activereports_archive]Hello,

    Could you please let us know the if you are exporting a SectionReport or a PageReport (FPl/CPL) to xlsx format?

    Also, please mention the exact version of the control used by you.

    It would also be really helpful if you could share with us the report file (along with the datasource) as it would help us in narrowing down the issue at our end.

    Regards,

    Mohita[/activereports_archive]

  • Posted 14 September 2017, 9:40 am EST

    [activereports_archive]Merci Mohita,

    I wasn’t specifying the file format of the export that was my problem

    i wrote added

    using Export = grapecity.activereports.export

    if (xlsStrExt == “.xlsx”) {

    xlse.FileFormat = Export.Excel.Section.FileFormat.Xlsx;}

    else{xlse.FileFormat = Export.Excel.Section.FileFormat.Xls97Plus;}

    best regards

    florian[/activereports_archive]

  • Posted 14 September 2017, 9:40 am EST

    [activereports_archive]Hello Florian,

    It seems your issue has been resolved, hence considering this forum as closed.

    Let us know if you have any further issues and we would try our best to assist you.

    Regards,

    Mohita[/activereports_archive]

  • Posted 9 May 2020, 1:13 am EST

    Hi,

    i’m using section report.

    my code is

    GrapeCity.ActiveReports.Export.Excel.Section.XlsExport XlsExport1 = new GrapeCity.ActiveReports.Export.Excel.Section.XlsExport();

    // Set a file format of the exported excel file to Xlsx to support Microsoft Excel 2007 and newer versions.

    XlsExport1.FileFormat = GrapeCity.ActiveReports.Export.Excel.Section.FileFormat.Xlsx;

    XlsExport1.Export(rpt.Document,“C://Files.xlsx”);

    Error Message:

    error-System.TypeInitializationException: The type initializer for ‘#tLD.#GOw’ threw an exception. —> System.IO.FileLoadException: Could not load file or assembly ‘DocumentFormat.OpenXml, Version=2.0.5022.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    at #tLD.#GOw…cctor()

    — End of inner exception stack trace —

    at GrapeCity.SpreadBuilder.Workbook.#POw()

    at GrapeCity.SpreadBuilder.Workbook.Save(String filePath)

    at GrapeCity.ActiveReports.Export.Excel.Section.XlsExport.Export(SectionDocument document, String filePath, String pageRange)

    at GrapeCity.ActiveReports.Export.Excel.Section.XlsExport.Export(SectionDocument document, String filePath)

  • Posted 10 May 2020, 4:03 pm EST

    Hello,

    Could you please try after adding the “DocumentFormat.OpenXml” from the following location:

    C:\Program Files (x86)\Common Files\GrapeCity\ActiveReports {version number}

    Thanks,

    Mohit

  • Posted 10 May 2020, 5:24 pm EST

    Hi Mohit, Thanks for your response.

    In Server can’t find “C:\Program Files (x86)\Common Files\GrapeCity\ActiveReports” this location. But in my local machine able to found.

    Please advice.

    Thanks

    Elango R

  • Posted 11 May 2020, 10:05 pm EST

    Hello,

    Can you add the dll from the local machine into your application and deployed the application on the server 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