Microsoft.Office.Interop.Excel Excel=Microsoft.Office.Interop.Excel Excel.Application xApp = null; void Main() { xApp = new Excel.Application();//(Excel.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Excel.Application"); Excel.Worksheet ws = (Excel.Worksheet)xApp.ActiveSheet; string fn = xApp.ActiveWorkbook.FullName; fn.Dump("Excel File Name"); ws.Name.Dump("Excel Sheet Name"); } // Define other methods, classes and namespaces here