Excel Automation: open an existing Excel file as "new"

I want to have excel export function for one application in one click. Therefore, I need to create an excel file in a temporary place, because for this I need to use a third-party component.

I want Excel to open the file. I can get to this point; however, Excel always remembers the location where it downloaded the file. I want the downloaded file to be displayed as a “new” file that is not saved in a specific place, so when the user wants to click “save” (do not save as) or close Excel, he reminds them of unsaved changes.

I am using Excel Automation from C # on .net 3.5

+5
source share
2 answers

You can specify any existing Excel workbook as a template. Then you use the Workbooks.Add method to open a new book, with the Template parameter pointing to a temporary template.

+5
source

Hmm ... try creating an excel template and open the template instead?

0
source

All Articles