Hello,
I have an DTS ActiveX script that deletes, creates and populates an excel worksheet in the same .xls file on a weekly basis. The problem I'm running into is renaming the spreadsheet after I add it into the Worksheets collection.
Any help is appreciated.
My code is below:
Set objExcel_Application = CreateObject("Excel.Application")
Set objExcel_WorkBook = objExcel_Application.Workbooks.ADD()
objExcel_WorkSheet = objExcel_Workbook.Worksheets.Add()
I think I need the line of code right here.
objExcel_WorkBook.SaveAs(strFileName)
objExcel_WorkBook.Close
I have an DTS ActiveX script that deletes, creates and populates an excel worksheet in the same .xls file on a weekly basis. The problem I'm running into is renaming the spreadsheet after I add it into the Worksheets collection.
Any help is appreciated.
My code is below:
Set objExcel_Application = CreateObject("Excel.Application")
Set objExcel_WorkBook = objExcel_Application.Workbooks.ADD()
objExcel_WorkSheet = objExcel_Workbook.Worksheets.Add()
I think I need the line of code right here.
objExcel_WorkBook.SaveAs(strFileName)
objExcel_WorkBook.Close