ColdFusion 2021 电子表格格式单元格颜色

Kev*_*her 5 coldfusion cfml

最近从CF11升级到CF2021。我有一个电子表格,我们用颜色来格式化单元格、行和列,特别是背景颜色。我指定了 color= 或 fgcolor=。无论我选择什么颜色,它都会是黑色的。我搜索并搜索了 2021 年,但一无所获。

有人有解决方案吗?

非常简化的代码。它适用于 CF11 和 CF2016。

<cfscript>
    sObj = SpreadsheetNew("Testing Summary","yes");
    SpreadsheetSetCellValue(sObj,"As of: " & DateFormat(#DateAdd("h", -1, Now())#),1,1); 
    SpreadsheetFormatCell(sObj, {bold="true", fontsize="14"}, 1,1);
    SpreadsheetMergeCells(sObj,1,1,1,5);
    SpreadsheetSetCellValue(sObj,"Testing Summary",2,1); 
    SpreadsheetMergeCells(sObj,2,2,1,5);
    SpreadsheetFormatCell(sObj, {bold="true", fontsize="20", fgcolor="blue", color="yellow"}, 2,1);
</cfscript>

<!--- Launch File to User --->

<cfheader name="Content-Disposition" value="attachment; filename=MySpreadsheet.xlsx"> 
<cfcontent type="application/vnd.ms-excel" variable="#SpreadsheetReadBinary( sObj )#"> 
Run Code Online (Sandbox Code Playgroud)