Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Encryption can be performed on the workbook level, as shown below:

Workbook Encryption

Note
Code Block
c#
c#
titleWorkbook Encryption

//--- To encrypt a workbook, use the Workbook.EncryptPassword property:
ExcelApplication xlw = new ExcelApplication();
Workbook wb = xlw.Create();
wb.EncryptPassword = "myPassword";
xlw.Save(wb, outPath); 

How to Activate Worksheet Protection with ExcelWriter

...