简体   繁体   中英

How is Open XML SDK performance for reading big excel file?

All,

We are planning to use Open XML SDK from Microsoft in Visual Studio C# (developing client application) to read big excel file, to import the data and inputted to database.

How about its performance ?

Do you think it's better to use COM ? or use other commercical library out there to perform this ?

Thanks alot, really appreciate your suggestion

OpenXML is better than COM Interop in .Net. Though you don't see any significant performance in OpenXML than COM, it is easy to code. Easier to maintain. Considering the large amounts of data you should read, take a look at below link for optimizing.

http://msdn.microsoft.com/en-us/library/ff191178.aspx

http://blogs.msdn.com/b/brian_jones/archive/2010/05/27/parsing-and-reading-large-excel-files-with-the-open-xml-sdk.aspx

Johan has a nice article about why we shouldn't use COM Interop http://weblogs.asp.net/jdanforth/archive/2011/05/15/never-never-never-do-office-interop-on-the-server.aspx

If you think OpenXML is too much to code, have a look at ClosedXML. It's free and works as wrapper to OpenXML.

http://closedxml.codeplex.com/

If you use a streaming approach, you can read / create huge spreadsheets very quickly using the Open XML SDK:

http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2012/01/10/screen-cast-using-open-xml-and-linq-to-xml-in-a-streaming-fashion-to-create-huge-spreadsheets.aspx

-Eric

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM