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>
{{/each}}
</tr >
-
Handlebars provide
1
attribute with current index in theeach
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 }