Thank you so many work on this. It helped me to clear that cause excel'self, I 
would ask some excel expert to know it is possible using something like script 
or else.

Thank you again.


-----Original Message-----
From: Mark Beardsley [mailto:[email protected]] 
Sent: 2011年3月20日 20:09
To: [email protected]
Subject: RE: Regarding allow delete the rows on protect sheet

It looks as though my first reply was correct; I have not been able to use
Excel to emulate the behaviour you described. This morning, I did the
following with Excel.

* Populate cells in the first four columns with dummy data.
* Unlock the cells in columns A and C
* Review>Protect Sheet>Check 'Delete Rows' option. Do not enter a password
and select OK
* Can edit the data in the unlocked cells. Any attempt to edit data in the
locked cells results in Excel  
   displaying and error message.
* Can select the row but am not able to delete the row. Excel displays an
error message indicating that 
   there are locked cells on the row and that these prevent the row from
being deleted. The only way to 
   proceed is to remove the protection from the sheet and then to delete the
row.

Then ran a second test to see if starting with a row eher all of the cells
were unlocked would help.

* Select row.
* Right click and select the format cells option. Deselect the locked option
on the Protection tab and OK 
   out.
* Populate cells in the first four columns with data.
* Lock cells in columns B and D
* Protect the sheet and select to allow the user to delete rows again.
* Am able to edit data in the unlocked cells.
* Again, am unable to delete the row for exactly the same reason, it
contains locked cells.

Finally, I repeated the above two tests with a password specified and
exactly the same behaviour was observed.

>From this, it seems as though it is not possible to have a row with locked
cells, to then protect the sheet and make it possible for the user to delete
that row. The locked cells always seem to inhibit the delete operation even
with the 'Delete Row' option selected. Interestingly, Excel does display the
delete option when you select a row and then right click on it. Selecting
the delete option from that pop-up menu only results in an error message
being displayed if there are any locked cells I am sorry to say. Yesterday,
I did not attempt to delete the row, rather assumed from the fact that the
delete option was available on the pop-up menu after selectng the 'Delete
Row' option on the Sheet Protection tab meant that it was possible to delete
the row.

At this point, all I can suggest is that you speak to an experienced user of
Excel within your organisation, or join an Excel users forum and ask how to
accomplish the task using Excel. If you can discover this, it may be
possible to emulate the process through POI.

Yours

Mark B

PS The only real difference I noticed between selecting the 'Delete Row'
option and de-selecting it was the availability of the delete option on a
pop-up menu when I right clicked after selecting the row. Selecting the
'Delete Row' option made the delete option available, de-selecting it made
that option unavailable.

--
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/Regarding-BigGridDemo-Special-characters-issue-tp3965446p4133594.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to