General information
Category:
COM/DCOM and OLE Automation
If it is not a "real" excel template (with an XLT extension) yet, you can save it as so from the "Save As.." and whenever you create a new spreadsheet from this template it will create a document with an XLS extension leaving the template intact.
>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
Previous
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