Unlocked cells are correct in XLS but are locked in XLSX

The attached files are made identically using Aspose.Cells for .NET 5.0.0.11. The only difference is that one is saved as FileFormatType.Excel97To2003 and the other as FileFormatType.Xlsx. Look at any of the blue cells on the Inputs worksheet. In the XLS file they are unlocked (as they should be) but in the XLSX file they are locked.

The password is: 6215cfd3-c4d5-414f-afe8-ae8f0e5403c0

Thanks,
--Howard

Hi Howard,

We are able to observe that the cells are locked in Xlsx file where as cells are unlocked in Xls file. Please forward us the templete and the code for futher investigation.

Thanks,

Salman, thanks for looking at this. We don't have a "template" file per se. We generate the Excel entirely from a program (though the graphics are merged in.) The program is huge, but I have provided code snippets in the attached file.

Once again, I emphasize that the ONLY difference between those two files comes from the "format" argument to the GetStreamForXLS method.

--Howard

Hi Howard,

Thanks for providing sample code.

I tried to apply the unlock style code on XLSX files using both the approaches as followed in the sample code. That is, unlocking a cell using Cell.SetStyle and Range.ApplyStyle methods on some of the locked cells (with blue color) of the XLSX provided by you in your initial posts. Both methods successfully unlocked the desired cell(s). The Aspose.Cells version I used is attached with the post.

Try the attached version. If still there is a problem, please prepare a small application creating a simple workbook (may be containing only one worksheet with a few cells) so that we can reproduce and further investigate the issue.

Muhammad, I've tried our application with the latest code you provided and it works fine, so it looks like the problem has been fixed.

Unfortunately, in that release pivot tables are broken in XLSX files. I will report this on a separate thread.

Regards,
--Howard