1 person found this helpful
For some reason, you have to format twice - once before the data is inserted, and once after.
This is especially true if you have any data values that are strictly integers. These, even if you format the cell ahead of time to be 'Text', will still align to the right, as integers do. However, if you reapply the formatting after the data is inserted, then it should format properly.
PS.. THANK YOU for taking the time to code for (cf)spreadsheetsetcellvalue!! Too many people get lazy and just chuck a query object at a cfspreadsheet tag.
@WolfShade Thanks for the reply. One follow up.
Are you talking about using SpreadsheetFormatCell or SpreadsheetFormatColumn? I have had some success with format column before but I still end up with data that the client still has issues with?
Thanks for the reply.
FormatCell, FormatColumn, FormatColumns, FormatRow, FormatRows. If there is anything that Excel (or the CF workings for Excel) don't automatically format correctly, you'll most likely have to use the format twice. Which could be slightly easier if you put all the formatting into a function and refer to the function once before populating the data and once after.