Differences saving ColdFusion Excel Data w/Tag vs CFScript
I recently noticed some differences between <cfspreadsheet action="write"> and SpreadsheetWrite() in ColdFusion 10.
The tag version adds the column headers to the outputted file (which I prefer), but the CFScript version doesn't unless you implicitly add the column labels as the first row of data.
If you re-read the tag-based Excel file you just created and resave it, the file size of the new file is identical. In fact, WinMerge identifies both files as the same file. If you try this with CFScript, the file sizes will be different (even though the contents of the file are exactly the same.) The difference appears to be in the "xml\worksheets\sheet1.xml" file. Every column's property for collapsed="true" is changed to "false". This parameter wasn't defined when creating or reading and re-saving (and I'm not sure how it's set), but it's strange that its automatically modified after reading and re-writing the file. Is this intentional? If so, which "collapsed" option is more desirable... the initial write or the re-write?
I also noticed that a "m/d/yyyy" date query value is outputted as a date type when using CFScript. If using CFSpreadsheet Write, the values are left-aligned and treated as text instead of dates.
Shouldn't the Excel generation be consistent between the two methods? I prefer the inclusion of the header and consistent with the tag, but I also need to retain the date format that CFScript seems to offer. Is this a bug or just undocumented nuances of each method?