In C #, how can I create a PASSWORD IS PROTECTED (the user must enter a password to open the file at all) .XLS file without installing Excel (therefore, not Interop)? NPOI and ExcelLibrary look promising (because they are free!), But I can not find anywhere, regardless of whether they really support password protection. I cannot use EPPlus as it deals only with .XSLX files and not with my required .XLS.
In addition, I would like to use an array to populate the data, not a cell by cell. Here is what I did for this when I used Interop in the past, which was infinitely faster than the cell by cell method:
object[,] data = new object[length, ColumnHeaders.Count];
...
dynamic rg = excelApp.Sheets[p].Range[excelApp.Sheets[p].Cells[top, left], excelApp.Sheets[p].Cells[bottom, right]];
rg.Value = data;
source
share