views:

176

answers:

3

I'm needing to access Excel workbooks from .Net. I know all about the different ways of doing it (I've written them up in a blog post), and I know that using a native .Net component is going to be the fastest. But the question is, which of the components wins? Has anybody benchmarked them? I've been using Syncfusion XlsIO, but that's very slow for some key operations (like deleting rows in a workbook containing thousands of Named ranges).

+1  A: 

Can't help you with your original question, but are you aware that you can access Excel files using an OleDbConnection, and therefore treat it as a database? You can then read worksheets into a DataTable, perform all the changes you need to the data in your application, and then save it all back to the file using an OleDbConnection.

A: 

Paul, Thanks. I was aware of that (I should perhaps include it in my blog post). However in this case, its not the data that I really need. It's things like the Cell style and formatting, etc.

Sam

Samuel Jack
+2  A: 

I haven't done any proper benchmarks, but I tried out several other components,and found that SpreadsheetGear was considerably faster than XlsIO which I was using before. I've written up some of my findings in this post: http://blog.functionalfun.net/2008/08/which-net-excel-io-component-should-i.html

Samuel Jack