Hacker News new | ask | show | jobs
by zamber 1602 days ago
For client-side stuff like that, there is sheetjs which has support for XLSX but there are file size limitations. XLSX is a glorified zip file and to parse it you 1st have to unzip it and then build the XLSX file.

I found that it starts to hang on XLSX files ~50MB because the spreadsheet model it produces get's a bit too big and sheetjs dies. Doing this in a web worker is a good idea because otherwise it will clog the main thread.

For CSV the story is different, because you can read a plain text file in chunks (even in JS) with FileReader and readAsArrayBuffer(file.slice(byteOffset, byteOffset + chunkSize, file.type)).