excel object returns count zero Please refer the screenshot.
I need to access objects of file type PPT, Excel, Word which are opened through an application similar to sharepoint.
While I try getting count of opened excel files I always get the count as 0. I already searched if I can get help, got to see this Accessing an open Excel Workbook in C# but though implementing the solution it returns 0.
Microsoft.Office.Interop.Excel.Application xlObj =
(Microsoft.Office.Interop.Excel.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Excel.Application");
while (xlObj.Windows.Count == 0) // This line returns the count as 0