Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XLS doc with multiple worksheets
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00933782
Message ID:
00933784
Views:
17
This message has been marked as the solution to the initial question of the thread.
If you want to rename all the sheets:
*Create the object:
oExcel = CreateObject("Excel.Application")
oExcel.Visible = .t.
*State how many worksheets will be in the xls doc via:
oExcel.SheetsInNewWorkBook = 4

*Open the doc I just made:
oExcel.Workbooks.Add()  && Here I change Your code .OPEN()
oWorkbook = oExcel.ActiveWorkbook
n = 0
FOR EACH oSh IN oWorkbook.Sheets
    oSh.Name = "Bbbb"+STR(n,1) && That is the name of the sheet
    n = n + 1
NEXT
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform