Trying to open an encrypted XLS file and save it without password

Hi
Thanks for your update. I have tried it with DOC files and it works.
But now I am trying to open an encrypted XLS file and save it without password. It does not work. The document is still encrypted:

LoadOptions loCells = new LoadOptions(Aspose.Cells.LoadFormat.Excel97To2003);
loCells.Password = inputPassword;
data = new Aspose.Cells.Workbook(inputFile, loCells);
((Aspose.Cells.Workbook)data).Save(outputFile,Aspose.Cells.SaveFormat.Excel97To2003);

The encrypted XLS document is attached. Password=1234

Thanks



Hi,

Thanks for your posting and using Aspose.Cells.

Please set the Workbook.Settings.Password to empty string, then your issue will be fixed. I have tested this issue with the latest version:
Aspose.Cells for .NET 8.8.0.

Please see the following sample code. I have attached the source excel file and the output excel file which opens fine and do not ask for password for your reference.

C#
LoadOptions loCells = new LoadOptions(Aspose.Cells.LoadFormat.Excel97To2003);
loCells.Password = “1234”;

Workbook data = new Aspose.Cells.Workbook(“encrypted.xls”, loCells);

data.Settings.Password = “”;

data.Save(“out.xls”, Aspose.Cells.SaveFormat.Excel97To2003);