缓慢的Microsoft.interop.excel对象 [英] slow Microsoft.interop.excel object

查看:82
本文介绍了缓慢的Microsoft.interop.excel对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





i我正在使用Microsoft.interop.excel应用程序对象进行统计计算。

但是对于大型计算,需要更长的时间是时候进行计算了。

我怎样才能提高计算性能?

excel对象有什么替代方案吗?







谢谢

Rhishi。

Hi,

i am using Microsoft.interop.excel application object for performing statistical calculation.
But for large calculations it takes longer time to perform calculations.
how can i improve calculation performance?
is there any alternative for excel object?



Thanks
Rhishi.

推荐答案

不要使用Excel来做任何重要的工作

InterOp很慢。没有办法解决它。



正如谢尔盖在评论中建议的那样,将数据带到你的应用程序,做任何需要的数学运算然后以Excel格式保存。



如果您使用以xlsx / xlsm数据格式保存的新excel电子表格,使用OpenXML可以快速读取/写入数据。
Do not use Excel to do any significant work in it.
InterOp is slow. There is no way around it.

As suggested by Sergey in the comment bring data to your app, do whatever math is needed and then save it back in Excel format.

If you are using new excel spreadsheet saved in xlsx/xlsm data format, fastest way to read/write data will by using OpenXML.


这篇关于缓慢的Microsoft.interop.excel对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