>Hi Kenneth
>
>I asked this same question a while ago. I ended up copying the information to the Windows Clipboard and from there into an Excel range. The thread that starts here:
849641>
>>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.
I think you're running into performance issues as outlined in the "Performance" link in the following:
http://msdn.microsoft.com/library/en-us/dnfoxgen7/html/vfpandcom.asp?frame=true&_r=1
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up