I am using freemarker 2.3.28
and trying to assign a value to a variable but I get the error in the title
<#list 0..row.getLastCellNum()-1 as cell>
<#assign cellValue = cell.getStringCellValue()>
<#assign cellAddress = cell.getAddress().toString()>
<#if someCondition>
<td style='background-color:orange'>${cellValue}</td>
<#else>
<td>${cellValue}</td>
</#if>
</#list>
The error occurs at the second and third lines. The variable row
is a XSSFRow
object which is passed in inside a List
that I am iterating through with an outer list (<#list rows as row>)
which is not shown here.
Why is this happening and how can I resolve this?
Thank you.