user1715617
user1715617

Reputation: 55

microsoft office interop excel open file without saving

I use this code to create excel worksheet:

 Excel.Application excelApp = new Excel.Application();
 Excel.Workbook excelWorkBook = excelApp.Workbooks.Add();
 Excel.Worksheet excelWorkSheet = excelWorkBook.Sheets.Add();
 excelWorkSheet.Name = fileName;

 ... fill worksheet

Is there a way to open this worksheet (show it on screen) without saving it?

Upvotes: 2

Views: 2043

Answers (1)

Charles Mager
Charles Mager

Reputation: 26213

Sure, just show your Excel instance:

excelApp.Visible = true;

Upvotes: 6

Related Questions