Create a new Excel 2003 file based upon an existing one...
Posted on 2013-12-09
I am using VB .NET (Windows Forms application) to create a new Excel file based upon an existing file ( which is an empty template style .xls file).
So far I can get as far as opening it and populating it with the data from a database. However, I want it to be presented to the user as an unsaved "Book1.xls" type of document like if I just open Excel manually myself and start working in an empty workbook.
I also have the path that the file should be saved to by default which I want Excel to use when the user presses "Save". I don't want to programmatically save the file as something because it could be that the user sees an error and just wants to discard without saving. I have put my own value into "ExcelApp.DefaultFilePath" in VB .NET but that isn't appearing.
Any help would be greatly appreciated. Points due to urgency.