kant
kant

Reputation: 157

Managing MS Excel's Worksheet protection properties using java

I need to prevent editing, copying and selecting cells in worksheet, but there should be a possibility to change width and height of rows and columns. I can do this using Excel Application by choosing different protection options but i cannot find anything like this in java libraries. I mean I can set password to make document read-only but user still can copy information and change it. I need a tool which will allow to change protection properties of worksheet programmatically.

Is there anything like this in such libraries as apache poi or jxl? if not is there any library which can do it (much better if it will be free-to-use)?

Thanks for your replies and sorry for my english :)

Upvotes: 0

Views: 1558

Answers (1)

shreyu108
shreyu108

Reputation: 51

to make your excel-sheet protected do this: sheet.getSettings().setProtected(true);

and to password-protect your sheets-individually do this: sheet.getSettings().setPassword("password");

but...i've seen that password doesnt work..

Upvotes: 1

Related Questions