When using the LabVIEW Report Generation Toolkit
This behavior can happen if you use LabVIEW 32-bit and Microsoft Office 64-bit. For example, Excel 2016 64-bit will not work with LabVIEW 2018 32-bit. To solve this issue, use LabVIEW 32-bit with Microsoft Office 32-bit , or, LabVIEW 64-bit with Microsoft Office 64-bit.
When using the LabVIEW ActiveX built in functions:
This behavior happens because LabVIEW is not linked to the needed Microsoft Object Library or there is a difference in bitness between Microsoft Office and LabVIEW. In order to do so, follow the next steps:
- Right-click the Word._Application or Excel._Application reference to display its options.
- Go to the Select ActiveX Class option, then, click the Browse… option.
- Once the Select Object From Type Library window is displayed, click again on Browse…
- Follow the path where the Object Library is located, for both Word and Excel the default path is C:\Program Files\Microsoft Office\root\OfficeXX\, where XX is the version number
- For Word: Its name is MSWORD.OLB.
- For Excel: It will be necessary to change the File Type selector to All Files (*.*) to be able to see the intended executable, its name is EXCEL.EXE.
- Once you load it, you will be able to select the Application (Word.Application.XX) or Application (Excel.Application.XX) option, where XX is the version number.
- You might need to click OK and follow steps 1 and 2 again so LabVIEW can load the options from the library.