The last thing I checked was not a registered CF function. However, you can use the POI method autoSizeColumn (columnIndex) to automatically size each column. Just note that the POI uses a base zero for sheet and column indices.
<cfscript> // create a workbook and add a long value wb = SpreadSheetNew(); spreadSheetSetCellValue(wb, repeatString("x", 200), 1, 1); // get the first sheet sheet = wb.getWorkBook().getSheetAt( javacast("int", 0) ); // resize first column ie "A" sheet.autoSizeColumn( javacast("int", 0) ); spreadSheetWrite( wb, "c:/test.xls", true ); </cfscript>
Leigh source share