So, we at first attempted to allow the user to download CSV files via their browser, which worked fine (some files are around 375MB). However, it looks like the client won't accept that because of a) formatting of numbers, b) removing leading zeros and c) changing long numbers like a state code of
If you have used excel you're quite familiar with these "I thought you wanted this" behaviors..
So we'll need to stream an Excel file, but are there different formats? (Assume the user has access to the latest version of Excel for this question)
I believe Excel can open a properly specified XML file as a spreadsheet, which could contain the proper "format this as text" instructions, but on large files that could really get out of hand. Is there a more native excel format that is leaner? Without as much markup? If you are aware of it, where is it described?
-- EDIT --
I thought I'd help the community out on what I've found. First, we tried using
="0040" i.e. an equals before the quotes. Works but too much size on a large file, and Excel freaks out and crashes.
We tried a special character inside the quotes before, worked but formatting was an issue.
Can you STREAM an XLSX file? NO!
Reason: an XLSX file is actually a zipped file with two key files inside, one named sharedStrings.xml which is a list of all UNIQUE cell values, and another which is a list of cells but with a number reference to the first sharedStrings.xml file. The entire folder is zipped and, behold, that's your XLSX file. So an XLSX file must be built, not streamed.