Worksheet.UsedRange returns there are 1048576 rows in this sheet. There is indeed effectively a cell at N:1048576. Is this intentional?
We improved code to deal with this situation without exception, but using 16 million cells for only 640 values will of course make it slow.
Ah that explains it :-)
This is clearly not intentional - would it be possible to ignore cells with no content under import, so we don't end up with 1000000+ lines? I think I have seen this problem before.
I'm not sure if somewhere a line can be drawn to do this automatically. From what number of row should it start skipping for example. Different users will have different expectations from this. The current implementation imports all used cells as reported by Excel as-is in the grid which is the most reliable definition of the import action.
I tend to agree that it is different from user to user, so I think our options are: