VIDEOS

How to Set a Password for a Workbook in C#

Regan Pun
Regan Pun
May 21, 2024
Share:


In the video tutorial, viewers are guided through the process of setting a password for an Excel workbook using IronXL in C#. The tutorial begins with ensuring that IronXL is installed and then proceeds to load an existing Excel file, 'sample.xlsx', into the workbook. The video demonstrates how to handle both non-protected and protected files by passing a password as a second argument when necessary. The main focus is on applying a security measure to the spreadsheet by utilizing the encrypt method to lock the workbook with a password. In this case, the password 'iron software' is used. After applying the password, the file is saved, and the project is executed, requiring the password to unlock the workbook. The successful application of password protection is confirmed by entering the password and accessing the file contents. The tutorial concludes by encouraging viewers to explore more functionalities of the IronXL library and inviting them to subscribe for additional tips and tricks. A link is provided in the description for downloading and installing IronXL to experience its capabilities firsthand.

Get stated with IronXL now.
green arrow pointer

Regan Pun
Software Engineer
Regan graduated from the University of Reading, with a BA in Electronic Engineering. Before joining Iron Software, his previous job roles had him laser-focused on single tasks; and what he most enjoys at Iron Software is the spectrum of work he gets to undertake, whether it’s adding value to sales, technical support, product development or marketing. He enjoys understanding the way developers are using the Iron Software library, and using that knowledge to continually improve documentation and develop the products.
< PREVIOUS
How to Set a Password on an Excel Worksheet in C#
NEXT >
How to Select a Range in Excel Using C#