Recipe: xlsx - Charts data not getting refreshed



  • I'm using xlsx recipe with engine handlebars, after generating the report data is not reflecting on charts and excel prompting the below waring message

    0_1701176238924_JsReport Excel Screenshot 2023-11-28 175027.png

    Here is the playground link

    Code block:

    {{xlsxRemove "xl/worksheets/sheet2.xml" "worksheet.sheetData[0].row" 1}}
    
    {{#each scanData}}
    {{#xlsxAdd "xl/worksheets/sheet2.xml" "worksheet.sheetData[0].row"}}
    <row>
        <c t="inlineStr" s="{{@root.$removedItem.c.[0].$.s}}"><is><t>{{email}}</t></is></c>
        <c t="inlineStr" s="{{@root.$removedItem.c.[1].$.s}}"><is><t>{{firstName}}</t></is></c>
        <c t="inlineStr" s="{{@root.$removedItem.c.[2].$.s}}"><is><t>{{lastName}}</t></is></c>
        <c t="inlineStr" s="{{@root.$removedItem.c.[3].$.s}}"><is><t>{{organizationName}}</t></is></c>
        <c s="{{@root.$removedItem.c.[4].$.s}}"><v>{{scans}}</v></c>
    </row>
    {{/xlsxAdd}}
    {{/each}}
    
    {{{xlsxPrint}}}
    
    

    Thanks in advance!



  • I guess you've followed this tutorial.
    https://jsreport.net/learn/dynamic-excel-pivot-table

    But it seems you missed the following.

    =OFFSET(Data!$A$1,0,0,COUNTA(Data!$A:$A),2)

    You have 5 columns in data but you filled 13 as the last param.

    0_1701247213934_upload-bfee34f7-d9b1-469b-b4f3-d0c47263594e

    You haven't changed the pivot table data source the the reference MyData

    0_1701247243146_upload-46e566ed-b01f-47ef-9f93-ffc390da52c8

    You haven't selected "Refresh data when opening the file".

    I've tried to update your pivot but somehow was still getting the error.
    However when deleting the pivot and creating it from scratch seems worked.

    https://playground.jsreport.net/w/anon/SfaPSOtL



  • It's working.

    Thanks @admin !


Log in to reply
 

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