Unable to write data on predefined formatted template

  • While populating data on predefined formatted sheet ,i m getting sheet repair error on opening.Also the formulas also not working 1_1523450019143_Capture1.PNG 0_1523450019142_Capture.PNG

  • administrators

    hi! that means that your template is producing invalid Office Open XML format somewhere, the best for you will be to try to remove some parts of your template and test again until it does broke, then when you found the problematic part, analyze why it could be breaking, one reason can be that you are using attributes r="9", r="C9", maybe somewhere that references are invalid.

  • I tried the same in playground it worked but not in my local when i put preview to false .. why the formulas/macro data is showing in excel online and not when downloaded directly ?
    @bjrmatos any idea on this.

  • Maybe silly comment, but aren't the macros blocked by default when excel is downloaded from the web?

  • administrators

    hi @Yugam-Gogia we had the chance to look at your problem (testing with the same demo that you gave me by email), here are some things that we found.

    • there is a temporary bug in playground which makes the Download request to produce an invalid excel file, we are now looking into fixing this

    • when trying your example on my local machine i can see that formulas are not showing values, like you said, then i looked a little on internet about similar problems and found this, the link suggests to update all the formulas with a key shortcut ctrl + alt + f9, after doing that my values were updating and shows the same that you have in excel online, but we still don't know what to define in the xml to make this re-calculation automatically, maybe you will need to modify the base xlsx template file in Office, change some formula configuration options to have the formulas always auto-update

    we have this so far, please let us know if you find some workaround or if you were able to solve the re-calculation problem.

  • Yes it worked after i put the below code to recalculate the formula in my content.handlebars which do the same thing like ctrl +alt +f9
    {{#xlsxMerge "xl/workbook.xml" "workbook.calcPr[0]"}}
    <calcPr fullCalcOnLoad="1"/>

    Thanks @bjrmatos @jan_blaha for the support.

  • administrators

    that is great! thanks for sharing the change

Log in to reply

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