0
我使用以下代码尝试获取Excel枚举Typelib的引用。 但它返回如下所示的错误:无法在win 7注册表中找到excel枚举typelib
(>) 11 % set application Excel.Application
Excel.Application
(>) 12 % set clsID [registry get HKEY_CLASSES_ROOT\\$application\\CLSID {}]
{00024500-0000-0000-C000-000000000046}
(>) 13 % set typeLib [registry get HKEY_CLASSES_ROOT\\$application\\CLSID\\$clsID\\Typelib {}]
unable to open key: The system cannot find the file specified.
是安装类型库或一些部件需要它。
还查找了HKEY_CLASSES_ROOT中的所有应用程序,它们的名称中都有Excel,并且还有clsId和typeLib引用。以下是我发现的应用程序,但我不知道该选哪一个:
Excel.Addin
Excel.AddInMacroEnabled
Excel.Backup
Excel.Chart
Excel.Chart.8
Excel.CSV
Excel.Dialog
Excel.Macrosheet
Excel.OpenDocumentSpreadsheet
Excel.OpenDocumentSpreadsheet.12
Excel.Sheet
Excel.Sheet.12
Excel.Sheet.8
Excel.SheetBinaryMacroEnabled
Excel.SheetBinaryMacroEnabled.12
Excel.SheetMacroEnabled
Excel.SheetMacroEnabled.12
Excel.SLK
Excel.Template
Excel.Template.8
Excel.TemplateMacroEnabled
Excel.Workspace
Excel.XLL
WbxMSAI.WebExExcelAddin
WbxMSAI.WebExExcelAddin.1
Excel.Addin
Excel.AddInMacroEnabled
Excel.Backup
Excel.Chart
Excel.Chart.8
Excel.CSV
Excel.Dialog
Excel.Macrosheet
Excel.OpenDocumentSpreadsheet
Excel.OpenDocumentSpreadsheet.12
Excel.Sheet
Excel.Sheet.12
Excel.Sheet.8
Excel.SheetBinaryMacroEnabled
Excel.SheetBinaryMacroEnabled.12
Excel.SheetMacroEnabled
Excel.SheetMacroEnabled.12
Excel.SLK
Excel.Template
Excel.Template.8
Excel.TemplateMacroEnabled
Excel.Workspace
Excel.XLL
WbxMSAI.WebExExcelAddin
WbxMSAI.WebExExcelAddin.1
Excel.Addin
Excel.AddInMacroEnabled
Excel.Backup
Excel.Chart
Excel.Chart.8
Excel.CSV
Excel.Dialog
Excel.Macrosheet
Excel.OpenDocumentSpreadsheet
Excel.OpenDocumentSpreadsheet.12
Excel.Sheet
Excel.Sheet.12
Excel.Sheet.8
Excel.SheetBinaryMacroEnabled
Excel.SheetBinaryMacroEnabled.12
Excel.SheetMacroEnabled
Excel.SheetMacroEnabled.12
Excel.SLK
Excel.Template
Excel.Template.8
Excel.TemplateMacroEnabled
Excel.Workspace
Excel.XLL
WbxMSAI.WebExExcelAddin
WbxMSAI.WebExExcelAddin.1
你只是读错了键。使用Regedit.exe自己查看。我不知道TCL,但是如果我正确解释它,那么您需要使用HKEY_CLASSES_ROOT \\ CLSID \\ $ clsID \\ Typelib {} –