Well, it both does and it does not. The protection model changed somewhat between versions and it is now possible - post Office 2007 - to create much finer grained locking. May I suggets that you look at the following methods, all of which are dfined on the XSSFSheet class;
enableLocking() lockAutoFilter() lockDeleteColumns() lockDeleteRows() lockFormatCells() lockFormatColumns() lockFormatRows() lockInsertColumns() lockInsertHyperlinks() lockInsertRows() lockObjects() lockPivotTables() lockScenarios() lockSelectLockedCells() lockSelectUnlockedCells() lockSort() So, you can protect the sheet - in fact, you have much more control over just what is locked - so that is the 'you can' bit. What you cannot do however - the 'it does not' bit of my op-ening statement - is allow you to set a password to restrict the user from making changes to the protection you have set; at least, I have not found that method yet. That is all very possible to do I am sure, given the flexibility of the xml format, it is only that the feature has not yet been added to the api. I wuld bet that you could guess what I am going to say now; would you be interested in working on this feature and contributing the work to the project? Yours Mark B PS, I think that I am correct to say that the idiom is to call whichever lockXXX() methods you want on the sheet and then the enableLocking() method to actually activate the lock. Sorry to say this, but I cannot remember off of the top of my head but you can always search back through a list as the question was asked a few weeks ago. Bugzilla from [email protected] wrote: > > https://issues.apache.org/bugzilla/show_bug.cgi?id=48900 > > Summary: XSSF doesn't have the method protectSheet as we have > for HSSF API > Product: POI > Version: 3.6 > Platform: PC > OS/Version: Windows XP > Status: NEW > Severity: blocker > Priority: P2 > Component: XSSF > AssignedTo: [email protected] > ReportedBy: [email protected] > > > XSSF doesn't have the method protectSheet as we have for HSSF API > > -- > Configure bugmail: > https://issues.apache.org/bugzilla/userprefs.cgi?tab=email > ------- You are receiving this mail because: ------- > You are the assignee for the bug. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > -- View this message in context: http://old.nabble.com/DO-NOT-REPLY--Bug-48900--New%3A-XSSF-doesn%27t-have-the-method-protectSheet-as-we-have-for-HSSF-API-tp27878972p27879896.html Sent from the POI - Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
