none
Reading xlsx slows down as more rows are read! RRS feed

  • Question

  • I am using the classes in DocumentFormat.OpenXml.dll to read more than a thousand rows from an xlsx file saved by Excel 2007.

    The code is straightforward, reading each cell and looking up the string table for the actual cell value.

    I am happy with the reading performance, more than 50 rows per second.  But this is only for the first few rows.  As the reading progresses through the file, the speed slows down.  At 1,000 records, it's almost 2 seconds per row.  Task Manager shows no change in memory usage.

    I can't believe that the reading speed is a function of how far into the file I am in.  Why is this so?

    The code fragment on what I am doing is at http://social.msdn.microsoft.com/Forums/en-US/exceldev/thread/54e37d2b-0871-411f-8597-b02a74dcc25b

    Thanks.

    Saturday, March 5, 2011 1:00 AM

Answers