...
Encryption can be performed on the workbook level, as shown below:
Code Block | |||||||
---|---|---|---|---|---|---|---|
| |||||||
//--- To encrypt a workbook, use the Workbook.EncryptPassword property: ExcelApplication xlw = new ExcelApplication(); Workbook wb = xlw.Create(); wb.EncryptPassword = "myPassword"; xlw.Save(wb, outPath); |
...