Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted
Comments
Sergey Vaselenko 6-Dec-13 7:06am    
The most slowest operations is COM (Excel) function calls from VSTO.

You may try to reduce amount of such operations.
For example, cache data loaded from Excel to avoid the same calls.

Can you use Visual Studio Profiler?
It is the simplest way to find slow codes.

1 solution

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.
 
Share this answer
 
Comments
RhishikeshLathe 7-Dec-13 0:37am    
thanks sir,
but i am totaly dependent on excel calculation enging,
i am using solver add-in of excel for calculation.
agent_kruger 7-Dec-13 7:04am    
what kind of calculation you are doing?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900