Example Code

Run Macro in an Excel File Using TestStand ActiveX/COM Adapter


  • TestStand

Code and Documents



This TestStand example sequence is created based on LabVIEW's Excel - Macro.vi shipping example.

The sequence will open an Excel file and run the embedded GraphData macro.

LabVIEW Code as below snippet.

Excel - Macro.png

Equivalent TestStand Sequence

TestStand Step Sequence.png

Additional Information

This example is tested with TestStand 2022 Q4 32-bit and Microsoft® Excel® for Microsoft 365 MSO (Version 2309 Build 16.0.16827.20166) 64-bit

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.