tracker issue : CF-4207394

select a category, or use search below
(searches all categories and all time range)

spreadsheetFormat* font-related style properties will not accept boolean literals

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/Duplicate

Reporter/Name(from Bugbase): David R. / ()

Created: 03/03/2020

Components: Document Management, Spreadsheet

Versions: 2018

Failure Type: Incorrect w/Workaround

Found In Build/Fixed In Build: CF2018 Update 7 /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Windows 10 64 bit

Vote Count: 0

Problem Description:
spreadsheetFormatCellRange will not accept boolean literals for the property "underline"

Steps to Reproduce:
use spreadsheetNew to make a spreadsheet
call spreadsheetFormatCellRange on the new spreadsheet
set the format struct argument to {color: "blue", underline:true}

Actual Result:
exception thrown: java.lang.ClassCastException: class coldfusion.runtime.CFBoolean cannot be cast to class java.lang.String at coldfusion.excel.Excel.findFont

Expected Result:
no exception thrown, function formats the desired cell range appropriately

Any Workarounds:
pass the boolean literal as an appropriate string literal, as in: "true" or "false"



in the code exhibiting this failure, there are calls to spreadsheetFormatCellRange that use boolean literals without issue, to set style property {textwrap:true}.
Comment by David R.
33237 | March 03, 2020 05:05:15 PM GMT
also note that this is a regression, it worked in cf11
Comment by David R.
33238 | March 03, 2020 05:12:48 PM GMT
closing as duplicate of CF-4206253
Comment by Piyush K.
33251 | March 05, 2020 01:29:16 PM GMT