Update existing excel sheet

atuldalvi

Member
I am trying to open existing excel sheet through 4gl having 5 sheets. Except 1st, rest 4 sheets having formulas whose dependecy is on 1st sheet data. So now i am trying 2 fill 1st sheet by looping db table but it is taking much time.

If I create new excel sheet by looping the same table then it is working fine.

Please help
 
maybe its because Excel's automatic recalculation, if the 1st(data) sheet is long
in a new spreadsheet maybe its turned off (or you don't have the formula sheets yet)

try switching the automatic recalculation off before start of update, and turn it on in the end
 
Code:
/* disable automatic calculation */
xlApplication:Calculation = -4135 . /* xlCalculationManual */
/* load data from Progress DB 
    into sheet1...*/
/* enable automatic calculation */
xlApplication:Calculation = -4105 . /* xlCalculationAutomatic */
 
Thanks buddy. It is working too fast now but the formulas not working properly. It is showing '#NA' value for each row.
 
try to add as last command this:
Code:
/* to force re-calculation, as if you pressed F9 */
 xlApplication:Calculate.
 
Back
Top