Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excel book.SaveAs
#1
Here's the basic code:

Code:
Copy      Help
function str'sA str&sB str&sC str&sD

str sfile="$desktop$\JVF\Template.xls"
str asheet="Template A"
str bsheet="Template B"

Excel.Application app._create

Excel.Workbook book=app.Workbooks.Open(_s.expandpath(sfile))
ExcelSheet es1.ws=book.Worksheets.Item(asheet)
ExcelSheet es2.ws=book.Worksheets.Item(bsheet)


es1.SetCell(sA 1 1)
es1.SetCell(sB 1 2)
es2.SetCell(sC 1 1)
es2.SetCell(sD 1 2)
book.Save

What I want it to do is a Save As that creates a new spreadsheet that uses the variable sA sB sC sD as the file name.
How do I do this?

Thanks,
TheVig


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)