Password to modify is lost in OOXML files. Cells 8.6.0.0

Scenario: Open any write-protected XLSB/XLSM/XLSX… file and save it. Open resaved file with Excel.


Issue:
  • Excel does not ask for password to modify.
  • In case of XLSB file, it seems that “Recommended read-only” is set in addition to the loss of write-protection (see screenshot).

Code:

var w = new Workbook(“sample.xlsb”);
w.Save(“sample-resaved.xlsb”);

Thanks,
Alex Shloma

The same for XLT file.


But works fine for XLS.

Hi,


Thanks for providing us template file and sample code.

After an initial test, I observed the issue as you mentioned. I found Password to modify is lost in the output OOXML file. I simply open and re-saved the template XLSB file provided you with the following sample code:
e.g
Sample code:

var w = new Workbook(“e:\test2\sample.xlsb”, new LoadOptions(LoadFormat.Xlsb));
w.Save(“e:\test2\out1.xlsb”, SaveFormat.Xlsb);

I have logged a ticket with an id “CELLSNET-43951” for your issue. We will look into it to figure it out soon.

Thank you.
Hi,

LiteraCorp:
The same for XLT file.

But works fine for XLS.

Yes, you are right as I tested. I found the similar issue with your XLT file as well. I used the template file provided by you with the following sample code:
e.g
Sample code:

var w = new Workbook("e:\\test2\\xlt_M.xlt");
w.Save("e:\\test2\\out1.xlt");

The output XLT file looses Password to modify. I have logged this issue as well to attach with your existing issue "CELLSNET-43951". We will also consider this to figure out your issue for XLT file format.

Thank you.

Hi,


This is to inform you that we have fixed your issue logged earlier as CELLSNET-43951 for XLSB and XLT file formats. We will soon provide the fix after performing QA and including other enhancements and fixes.

Thank you.

Hi,

Thanks for your using Aspose.Cells.

Please download and try the latest fix: Aspose.Cells for .NET v8.6.0.4 and let us know your feedback.

Checked XLSB and XLT. Password to modify is remained.


Waiting for other OOXML formats (xlsx_M.xlsx, xltm_M.xltm…).

Another issue
Found issue with “xlt_OM.xlt” (attached). File becomes corrupted. MS Excel fails to repair file.

new Workbook(fi.FullName, new LoadOptions() { Password = “1” }).Save(“xlt_OM.xlt”);

And please create separate ticket in your issue tracking system for the following bug in order not to forget about it:


In case of XLSB file “Recommended read-only” is set (see screenshot from the very first post).

File: xlsb_OM.xlsb.
Hi,

LiteraCorp:
Checked XLSB and XLT. Password to modify is remained.

Waiting for other OOXML formats (xlsx_M.xlsx, xltm_M.xltm...).

Please share samples for XLSX & XLTM formats so we could check the scenario and log appropriate tickets, if required.

LiteraCorp:
Another issue
Found issue with "xlt_OM.xlt" (attached). File becomes corrupted. MS Excel fails to repair file.

new Workbook(fi.FullName, new LoadOptions() { Password = "1" }).Save("xlt_OM.xlt");

In order to keep the tracking simple and efficient, I have already posted the concerns as quoted above in a new thread, and attached an appropriate ticket for notifications.
LiteraCorp:
And please create separate ticket in your issue tracking system for the following bug in order not to forget about it:

In case of XLSB file "Recommended read-only" is set (see screenshot from the very first post).

File: xlsb_OM.xlsb.

Hi,

Thank you for the sample file.

We have evaluated the presented scenario against the latest version of Aspose.Cells for .NET 8.6.0.4, and we are able to replicate the problem on our side. Excel 2013 x64 shows an additional dialog to recommend the loading of resultant spreadsheet in read-only mode as shown in the attached snapshot. We have logged this incident as CELLSNET-43968 for further investigation. Please allow us some time to properly analyze the case, and get back to you with updates in this regard.
babar.raza:
Please share samples for XLSX & XLTM formats so we could check the scenario and log appropriate tickets, if required.

Here you are.

Hi,


Thank you for sharing more samples.

