- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to write to an excel spreadsheet with the following iLogic code:
SyntaxEditor Code Snippet
xlsPath = "C:\Users\dgauthier\Desktop\Inventor Templates\Ahu's\AHU Horizontal" GoExcel.CellValue(xlsPath, "Model Parameters", "B2") = OA_WIDTH GoExcel.CellValue(xlsPath, "Model Parameters", "B3") = OA_LENGTH GoExcel.CellValue(xlsPath, "Model Parameters", "B4") = OA_HEIGHT GoExcel.Save GoExcel.DisplayAlerts = False
I believe I have done everything write and when I hit "OK" the following error codes appears:
Error in rule: Parameters, in document: Assembly1
Unable to cast COM object of type 'System.__ComObject' 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: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' 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: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
at iLogic.GoExcel.SetCurrentSheet(String fileName, String sheetName)
at iLogic.GoExcel.set_CellValue(String fileName, String sheetName, String cellAddress, Object value)
at LmiRuleScript.Main()
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)
Is there something I am missing here?
Craig H
Solved! Go to Solution.