Error while opening xlsx recipe report after downloading in local



  • Hello everyone,
    I am facing some issues while opening an excel report made using xlsx recipe.

    The report runs just fine when I try running it on the jsreport studio but after downloading the report on my local, it gives the following error. I will attach the screenshot of the error while trying to open the report.
    1_1669017180795_MicrosoftTeams-image (4).png 0_1669017180794_MicrosoftTeams-image (3).png



  • Please replicate the problem in the playground so we can check it out.
    https://playground.jsreport.net/



  • https://playground.jsreport.net/w/anon/fNQjDXCQ
    when you download it you can show this error.



  • I know this is tedious but I can offer you two approaches.

    One approach is to open the corrupted file in excel, let it fix the problem, save it and decompress the output to the xml source files. Now you can compare the fixed and original xml sources and find out whats different/where is the problem.

    The second approach is to isolate the problem. The template has 200 lines of code so you need to cut out parts to find the problem in a small form. This leads me to this:

    {{#xlsxReplace "xl/worksheets/sheet1.xml" "worksheet.sheetData[0].row[0].c[1]"}} 
    <c t="inlineStr" s="13">
        <is>
            <t>{{companyName}} {{data.periodName}} {{$localizedResource.productionTable}}</t>
        </is>
    </c> 
    {{/xlsxReplace}}
    
    {{{xlsxPrint}}}
    

    This still renders corrupted excel, but it's a pretty small code to look into. Trying to remove the applied style 13 makes excel happy. This means you don't have a particular style in the template. You may forgot to link that styles.xml.



  • I could figure out that if I delete all the codes for sheet1 and sheet3, I get no error
    So the error only comes from the sheet1 and sheet3 codes
    But at the same time, I couldn't figure out where is the issue coming exactly from


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.