You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by rsoese <rs...@gmx.de> on 2004/12/30 16:55:42 UTC
Lock Column and protect sheet
Hello,
I browsed through the Javadocs of the latest POI release and I could not
find out if there is a method for:
locking a column
protecting a sheet
The only thing that I found was a method to get to know if there is
protection.
Any ideas if/how I could accomplish my task?
thanks in advance,
Robert
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org
Re: Lock Column and protect sheet
Posted by Alex Karshakevich <al...@thoughtspeed.biz>.
You can also hide the column which holds your ids, that way the users
won't modify them as they won't even see them (set the column width to 0
to hide it). We are using that approach to keep some intermediate
calculation results that don't need to be shown to the user. If your
users won't be making changes on purpose this may be sufficent for you.
Alex.
rsoese wrote:
> To identify contentitems I export a unique id for each text cell.
> Those must not be modified by the user of the exel sheet. Therefore I
> would like to protect or lock those fields. A password is not
> neccessarry, as user will not destroy the sheet by purpose.
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org
Re: Lock Column and protect sheet
Posted by rsoese <rs...@gmx.de>.
Hi Andrew,
ca you give a code example how to lock a cell and how to protect a sheet.
For you to understand the background of my question: I export CMS data
to Excel for easy translation. Lateron I will reimport the translated
data. To identify contentitems I export a unique id for each text cell.
Those must not be modified by the user of the exel sheet. Therefore I
would like to protect or lock those fields. A password is not
neccessarry, as user will not destroy the sheet by purpose.
How would you do this with POI?
Thanks in advance.
Robert
Andrew Kharchuk wrote:
> As far as I know you can't lock column. You can lock cell.
>
> You can protect sheet using:
> 1. POI (without password)
> 2. template with VBA
>
>
> ----- Original Message ----- From: "rsoese" <rs...@gmx.de>
> To: <po...@jakarta.apache.org>
> Sent: Thursday, December 30, 2004 5:55 PM
> Subject: Lock Column and protect sheet
>
>
>> Hello,
>>
>> I browsed through the Javadocs of the latest POI release and I could
>> not find out if there is a method for:
>>
>> locking a column
>> protecting a sheet
>>
>> The only thing that I found was a method to get to know if there is
>> protection.
>>
>> Any ideas if/how I could accomplish my task?
>>
>> thanks in advance,
>>
>> Robert
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: poi-user-help@jakarta.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org
Re: Lock Column and protect sheet
Posted by Andrew Kharchuk <ak...@ukraina.com>.
As far as I know you can't lock column. You can lock cell.
You can protect sheet using:
1. POI (without password)
2. template with VBA
----- Original Message -----
From: "rsoese" <rs...@gmx.de>
To: <po...@jakarta.apache.org>
Sent: Thursday, December 30, 2004 5:55 PM
Subject: Lock Column and protect sheet
> Hello,
>
> I browsed through the Javadocs of the latest POI release and I could not
> find out if there is a method for:
>
> locking a column
> protecting a sheet
>
> The only thing that I found was a method to get to know if there is
> protection.
>
> Any ideas if/how I could accomplish my task?
>
> thanks in advance,
>
> Robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org