We have evaluated the case individually for each sample and here are the results for your reference.

  • XLSM: We are able to observe the problem that password to modify is lost after re-saving the spreadsheet with Aspose.Cells for .NET 8.6.0.4, therefore we have logged this case under the ticket CELLSNET-43973.
  • XLTX: The sample xltx_OM.xltx does not require the password to modify, however, it requires the password to open the spreadsheet. When we re-saved the spreadsheet with latest revision of the Aspose.Cells for .NET 8.6.0.4, the password to open the spreadsheet remained intact. Please check the attached archive for resultant files.
  • XLTM: Similar to above, the sample xltm_OM.xltm only requires the password to open the spreadsheet, that remained intact after re-saving it with latest revision of the API.
  • XLSX: The sample xlsx_M.xlsx seems to be the output as per your naming convention. Nevertheless, we tested it on our side, and found that password to open the spreadsheet remained intact after re-saving it with Aspose.Cells for .NET 8.6.0.4

Please check all the cases in your side as well and in case we have missed anything or you need to provide more samples to support the problem description then please feel free to comment.

xltx_OM.xltx, xltm_OM.xltm

  • First of all, to open template files you need to open Excel application and use Open Dialog. Otherwise password to modify is not checked, because Excel creates new file based on template, which is opened. Please make sure you do not open it by double-clicking on file in file explorer.
  • Also ensure you did not copy sample files to system folder (subfolder). I noticed that in folder ProgramData password to modify is not asked on my machine. Please, copy sample file to D:\ for example.
  • Have you tried *_M files (not *_OM)?

xlsx_M.xlsx

babar.raza:
Nevertheless, we tested it on our side, and found that password to open the spreadsheet remained intact after re-saving it with Aspose.Cells for .NET 8.6.0.4

But it does not contain password to open. It has password to modify. I retested and still - Excel does not ask for password to modify after resaving.


Hi again,


Thank you for sharing further details.

Please allow me to reevaluate the scenario as per your recommendations and get back to you with updates in this regard.

That said, the product team has marked the recently logged tickets as resolved so we are expecting the fix for CELLSNET-43973 & CELLSNET-43967 in couple of days. We will notify you here as soon as the next build of the API is available for your testing.

Hi Alex,


Thank you for your patience.

I have checked all the spreadsheets as per your instructions and found that Password to Modify is lost in all the cases. Furthermore, in case of spreadsheets ending with _M, I have noticed that the resultant spreadsheet still requires the password but it does not seem to be for editing access. Please check the attached snapshots for your reference.

I have logged my observations for product team’s review by logging separate ticket for each sample. Please find the defect tracking numbers against the supplied sample spreadsheets as follow.

  • CELLSNET-43977: xltx_OM.xltx
  • CELLSNET-43980: xltx_M.xltx
  • CELLSNET-43981: xltm_OM.xltm
  • CELLSNET-43982: xltm_M.xltm
  • CELLSNET-43983: xlsx_M.xlsx
  • CELLSNET-43984: xlsm_M.xlsm

Hi,

Thanks for using Aspose.Cells.

This is to inform you that we have fixed your issues CELLSNET-43977, CELLSNET-43981, CELLSNET-43982, CELLSNET-43983, CELLSNET-43984 and CELLSNET-43980 now. We will soon provide the fix after performing QA and including other enhancements and fixes.

Cool. Great work.


Please provide me with the latest build once it is available. Will retest and post results here.

Best regards,
Alex Shloma

Hi,

Thanks for your using Aspose.Cells.

We have fixed the issues CELLSNET-43968, CELLSNET-43973, CELLSNET-43977, CELLSNET-43980, CELLSNET-43981, CELLSNET-43982, CELLSNET-43983, CELLSNET-43984.

Please download and try the latest fix: Aspose.Cells for .NET v8.6.0.5 and let us know your feedback.

Hi,


Tested the latest DLL. Replicated the following issues:
  • xlsx_OM.xlsx. Password to modify is still lost.
  • xlsb_OM.xlsb. CELLSNET-43968 not fixed.
Best regards,
Alex Shloma

Hi Alex,


Thank you for writring back.

I have checked both of the mentioned issue on my side while using the latest version of Aspose.Cells for .NET 8.6.0.5, and I am able to replicate both issues. Please find the defect details as follow.

  • CELLSNET-43968: Re-opened the ticket for the issue related to the Read Only Recommendation message shown by Excel while opening the re-saved XLSB.
  • CELLSNET-43988: Logged a new ticket to address the problem of lost Password to Modify after re-saving the recently provided XLSX.

Our product team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.