Error 1045 When Using the LabVIEW Report Generation Toolkit

Updated Dec 22, 2023

Reported In

Software

  • LabVIEW
  • LabVIEW Report Generation Toolkit

Issue Details

When I run a VI that uses the Report Generation Toolkit or I try to access Microsoft Word or Excel applications with it, I receive Error 1045, as shown in the below screenshot:
 

Error 1045 occurred at Unknown System Error in ACTIVE X reading Excel Worksheet Names sub.vi

Possible reasons:
LabVIEW: Null Refnum passed to Close Reference.


This program used to work in a previous version of Microsoft Excel and LabVIEW but after updating the Excel version it is throwing this error, how can I fix this?

Solution

Follow these steps to troubleshoot the issue:
  1. Verify the compatibility between the Report Generation Toolkit and Microsoft Office version. Please take a look at the table in this link. If any software components are not compatible, upgrade LabVIEW or Microsoft Office to a compatible version.
  2. If you have a newer version of LabVIEW installed on the same computer, try running the VI in that version.
  3. Try changing the ActiveX reference for the Excel application to a newer version, if none is available it might mean that the LabVIEW version is not compatible with the version of Excel being used.
  4. Make sure the Microsoft Word or Excel document you are using is not locked.