如何在Excel中使用C#获取当前打开的文档?

我所需要的是在当前打开的Microsoft Excel实例中获取当前打开文档的列表。

但是我不懂Excel的术语来知道这些文档是否被称为工作簿,工作表或窗口等。

有任何想法吗

find它(链接) 。

//Excel Application Object Microsoft.Office.Interop.Excel.Application oExcelApp; this.Activate ( ); //Get reference to Excel.Application from the ROT. oExcelApp = ( Microsoft.Office.Interop.Excel.Application ) System.Runtime.InteropServices.Marshal.GetActiveObject ( "Excel.Application" ); //Display the name of the object. MessageBox.Show ( oExcelApp.ActiveWorkbook.FullName ); //Release the reference. oExcelApp = null; 

您正在查找Workbooks属性。