Bug 55130 - provide method HSSFSheet.lockSelectLockedCells
Summary: provide method HSSFSheet.lockSelectLockedCells
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: unspecified
Hardware: All All
: P2 enhancement with 4 votes (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-24 09:35 UTC by stefan
Modified: 2013-08-06 09:39 UTC (History)
0 users



Attachments
Protected Excel sheet where cells are selectable (17.00 KB, application/vnd.ms-excel)
2013-06-24 13:08 UTC, stefan
Details
Protected Excel sheet where cells are unselectable (17.00 KB, application/vnd.ms-excel)
2013-06-24 13:08 UTC, stefan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stefan 2013-06-24 09:35:35 UTC
Method XSSFSheet.lockSelectLockedCells allows to disable the cell selection for locked cells.  I wonder why this method is not available for HSSFSheets since the old Excel format (1997-2003) also supports this feature.  It would be great if we could set this flag via Apache POI.
Comment 1 Nick Burch 2013-06-24 11:10:28 UTC
Are you able to work out what record is involved, and what needs setting on it?

(If not, best way to find out is probably to create a file with that lock set in excel, then open a copy and change it to a lock format POI does support, then use BiffViewer to see what records changed)
Comment 2 stefan 2013-06-24 11:50:07 UTC
OK, I created two xls files: one with the selection lock and one without.  Unfortunately BiffViewer returned exactly the same output for both files. :(
If you like, I can send you both xls files.
Comment 3 Nick Burch 2013-06-24 12:37:48 UTC
Hmm, how odd. Might be worth trying one other kind of locking just to be sure. Otherwise, do please upload the two files, and hopefully at some point someone will work out what has changed...
Comment 4 stefan 2013-06-24 13:06:01 UTC
I made two more experiments with BiffViewer:
1) Comparing a protected document with an unprotected document.
2) Comparing two protected documents (one with "Format cells" check and one without this flag).

In case 1 I see a lot of differences in the BiffViewer output.  In case 2 the output is equal again.

So we know that BiffViewer is unable to recognize at least 2 of these options: 
http://www.lytebyte.com/wp-content/uploads/2009/06/protectsheetinexcel2007.png
Comment 5 stefan 2013-06-24 13:08:18 UTC
Created attachment 30479 [details]
Protected Excel sheet where cells are selectable
Comment 6 stefan 2013-06-24 13:08:41 UTC
Created attachment 30480 [details]
Protected Excel sheet where cells are unselectable