Copy link to clipboard
Copied
I use <cfoutput> to export a tab delimited text table for excel. I added a bunch of fields to a working export and it's broken. I doublechecked my syntax in the construction of the output string. I am noticeing that intellisense stops working on the line at 512 characters. Could there be a limit to the length of a single line in a cfoutput export?
Is there a better way to export to Excel?
Thanks.
Copy link to clipboard
Copied
CFSPREADSHEET, depending upon which version of CF Server you're using.
^_^
Copy link to clipboard
Copied
I was just looking at that...
Copy link to clipboard
Copied
After the CFSPREADSHEET tag, you can drop into CFSCRIPT and manipulate things like font, color, etc. Nice.
^_^
Copy link to clipboard
Copied
But from what I can see there is no easy way in cold fusion to let the user select a filename and directory to put it in.
Copy link to clipboard
Copied
If a user needs to download it immediately after it's created, you can save the .xls(x) file in the Virtual File System under a directory named after the user's CFID_CFTOKEN (check to see if directory exists; if not create it; save file) and use CFHEADER and CFCONTENT to set it up for download, then delete the file after the download (an attribute in cfheader) and remove the directory from the VFS.
^_^