poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Beardsley <markbrd...@tiscali.co.uk>
Subject Re: protected Sheet and another Options
Date Fri, 18 Mar 2011 14:45:15 GMT
Which stream are you targetting? Are you building binary (.xls) workbooks
with HSSF or OOXML based ones (.xlsx) with XSSF? If the former, then I am
sorry to say that you cannot exercise such fine grained control over the
protection options with HSSF. Your best option would be to create a template
file using Excel and set the protection as you desire on it. Next, open that
template using HSSF and populate them re-save the workbook. HSSF sgould
preserve the protection options you selected.

XSSF on the other hand does allow you more fine grained control over the
worksheets protection. Take a look at the lockFormatCells(),
lockFormatColumns(), etc methods defined on the XSSFSheet class.

Yours

Mark B

--
View this message in context: http://apache-poi.1045710.n5.nabble.com/protected-Sheet-and-another-Options-tp3875101p3965773.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message