General information
Category:
COM/DCOM and OLE Automation
Title:
Excel Workbook Copying
I am pushing data into a formatted Excel file. Before I push the data into the workbook I am trying to save the workbook as a new file(create a duplicate of the original for the user to modify) and then open it and push the data in it.
Can someone please point me in the right direction.
loExcel = CREATEOBJECT("EXCEL.Application")
WITH loExcel
.Application.Workbooks.OPEN("my path to the template")
.Application.Save("my path to the new file")
.ActiveWindow.CLOSE()
.Application.Workbooks.OPEN("my path to the newfile")
.Application.Worksheets("sheet1")
*push all the data in
ENDWITH
-Wes
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only