Skip to main content
Participating Frequently
February 8, 2016
Question

creating .xslx files in coldfusion 8

  • February 8, 2016
  • 2 replies
  • 1560 views

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 has been closed for replies.

2 replies

James Moberg
Inspiring
February 8, 2016

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

atlcfAuthor
Participating Frequently
February 8, 2016

Thanks!

Will give it a try.

James Moberg
Inspiring
February 8, 2016

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

WolfShade
Brainiac
February 8, 2016

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,

^_^

Carl Von Stetten
Brainiac
February 8, 2016
atlcfAuthor
Participating Frequently
February 8, 2016

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.