09-05-2023 09:52 AM
Hi
i need help with below simple Query
I am generating an excel file using an existing template. The new file gets generated but it is also making the changes in template. Is there a way using which i can avoid making any changes to the template file.
Solved! Go to Solution.
09-05-2023 03:06 PM
Without actual code, it is hard to guide you. Are you using any toolkit or use the ActiveX?
09-05-2023 09:10 PM
I'm assuming you are using the Report Generation Toolkit.
When you do a "Create Report", you essentially open Excel. At this point, if you specify a Template Excel WorkSheet, the contents of that WorkSheet will appear on the "working copy" in Excel. When you are ready to "Save Report to File", you need to specify the Path for the File. To avoid overwriting the Template file, specify another file name. That's all there is to it.
Finally, there is "Dispose Report". This basically closes Excel, so once you've done this, Excel leaves memory.
Bob Schor
09-05-2023 11:00 PM
Yes, it works. I'm able to create new file without changing the template file.