Awesome, that worked. I have one last portion that...
# cfml-general
m
Awesome, that worked. I have one last portion that is not working
<cfset cellStyleCurrencyBottomBorder = wb.createCellStyle()/>
<cfset cellStyleCurrencyBottomBorder.setDataFormat(createObject("java","org.apache.poi.hssf.usermodel.HSSFDataFormat").getBuiltinFormat("($##,####0.00_);[Red]($##,####0.00)"))/>
<cfset cellStyleCurrencyBottomBorder.setBorderBottom(cellStyleCurrencyBottomBorder.BORDER_THIN)/>
But, I wanted to ask how to read this so I can figure it out in the future: I know I am looking in the usermodel class am I looking for the function getbuiltinformat? Just trying to see if I can understand what's going on here. Thanks
c
The dataFormat line looks ok to me, although it's best to use the generic ss.usermodel package instead of the HSSF- or XSSF-specific ones where possible (i.e.
<http://org.apache.poi.ss|org.apache.poi.ss>.usermodel.BuiltinFormats
instead of
org.apache.poi.hssf.usermodel.HSSFDataFormat
. Your borderBottom call won't work in 2021 though for the same reason as before: it's using a cellStyle field value.