Hi,
Would anyone know how I could open an already opened excel workbook.
I have Windows Form with a button, and when clicked it opens the
spreadsheet as follows
string filename = @"C:\Documents\Test.xls";
Excel.Application ea = new Excel.Application();
Excel.Workbook wb = ea.Workbooks.Open(filename, 0, true, 5, "", "",
true, Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0);
ea.Visible = true;
But now if the user clicks a second time on the button I would like to
check that the file is not opened and inform him/her to closed it.
eg.
such as: if ( wb.isAlreadyOpened() == true )
MessageBox.Show("Close file
etc...");
Thanks