Adding Basic CSS Support To My POI Utility ColdFusion Component For Excel Creation

<!--- Create query to ouptut to excel. --->
<cfset qMovie = QueryNew(
	"id, name, rating",
	"CF_SQL_INTEGER, CF_SQL_VARCHAR, CF_SQL_DECIMAL"
	) />
 
<!--- Add rows to query. --->
<cfset QueryAddRow( qMovie, 5 ) />
 
<!--- Set row data. --->
<cfset qMovie[ "id" ][ 1 ] = JavaCast( "int", 1 ) />
<cfset qMovie[ "name" ][ 1 ] = JavaCast( "string", "Terminator 2" ) />
<cfset qMovie[ "rating" ][ 1 ] = JavaCast( "float", 10.0 ) />
 
<cfset qMovie[ "id" ][ 2 ] = JavaCast( "int", 2 ) />
<cfset qMovie[ "name" ][ 2 ] = JavaCast( "string", "American Pie" ) />
<cfset qMovie[ "rating" ][ 2 ] = JavaCast( "float", 9.0 ) />
 
<cfset qMovie[ "id" ][ 3 ] = JavaCast( "int", 3 ) />
<cfset qMovie[ "name" ][ 3 ] = JavaCast( "string", "Friends With Money" ) />
<cfset qMovie[ "rating" ][ 3 ] = JavaCast( "float", 8.0 ) />
 
<cfset qMovie[ "id" ][ 4 ] = JavaCast( "int", 4 ) />
<cfset qMovie[ "name" ][ 4 ] = JavaCast( "string", "Better Than Chocolate" ) />
<cfset qMovie[ "rating" ][ 4 ] = JavaCast( "float", 8.5 ) />
 
<cfset qMovie[ "id" ][ 5 ] = JavaCast( "int", 5 ) />
<cfset qMovie[ "name" ][ 5 ] = JavaCast( "string", "Real Genius" ) />
<cfset qMovie[ "rating" ][ 5 ] = JavaCast( "float", 9.0 ) />
 
 
<!--- Create a new instance of the POI utility. --->
<cfset objPOIUtility = CreateObject(
	"component",
	"POIUtility"
	).Init()
	/>
 
<!--- Get the path to our Excel document. --->
<cfset strFilePath = ExpandPath( "./movies.xls" ) />
 
 
<!--- Create default sheet object. --->
<cfset objSheet = objPOIUtility.GetNewSheetStruct() />
 
<!--- Set sheet query data. --->
<cfset objSheet.Query = qMovie />
 
<!---
	This is the name that will show up in the first
	Excel sheet tab.
--->
<cfset objSheet.SheetName = "Movies" />
 
<!---
	This is the list of columns that we want to use. This
	specifies the columns AND the order in which they
	should appear.
--->
<cfset objSheet.ColumnList = "id,name,rating" />
 
<!--- This defines the header row values. --->
<cfset objSheet.ColumnNames = "ID,Name,Rating" />
 
 
<!---
	Write the excel from the query. We are passing in the
	CSS values for the header, row, and altrow.
--->
<cfset objSheet = objPOIUtility.WriteExcel(
	FilePath = strFilePath,
	Sheets = objSheet,
	HeaderCSS = "font: italic 16pt verdana ; background: lime ; color: white ; border-bottom: 3px solid green ;",
	RowCSS = "border-bottom: 1px solid gold ; font-size: 12pt ;",
	AltRowCSS = "background-color: lemon_chiffon ;"
	) />

For Cut-and-Paste