Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy a sheet in an Excel workbook
Message
From
14/06/1999 12:36:12
 
 
To
10/06/1999 11:40:17
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00227990
Message ID:
00229512
Views:
38
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.

Is there anyone else out there that knows if and where this is documented?

Mark


>Mark,
>
>If you are really stuck and need to implement something now, I think you should be able to copy the sheet into the clipboard, create a new sheet and paste the clipboard.
>
>PF
>
>>Thanks, I can't believe it is so difficult to find help on this. I spent 2 hours serching through MSDN without finding anything useful.
>>
>>I'm still looking and if I ever find the answer I'll let you know.
>>
>>Mark
Mark Johns
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform