2010-03-15 103 views

回答

3

發現它(link)

//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; 
+0

偉大的,你找到它。您可以接受您自己的答案(複選標記),並將其從「未答覆」列表中移除。 – 2010-03-16 00:25:22

+0

謝謝,仍然有一天之前SO讓我做到這一點,雖然:O – 2010-03-16 18:00:20

1

您正在尋找的工作簿屬性。

相關問題