html-to-xlsx reference How to reference the current column in the formula

  • I want to insert the formulas in the cycle. Calculate min/avg/max for each data column.

    <tr >
    {{#each flags}}
    <td data-cell-type="formula" class="cell-project-name-content" >=MAX({How?}:{How?})</td>
    </tr >

  • Handlebars provide 1 attribute with current index in the each iteration.
    You can write a custom helper and use current index to calculate the current cell.

    <td data-cell-type="formula">=A{{currentCell 1}}</td>

    function currentCell(index) {    
        return index + 1

    See a demo

Log in to reply

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