我可以手动更改它并完成工作。
gobjExcel = Activator.CreateInstance(Type.GetTypeFromProgID("Excel.Application"));
objWorkbooks = gobjExcel.Workbooks;
objWorkbook = objWorkbooks.Open(fileName);
Type thisType = objWorkbook.GetType();
dynamic objProj = objWorkbook.VBProject;
答案 0 :(得分:0)
更新以下注册表项,
HKEY_CURRENT_USER \ Software \ Microsoft \ Office \ 12.0 \ Excel \ Security \ AccessVBOM