nissl-lab / npoi

a .NET library that can read/write Office formats without Microsoft Office installed. No COM+, no interop.
Apache License 2.0
5.67k stars 1.42k forks source link

Reading large files #1326

Closed manuraffl30 closed 4 months ago

manuraffl30 commented 4 months ago

NPOI Version Used

2.7.0

File Type

Use Case

Reading Excelfiles > 200 Kilobyte Reading Excelsheets > 80 Kilobyte

Description

I have a problem with reading "large" Excel-Files / Sheets is or will there be a feature that "allows" reading those files?

Bykiev commented 4 months ago

For large files you can use SXSSFWorkbook

tonyqus commented 4 months ago

What's the issue you encountered? Out of memory? Or slowness

Can you give an estimation of how many rows and columns you have in each Excel sheet?

manuraffl30 commented 4 months ago

@tonyqus I assume that the issue i ran into was slowness but I just found the problem. There were some sheets with loads of emty cells in my workbook, after removing all of them the filesize went from 980 kb to ~500 kb and now everything just works fine with XSSFWorkbook, thanks for the fast answers and sorry for "wasting" your time.