Hello Team,
I was trying to set Locked property of a cell using following code snippet from the Aspose examples -
Workbook excel = new Workbook(dataDir + "Book1.xlsx");
WorksheetCollection worksheets = excel.getWorksheets();
Worksheet worksheet = worksheets.get(0);
worksheet.getCells().get("A1").getStyle().setLocked(true);
// Saving the modified Excel file Excel XP format
excel.save(dataDir + "LockCell_out.xlsx");
But this is not working …
Before executing the above code I created new blank Book1.xlsx file. Opened it and set the “Locked” property under protection tab of format cell of cell “A1”
Then I Executed Above code which created LockCell_out.xlsx file
When I opened LockCell_out.xlsx after executing above code I can still see the “Locked” does not get checked under the protection tab of format cell menu for Cell A1.
Can you please let me know what I am missing here ?
Regards
Mukul