ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Add-In performance problem (https://www.excelbanter.com/excel-programming/317049-excel-add-performance-problem.html)

jbicik

Excel Add-In performance problem
 

Hello!

I'm writing an Add-In for Excel in Borland C++ Builder 6.0. It's a DL
library that creates some command bar, buttons and handles events fire
by these buttons. The version of Excel I'm using is Microsoft Exce
2003.

I'M OBSERVING SERIOUS SLOWDOWN WHEN DOING SEVERAL RECALCULATIONS OF A
EXCEL SHEET

The method I'm calling from button event handler does following:
- disables automatic recalculation
- disables updating the screen

for (int i=0; i< 1500; i++) {
sheet-get_Range(TVariant("s4")
EmptyParam)-set_Value(TVariant(i));
sheet-Calculate();
d = sheet-get_Range(TVariant("s4")
EmptyParam)-get_Value().dblVal;
}

1500 iterations take about: 1111ms
3000 iterations take about: 3765ms
And if I run 1500 + 1500 iterations I get something like: 1091ms
2614ms = 3705ms

Can anybody help me how to solve this problem?

Thank you, Joseph

--
jbici
-----------------------------------------------------------------------
jbicik's Profile: http://www.excelforum.com/member.php...fo&userid=1655
View this thread: http://www.excelforum.com/showthread.php?threadid=31412



All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com