MassiveAnt
New Member
- Joined
- Sep 13, 2006
- Messages
- 4
How would I check if Excel is open already and get access to that application in my program. I'm using c# and 11.0 excel/office object library
What I'm eventually trying to do is check if an workbook is open
m_oExcel = new Microsoft.Office.Interop.Excel.ApplicationClass();
foreach (Workbook w in m_oExcel.Workbooks)
{
if (strName = w.Name) // then its open already....
}
but this creates a new excel app, so how would i grab a reference to an existing one?
What I'm eventually trying to do is check if an workbook is open
m_oExcel = new Microsoft.Office.Interop.Excel.ApplicationClass();
foreach (Workbook w in m_oExcel.Workbooks)
{
if (strName = w.Name) // then its open already....
}
but this creates a new excel app, so how would i grab a reference to an existing one?