title: Performance of OLEDB to read Excel
body: <p>Following code takes like 2500 milliseconds on an i7-*3.4 GHz windows-7 64-bit computer to read an excel sheet with 25000 lines and 5 columns. Each cell approximately include a string with 10 characters. Is it normal? How can I read it faster?</p>
  
  <pre><code> Stopwatch sw1 = Stopwatch.StartNew();
   var connectionString = string.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0}; " +
                                               "Extended Properties=Excel 12.0;", filename);
  
   var adapter = new OleDbDataAdapter("SELECT * FROM [roots$]", connectionString);
   var ds = new DataSet();
   adapter.Fill(ds, "roots");
   sw1.Stop(); Console.WriteLine("Time taken for excel roots: {0} ms", sw1.Elapsed.TotalMilliseconds);
  </code></pre>