Example Code

Unprotect Excel Sheet with ActiveX 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 uses ActiveX to open and unprotect a protected Excel Worksheet.

 

Description

This example opens a reference to an Excel workbook, opens the workbook, and unprotects a sheet in the Excel workbook.

 

Requirements

  • LabVIEW 2012  (or compatible)

 

Steps to Implement or Execute Code

  1. Change file path to Excel file you want to open.
  2. Enter correct password for protected sheet.
  3. Click 'Run' or run arrow.

 

Additional Information or References

VI Snippet of Block Diagram

sni.png

 

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

------------------------------------------------------------------------------------------

Jon F.
Technical Support Engineer
National Instruments

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