When I create a workbook, it is usually named “Book 1”. I would like to change it to something like “My Workbook” without having to save the file. Is this possible? Here is the code I’m using to creat the book.
Dim ExcelApplication As Excel.Application = New Excel.Application
Dim ExcelWorkbook As Excel.Workbook = ExcelApplication.Workbooks.Add
it would be nice if this worked:
Dim ExcelWorkbook as Excel.Workbook = _
ExcelApplication.Workbooks.Add(Name = "My Workbook")
or
ExcelWorkbook.Name = "My Workbook"
@joeB:this link can help you understand the problem with Microsoftinterop which does not have option to change workbook name with out saving it.
http://bytes.com/topic/visual-basic-net/answers/602857-how-do-i-set-initial-excel-workbook-name