Dim App As New MSExcel.Application
Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open(dlg.FileName)
For Each Ws As MSExcel.WorkSheet In Wb.WorkSheets
str=str & "|" & ws.name
Next
Foxtable 版本:2021.12.16.888错误所在事件:窗口,赋值二,Button11,Click详细错误信息:Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type 'Microsoft.Office.Interop.Excel._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000208D5-0000-0000-C000-000000000046}' failed due to the following error: 不支持此接口 (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).