Example Code

Copy a Template Worksheet Using the Report Generation Toolkit using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
This Example VI shows how to copy an Excel template when using the Report Generation Toolkit.


Description
The example generates a new report and a new worksheet in that report. A tab-delimited .txt copy of the template worksheet is read into the VI using Read From Spreadsheet File.vi as a string array and inserted into the new worksheet with the Append Table to Report.vi. This makes a copy of the template worksheet headers on the new worksheet. The Excel file and tab delimited files are found using a relative reference, so if any projects or other VIs are open when you run the example, it will search the wrong directory for the Excel and tab delimited files.

 

Requirements

Software:

  1. LabVIEW 2012(or compatible)


Steps to Implement or Execute Code

  1. Extract the folder containing the VI
  2. Open the VI and ensure that the file names in "Worksheet Template" and "Tab Delimited Template" match the file names in the folder.
  3. Run the VI.

Additional Information or References
VI Block Diagram

 1.png

 **This document has been updated to meet the current required format for the NI Code Exchange.**

Eric H.
Senior Field Applications Engineer
NI

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