Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy a sheet in an Excel workbook
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00227990
Message ID:
00229885
Views:
48
>Perry,
>
>I am not sure what I could be doing wrong. I am doing the following:
>
>oleApp = CREATEOBJECT("Excel.Application")
>oleApp.Visible=.t.
>oleApp.Workbooks.open(curdir()+"crosstab.xls")
>oleApp.Worksheets('sheet1').copy(,oleApp.Worksheets('sheet2'))
>
>The result of the last command is a syntax error.
>
>Are you adding any spaces or anything else that I may be missing?

Just a WAG, but once or twice I've gotten similar parameter problems to work by passing it something - if it's char, you can try a space, something like that...

oleApp.Worksheets('sheet1').copy(' ',oleApp.Worksheets('sheet2'))
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform