Skip to content

Instantly share code, notes, and snippets.

@existdissolve
existdissolve / gist:2587154
Created May 3, 2012 16:47 — forked from DominicWatson/gist:1211688
Some code to make color customization in ColdFusion 9's cfspreadsheet implementation clean
<cfscript>
void function spreadsheetSetCustomPalette(required any workbook, required struct palette){
var customPalette = arguments.workbook.getworkbook().getcustompalette();
var color = "";
var colorIndex = 0;
var rgb = "";
for(color in palette){
try{
colorIndex = CreateObject("java", "org.apache.poi.hssf.util.HSSFColor$#UCase( color )#").GetIndex();