dfinke / ImportExcel

PowerShell module to import/export Excel spreadsheets, without Excel
https://www.powershellgallery.com/packages/ImportExcel/
Apache License 2.0
2.48k stars 400 forks source link

[Import-Excel] Performance optimization #1602

Open edwardmiller-mesirow opened 6 months ago

edwardmiller-mesirow commented 6 months ago

This reduces redundant lookups on a per-cell basis.

dfinke commented 6 months ago

Thanks, good optimiaztion, need to look at it. Need to look at the tests around it.

There is a mega perf issue I introduced when I added slick feature 'Import-Excel sales.xlsx *. It reads all the sheets and returns a hashtable keys are the sheet names and values are the data in the sheet.

Unfortunately how I implemented it if you are reading a large sheet, lots of columns and rows, it can go from 20 seconds to minutes. You can search the issues for when it was implemented. Folks pulled the prev version.

If you are so inclined