cfspreadsheet-railo
cfspreadsheet-railo copied to clipboard
Column Names not getting added on updates
I came across a problem where adding additional "tabs" the header/column names where not added to the second tabs only the first one
I replace line 305 <cfset addRows( arguments.query, 1, 1, false, arguments.columnFormats, arguments.autoSizeColumns ) />
with
<!--- Add the column names to the first row
If arguments.columnames exist, use that value for the headers
otherwise use the columnlist from the query variable itself
--->
<cfif structKeyExists(arguments, "columnnames")>
<cfset addRow(arguments.columnnames, 1, 1, false) />
<!--- Add the data starting at the 2nd row, since the header
was added to the first row
---->
<cfset addRows( arguments.query, 2, 1, false, arguments.columnFormats, arguments.autoSizeColumns ) />