Closed Daemach closed 6 months ago
That's because you're trying to use a CFML virtual file system path (i.e. ram://temp13681.csv
) for the CSV output. The CSV functionality uses Apache Commons CSV, so you need to use a physical path that java's BufferedWriter can work with.
If you can't avoid using a RAM path, then you could just generate the CSV string and then write it out yourself using CFML:
function spreadsheetToCSV( filePath, outputFile ) {
var data = getspreadsheet().read( filePath, "query" );
var csv = getspreadsheet().writeCsv().fromData( data ).execute();
return FileWrite( outputFile, csv );
}
Thanks, Julian!
holdings_template (1).xlsx
Using the following code with the attached spreadsheet, we're seeing an odd error. Can you replicate? Oddly, I cannot find
:
when searching in excel.Illegal char <:> at index 3: ram://temp13681.csv