Consultor Eletrônico



Kbase P27449: ActiveX How to speed up the data export to Excel
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   6/24/2003
Status: Unverified

GOAL:

How to speed up the data export to Excel

FIX:

Although exporting data to Excel through OLE can be slow, here some general hints that can speed up the operation:

1) If you have to export the same data to different adjacent cells you may use
chWorksheet:Range("B2:C3"):VALUE = 100

instead of:

chWorksheet:Range("B2"):VALUE = 100
chWorksheet:Range("B3"):VALUE = 100
chWorksheet:Range("C2"):VALUE = 100
chWorksheet:Range("C3"):VALUE = 100

2) turn off screen updating while loading:
chExcel:ScreenUpdating = no.
(... exporting data ...)
chExcel:ScreenUpdating = yes.


3) If you use formula, it helps to set the calculation off when entering the
chExcelApplication:calculation = 3. /*to set to manual*/
(... exporting data ...)
chExcelApplication:calculation = 1. /*to set to automatic */