Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copying from one worksheet to another with VFP
Message
De
20/05/2003 10:47:16
 
 
À
20/05/2003 08:13:31
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00790369
Message ID:
00790480
Vues:
15
>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
Fil
Voir

Click here to load this message in the networking platform