Difficulty Reading in Large Excel file (50,000+ rows) #3291

Open
opened 2025-03-14 12:59:27 +00:00 by andy-han · 1 comment

Hi there, I am having an issue reading xlsx files when they are large (~50,000 rows or more).

For context, I am using version v0.19.3 and I am running sheetjs on an Angular WebWorker.

In my code, I am running https://docs.sheetjs.com/docs/api/parse-options/ specifically '.read(data)' and my webworker just hangs indefinitely never completing and also throwing errors.

I've tried with many various parsing options such as setting the type to 'array' (reading the file using FileReader into a byteArray), using 'dense: true', etc. I should note that when my xlsx file has less data, the method works just fine.

Alternatively, my end goal is simply to get the first ~10 rows and get the total number of rows from the spreadsheet. Passing in options such as sheetRows: 10 does not fix my issue, and method still hangs. As I understand, xlsx self reports the range of rows, is there a way I can retrieve that range without reading the whole file (and just reading the first 10 rows)?

Hi there, I am having an issue reading xlsx files when they are large (~50,000 rows or more). For context, I am using version `v0.19.3` and I am running sheetjs on an Angular WebWorker. In my code, I am running `https://docs.sheetjs.com/docs/api/parse-options/` specifically '.read(data)' and my webworker just hangs indefinitely never completing and also throwing errors. I've tried with many various parsing options such as setting the type to 'array' (reading the file using FileReader into a byteArray), using 'dense: true', etc. I should note that when my xlsx file has less data, the method works just fine. Alternatively, my end goal is simply to get the first ~10 rows and get the total number of rows from the spreadsheet. Passing in options such as `sheetRows: 10` does not fix my issue, and method still hangs. As I understand, xlsx self reports the range of rows, is there a way I can retrieve that range without reading the whole file (and just reading the first 10 rows)?
Owner

Can you share the file? If you can't share it here, join the SheetJS Chat

Can you share the file? If you can't share it here, join [the SheetJS Chat](https://sheetjs.com/chat)
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#3291
No description provided.