(OleDbCommand) GetSchema() causes large time delays when using a massive Excel file

19 Views Asked by At

I have an Excel file that has records in the hundreds of thousands (file size == 336 MB, # of records == 361707) and I want to read the schema of this file into a data table. When I use the OleDbCommand.GetSchema() method to do this, the process takes over two minutes to complete. I thought this method would only read a handful of records and then provide the data table, but it goes through the entire Excel and that causes huge time delays.

This is less of an error and more of a question for improvement purposes. I want to know if there are others who have experienced this issue and what they did to fix it or to make it easier to handle.

0

There are 0 best solutions below