Example Code

Write to an Open Instance of Microsoft Excel using LabWindows/CVI

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

  • Other

Code and Documents

Attachment

Overview

This is a simple example that uses the Microsoft Excel 9.0 Object Library to write data to an already open instance of Microsoft Excel.

For more Microsoft Excel examples in LabWindows/CVI, please refer to the shipping examples in Help » Find Examples » Communicating with External Applications » ActiveX » Excel.

 

Steps to Implement or Execute Code

  1. Download and unzip the attached folder
  2. Open Microsoft Excel
  3. Open Excel Example folder and run Excel_Example.exe

 

Requirements

Software

  1. LabWindows/CVI 2013 (or compatible)
  2. Microsoft Excel 2000 (or compatible)

 

Steps to Implement or Execute Code

  1. Right-click the Instruments folder in LabWindows/CVI and select "Load Instrument"
  2. Load the excel2000.fp file from the  "C:\Program Files (x86)\National Instruments\CVI2013\toolslib\activex\excel" (or similar) directory
  3. Add the instrument to your project (Edit » Add Files to Project » Instrument).
  4. You can access the help for a function by double clicking the function in the Instruments library, right clicking anywhere on the function panel for general information and Function Help, or right clicking in each control for Control Help.

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

Jason H
Automated Test Software R&D

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

Comments
Sam.Huang
Member
Member
on

It's great code for me,thanks!