Count Rows and Columns in Excel Using ActiveX in LabVIEW

Updated May 1, 2019

Reported In

Software

  • LabVIEW

Issue Details

I am using ActiveX to manipulate Excel files, but I am having trouble finding the number of rows and/or columns for a specified worksheet in my Excel workbook programmatically. How do I get the number of rows and columns that are populated with data?

Solution

You must make use of several of the ActiveX property nodes in series for Excel to access this data. Please see the attached VI and the screenshot below for more information on how to do so.

Additional Information

Note: Microsoft Word and Microsoft Excel are powerful standard software packages for creating reports. Because of their popularity, some LabVIEW users programmed LabVIEW ActiveX applications to dynamically control these document packages for generating reports from LabVIEW. The complexity of the ActiveX interface of those packages, however, makes the development of custom applications difficult. With the LabVIEW Report Generation Toolkit for Microsoft Office, you no longer have to learn the complex object models of Microsoft Word and Excel to generate a report. The Report Generation Toolkit is a library of flexible, easy-to-use VIs for programmatically creating and editing Microsoft Word and Excel reports from LabVIEW. The product page for the Report Generation Toolkit is linked below.

WAS THIS ARTICLE HELPFUL?

Not Helpful