Information générale
Catégorie:
COM/DCOM et OLE Automation
>Hi All,
>
>I have 2 excel files and I need to copy some of the contents from the first to the second using code in my VFP application.
>
>For some reason when I run it I receive error messages such as "Invalid Index" or "Call was rejected by the callee".
To add to what the others have said, you can make life a lot easier by grabbing a reference to each workbook when you open it:
oBook1 = oXL.Workbooks.Open()
oBook2 = oXL.Workbooks.Open()
Now you don't have to worry about the Workbooks collection or how to address each workbook because you have a direct object reference.
Tamar
Précédent
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