Cannot open Excel file generated from RDL

Posted by: vincent.wendrzyk on 2 November 2017, 10:34 am EST

    • Post Options:
    • Link

    Posted 2 November 2017, 10:34 am EST

    Hello, I’m generating an excel file using MS Reporting Services local processing. After upgrading our RDL from 2005 to the latest, the spread control will no longer open the generated spreadsheet. I get the CannotOpen warning with a “Failed on File Open - OpenXmlOperator.Load” description.

    The files open fine with Excel and other utility software. I upgraded to the latest spread version and still see the problem.

    I attached an example project with one of the generated excel files. Is there some way to determine what is causing the issue? Thanks!

    ExcelFileFromRdl.zip

  • Posted 3 November 2017, 3:02 am EST

    Hello,

    We are able to replicate the issue and hence we are escalating the same to the concerned team for the fix.

    Tracking id for your issue is #248982.

    We will update you as soon as we hear anything from our concerned team.

    Thanks,

    Reeva

  • Posted 3 November 2017, 6:46 am EST

    Hello,

    It is bug of Spread.

    Reason:- In our open Excel logic, it requires information of <sheetFormatPr …/> in xml file. Excel files that saved from RDL doesn’t have this information so exception is occurred.

    Workaround:- Open saved file by excel then save again and open by Spread to insert this information for xml file or use an app can modify xml file then add following information into Sheet1.xml file:













    Hope it helps.

    Thanks,

    Reeva

  • Posted 3 November 2017, 4:27 pm EST

    Thanks, Reeva. I have an app where I can add attributes. I added the sheetFormatPr tag as you suggested and I still get the error.









    I’ve attached the latest excel file.

  • Posted 3 November 2017, 4:28 pm EST

    Oops forgot the attachment. Attached now.

  • Posted 3 November 2017, 4:29 pm EST

  • Posted 7 November 2017, 7:36 am EST

    Hello,

    We have reopened your issue with our concerned team for some investigation and we will get back to you as soon as we hear anything from them.

    Thanks,

    Reeva

  • Posted 10 November 2017, 12:39 am EST

    Hello,

    1. We have checked your comment in below link :

      https://www.grapecity.com/en/forums/spread-winforms/cannot-open-excel-file-gen

    As my check, tool that you used to change xml is not really good, it add some redundant information for xml file and Spread does not support.

    For example, in latest excel file that he send to us, there is information about is added but this structure is not correct with format of open xml so Spread doesn’t support. More information can refer to below link:-

    https://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.extension(v=office.14).aspx

    1. Below is my steps to change xml file:-
    • Use winrar or other unzip tool to open xlsx file
    • Use Notepad++ with xml plugin to modify xml file
    • Save xml file and apply save change xlsx file by unzip tool

    ** We had another comment about when import this file that maybe you will confuse after change and import successfully. Spread doesn’t support read information like below so some information is lost:





    Div



    Spread only support standard structure that save from excel application, so some information that saved from other product will be lost after import.

    *** I attached excel file that I changed manually and change by Excel app into this case.

    Please help me to check it.

    Thanks,

    ReevaExcelFileFromRdl(1).zip

  • Posted 10 November 2017, 9:18 am EST

    That’s what I needed, perfect! I was able to determine the utility was only writing out the extLst tag when requesting excel version 2010 or higher. I updated to write out 2007 and it fixed the problem and I can open up the spreadsheet now. Thanks!

  • Posted 13 November 2017, 12:02 am EST

    Hello,

    We are glad to know that your issue has been resolved.

    Thanks,

    Reeva

Need extra support?

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

Learn More

Forum Channels