JSreport for converting JSON to XLSX format



  • Hi Team

    We are trying to map an output Json to xlsx using xlsx recipe. Our previous developer had provided a mapping as below but unable to determine the correct row and column values. Could you please help us on how this template is coded?

    {{!--Name & Details--}}
    {{#xlsxReplace "xl/worksheets/sheet1.xml" "worksheet.sheetData[0].row[2].c[1]"}}
        <c t="inlineStr"><is><t>{{data.page2FullName}}</t></is></c>
    {{/xlsxReplace}}
    {{#xlsxReplace "xl/worksheets/sheet1.xml" "worksheet.sheetData[0].row[3].c[1]"}}
        <c t="inlineStr"><is><t>{{data.page2PanelEmail}}</t></is></c>
    {{/xlsxReplace}}
    

    0_1680086282279_Screenshot 2023-03-29 at 4.04.54 PM.png



  • I'm not sure I get the question...

    The following worksheet.sheetData[0].row[2].c[1] should represent the 3th row and 2nd column inside the xslx.
    This doesn't necessarily mean its cell C2, because the previous cells can be empty and in this case excel doesn't add them to the row collection. You can unzip the excel template, find file sheet1.xml and find whats inside the sheetData.row nodes. Or just try to run the template in jsreport, replace cell and see where it gets actually replaced.


Log in to reply
 

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