Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy a sheet in an Excel workbook
Message
De
14/06/1999 13:58:53
 
 
À
14/06/1999 12:36:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00227990
Message ID:
00229581
Vues:
36
Mark,

I don't have a chance to try this, but in the copy() part, the first paramter is the before parameter and the second one is the after. So, as I understand it, you would type

".copy(,oleApp.Worksheets('sheet2'))" && note the ,

to copy after sheet2.

Give it a try.

PF

>What I have been able to do so far is to create a copy of the sheet before an existing sheet by using:
>
>oleApp = CREATEOBJECT("Excel.Application")
>oleApp.Visible=.t.
>oleApp.Workbooks.open(curdir()+"crosstab.xls")
>oleApp.Worksheets('sheet1').copy(oleApp.Worksheets('sheet2'))
>
>This will work except that I need to have an extra page in the workbook and then delete it when done. I just can't find the proper syntax for passing the parameter to copy the page after an existing sheet. The help example I have found uses what VB calls Named Parameters which it can interpret and pass internally, but I can't find anything that defines the parameters for the Copy method.

(On an infant's shirt): Already smarter than Bush
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform