开发者

Excel 12.0 Object Library speed

开发者 https://www.devze.com 2023-03-14 20:10 出处:网络
I\'m writing a C# program that outputs thousands of lines into an excel spreadsheet using the Excel 12.0 Object Library. I noticed that it was generally pretty slow, so I timed it with the Stopwatch c

I'm writing a C# program that outputs thousands of lines into an excel spreadsheet using the Excel 12.0 Object Library. I noticed that it was generally pretty slow, so I timed it with the Stopwatch class and found out each write to a ce开发者_如何学Pythonll was taking around 4 million ticks.

  1. Is this speed normal?
  2. Is there a faster alternative?

Edit: 4 not 100 million


Yes, this speed is normal - it is painfully slow.

There are faster alternatives available. I have used SpreadsheetGear, which I found easy to use and much faster.


Maybe look at the question. Create excel xls and xlsx a lot of people liked the Epplus library. I just started with it and it seems good.

0

精彩评论

暂无评论...
验证码 换一张
取 消