From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Export Graph to Word Using Report Generation Toolkit for Microsoft Office In 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 Report Generation Toolkit
  • LabVIEW

Code and Documents

Attachment

Overview

This VI provides a simple UI in which the user can specify data to output to a Microsoft Office Word document.

 

Description

Running this VI will output a graph to an unnamed Word document. User inputs allow the data to be selected, the default values entered into the array are a basic sine wave.  The UI also has inputs for basic graphing settings for the plot colors, axis settings, etc.

 

Requirements

  • LabVIEW 2013 (or compatible)
  • Report Generation Toolkit for Microsoft Office

 

Steps to Implement or Execute Code

  1. Download the attached VI.
  2. Enter your plot data into the "2D Array Data" array or use the default data.
  3. Run the program and inspect the MS Word document for format.
  4. Adjust graph settings as needed.

 

Additional Information or References

VI Block Diagram

 2-281.png

 

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

 

Applications Engineer
National Instruments

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