How to Get Index of Last Row and Column for Excel Custom Named Cell Using LabVIEW Report Generation Toolkit

Updated Aug 7, 2019

Reported In

Software

  • LabVIEW
  • LabVIEW Report Generation Toolkit

Issue Details

The default Excel cell name is e.g A1, B2. The Excel Get Excel Location.vi only accepts default Excel name input.



If I customize the name of a cell or a range of cells, how do I get the index of the last row and column by searching this custom cell name using LabVIEW Report Generation Toolkit?

Solution

  1. Excel Get Excel Location.vi is unable to return row and column index using custom cell name.
  2. Download the Get Last Column.vi from the Attachments below. Alternatively, you can create it yourself following the steps listed in the Additional Information section.
  3. Implementation using LabVIEW Report Generation Toolkit:
  • Input Excel file path in template input terminal of New Report.vi .
  • Use Append Report Text.vi to input value to specified cell. Leave the input blank if you do not need to input anything.
  • Wire the Excel Get Last Row.vi and Get Last Column.vi as shown. In the MS Office Parameters input, right click to create constant and enter the cell name. In this example, the custom cell name is voltage. Wire MS Office Parameters out to an unbundle by name function and create an indicator to output the row and column index respectively. For more information on MS Office Parameters, refer to the LabVIEW Help file or the description in Excel Get Last Row.vi
 

Additional Information

If you would like to create the Get Last Column.vi yourselves, you can follow the steps listed below:
  1. Double click the Excel Calc Bottom Row# subVI in  Excel Get Last Row.vi  to make the following modifications marked in the red square. Click on the small black arrow to expand the list of options available.

2. In Excel Get Last Row.vi , modify the following: