Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Renaming and Creating Worksheets
#1
Ok...this adds tabs with a consecutive number (ie Sheet4, Sheet5, Sheet6, etc...)

Function Rename_Tab
Code:
Copy      Help
out
str sfile="$desktop$\Excel Sheet Names.xls"
Excel.Application app._create
Excel.Workbook book=app.Workbooks.Open(_s.expandpath(sfile))

book.Worksheets.Add

book.Save
book.Close

Is there anyway to get it to add a Sheet with a specified name?

I thought book.Worksheet.Add("NewSheetName") would work, but doesn't


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)