I've got a ColdFusion application where I generate a comma-separated-values (CSV) file from code, and return it to the client via a link. Generally this opens as an excel document for the client. It's pretty simple, just 2 columns, and it's been working fine for years.
Now I need to return the file to the client without the intermediary link. I just can't seem to get it to work. I've tried CFLOCATION to the file, and CFCONTENT to return the file. Both of these methods return the file, launching excel, but all the content ends up in the first column in the spreadsheet instead of in 2 columns as expected. This behavior also strips the quotes off of the first column data for every record, so that the data in the first column of the excel spreadsheet looks something like this:
ID,"Title"
ABC,"Title for record ABC"
DEF,"Exciting Title Here"
If I call the file from the address line it works fine, parsing the CSV file into the 2 columns in excel. I suspect that this is some kind of buffer issue, but don't know how to handle it. And, strangely, calling an RTF file without the intermediary link works just fine (popping Word in the browser).
Any and all suggestions are greatly appreciated.
Cheers,
Kris
Now I need to return the file to the client without the intermediary link. I just can't seem to get it to work. I've tried CFLOCATION to the file, and CFCONTENT to return the file. Both of these methods return the file, launching excel, but all the content ends up in the first column in the spreadsheet instead of in 2 columns as expected. This behavior also strips the quotes off of the first column data for every record, so that the data in the first column of the excel spreadsheet looks something like this:
ID,"Title"
ABC,"Title for record ABC"
DEF,"Exciting Title Here"
If I call the file from the address line it works fine, parsing the CSV file into the 2 columns in excel. I suspect that this is some kind of buffer issue, but don't know how to handle it. And, strangely, calling an RTF file without the intermediary link works just fine (popping Word in the browser).
Any and all suggestions are greatly appreciated.
Cheers,
Kris