>>I used the following code to open an Excel Sheet.
>>
>>objExcel = create("Excel.Sheet")
>>
>>objExcel.Cells.Column = 1 && try to locate the cell to post value
>>objExcel.Cells.Row = 2
>>.....
>>
>>When objExcel.Cells.Column=1 is executed, it generates VFP.exe error and shuts off the VFP.
>>
>>How can I locate the Excel Cells to post value?
>
>Something like objExcel.Cells(1,2).value="..."
>However, if you want to send data from VFP to Excel, it's much faster to use COPY TO or EXPORT command, and then open file in Excel using OLE if necessary.
Thank you for your response. I tried objExcel.Cells(1,2).Value="..." as VFP sample demonstrated. But it did not work. That statement will cause ole error: unknown object. I am not familiar with Excel. I guess I do not know what correct Excel object and method I should be used.
I am trying to use Excel as a report writer. For that reason, I does not use file export.
Précédent
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