Excel Decryption for XLS in C# and VB.NET

XLS decryption enables you to read files that are encrypted with a password.

GemBox.Spreadsheet currently doesn't support encryption of XLS files (saving password protected files).

The following example shows how to load an encrypted XLS file and save it to another file format in C# and VB.NET.

XLS file decrypted with GemBox.Spreadsheet
Screenshot of XLS file decrypted with GemBox.Spreadsheet
Upload your file (Drag file here)
using GemBox.Spreadsheet;

class Program
    static void Main()
        // If using Professional version, put your serial key below.

        var inputPassword = "%InputPassword%";

        var workbook = ExcelFile.Load("%InputFileName%", new XlsLoadOptions() { Password = inputPassword });

        workbook.Save("Decrypted File.%OutputFileType%");
Imports GemBox.Spreadsheet

Module Program

    Sub Main()

        ' If using Professional version, put your serial key below.

        Dim inputPassword = "%InputPassword%"

        Dim workbook = ExcelFile.Load("%InputFileName%", New XlsLoadOptions With {.Password = inputPassword})

        workbook.Save("Decrypted File.%OutputFileType%")
    End Sub
End Module

Want more?

Next example GitHub

Check the next example or select an example from the menu. You can also download our examples from the GitHub.

Like it?

Download Buy

If you want to try the GemBox.Spreadsheet yourself, you can download the free version. It delivers the same performance and set of features as the professional version, but with some operations limited. To remove the limitation, you need to purchase a license.