Information générale
Catégorie:
COM/DCOM et OLE Automation
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.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement