Skip to main content
Participating Frequently
Feb 8, 2016 1:08 PM UTC
Question

creating .xslx files in coldfusion 8

Hello All

I am on a CF8 server (the company hasn't upgraded) an I need to create an xslx file.

Any suggestions?

This topic is closed to new replies. Start a new post to keep the conversation going.

10 replies

James Moberg
Inspiring
Feb 8, 2016 5:48 PM UTC

The best way I've found to export data from ColdFusion 4, 5, 6, 7, 8, 9, 10 & 11 to XLSX format is to use CFExecute and Total CSV Converter

https://www.coolutils.com/TotalCSVConverter

Translate
atlcfAuthor
Participating Frequently
Feb 8, 2016 5:49 PM UTC

Thanks!

Will give it a try.

Translate
James Moberg
Inspiring
Feb 8, 2016 6:04 PM UTC

I'm not sure if this will work on CF8, but here's a UDF I optimized to generate better CSV so that dates, strings, non-numeric-string and other values are preserved when converting to Excel.  Use this w/Total CSV Converter... or just return the CSV file and it will open nicely in current versions of Excel.

https://gist.github.com/JamoCA/b2d0467dd914909f00bf

Translate
WolfShade
Legend
Feb 8, 2016 3:29 PM UTC

I don't know of a solid way to do that in CF8.  If you were on at least CF9, there is CFSPREADSHEET (for tag-based code) or SPREADSHEETNEW() (for CFSCRIPT code.)  I prefer the latter, as it gives much more granular control.

HTH,

^_^

Translate
Carl Von Stetten
Legend
Feb 8, 2016 4:09 PM UTC
atlcfAuthor
Participating Frequently
Feb 8, 2016 4:22 PM UTC

Thanks

I am actually looking at that now.

I’ve downloaded the code and changed the ext to .xslx and it creates a file but it won’t open.

Translate