Skip to main content
Inspiring
January 26, 2023
Question

Set excel cell color with javascript created with cfspreadsheet

  • January 26, 2023
  • 1 reply
  • 236 views

I've create a excel file with CFSpreadSheet and now I want to change the color of a cell to a hexcolor that is not available with CFSpreadSheet.  Can it be done with javascript?

 

<cfset xl = spreadsheetNew("Hazard Details",true)>

<cfset SpreadsheetAddRow(xl,"Test")>

<cfset SpreadsheetFormatCell(xl,{color="red",bold="true"},#xl.rowcount#,1)>

 

Will set it to red.  But I want to use a color that is not available with cfspreadsheet like hexcolor #355f91

something like:

<cfset SpreadsheetFormatCell(xl,{color="#355f91",bold="true"},#xl.rowcount#,1)>

 

    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    February 19, 2023