Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Performance issues
Message
From
12/04/2004 11:06:21
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Performance issues
Miscellaneous
Thread ID:
00894049
Message ID:
00894049
Views:
49
This picks up on a question I asked earlier. Thanks to Cetin for answering. Your comments were very helpfull. Here's my second issue:

I instantiate Excel inside a VFP executable with this code:
oXL = CREATEOBJECT( "Excel.Application" )

I then parse through a VFP table and transfer the contents of that table into and excel spreadsheet created this way:
oWorkSheet = oXL.WorkBooks.Add( _myTemplate File_ )

The code to place the value into the spreadsheet, typically looks like this:
oWorkSheet.Sheets(1).Cells( nRow, nCol ).Value = nNewValue

This works just fine, with one "minor" issue: it is painfully slow. It takes 44 seconds on a 900mhz Duron powered machine to write and format a 500 row by 10 column set of data into the spreadsheet. I know VFP exports to Excel nearly instantaneously so I'm wondering if there isn't something that can be done to speed this up? I haven't used the "COPY TO _file_ TYPE XLS" approach because of some formatting requirements the client has imposed.
Next
Reply
Map
View

Click here to load this message in the networking platform