We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Hidden column became visible after protecting sheet

Hi there.

I have a excel sheet with column A/B/C be hidden.
when protect with following code, the hidden column becomes visible.
So can you help to figure out what’s wrong with my code?

[Attachment is the test excel file.]

Workbook wb = new Workbook();
try {
int count = wb.getWorksheets().size();

//Setup protection property
Protection p = new Protection();

for (int i= 0; i< count; i++) {


wb.protectWorkbook(ProtectionType.STRUCTURE, password);

wb.save(fileName, FileFormatType.EXCEL97 );


Supplement for the above question:
When save excel file using workbook.save(xlsName) which has hidden columns,
the hidden column became visible.
so this means it is not related with protecting sheets.


Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

I tested your sample code with your template file and latest Aspose.Cells version (attached) and it works fine. Please try the attached latest version of Aspose.Cells and check if it works fine for you.

Thank You & Best Regards,


Could you tell me what’s the difference between v2.1.1 and latest version you sent me.



The latest version v2.1.1.16 (i.e. in the format/series v2.1.1.x - provided by Nausherwan) is actually a bug fix version posted in the forums for the users. Normally, we post the bug fixes in the forums dynamically at runtime for the users need. Suppose, a user points out a bug or demand for a new feature and if he has no time to wait until the next official release/hotfix is out, we always consider providing him with an intermediate build that resolves his problem immediately. However, the next official release of the product will always include the
functionality of the all the previous fixes (which we posted in the

Moreover, you may use this fix as long as you wish without any problem, it will behave like an official release.

Feel free to contact us any time if you have further questions/queries.

Thank you.