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
Title:
XLS doc with multiple worksheets
Miscellaneous
Thread ID:
00933782
Message ID:
00933782
Views:
66
I'm outputting data into excell spreadsheets. I'm having trouble finding out how to create xls docs with multiple worksheets.

*Create the object:
oExcel = CreateObject("Excel.Application")

*State how many worksheets will be in the xls doc via:
oExcel.SheetsInNewWorkBook = 4

*Open the doc I just made:
oWorkbook = oExcel.Workbooks.Open(cFileName)

*Rename the Sheet
oActiveSheet = oExcel.ActiveSheet
oActiveSheet.Name = "MyData"

I'm sure I'm missing steps... but after that how do I do the same for multiple sheets? Thanks in advance!
+=================================+
|John McCarthy, Programmer, MEG
+=================================+
Next
Reply
Map
View

Click here to load this message in the networking platform