Example Code

Copy a Worksheet in Excel Using ActiveX controls with 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 VI demonstrates how to copy a worksheet in Excel using ActiveX controls.

 
Description

This VI can open Excel, copy the sheet specified by Master Sheet Name, rename the copied sheet according to New Sheet Name, and move that newly named sheet to the end (right most position) of all the sheets.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Browse the folder where you will save your new excel file.
  2. Run the VI.
  3. Open the excel file, you will find a new worksheet has been copied.

Additional Information or References
VI Snippet

003.png

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

Sarah Yost
Senior Product Marketing Manager

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

Comments
Gallagher_49684
Member
Member
on

Extremely helpful, thanks!

emottin
Member
Member
on

This is exactly what I need... It's copy also the graphs , thanks!

MartinNilsson
Member
Member
on

That's great, thank you, Sarah!

All I have to do now, is to figure out which references to close and which references to update when I use your example together with the LV MS Office tool kit.