This probably will not matter but I did find a 'hole' in the protection. If the user turns off the worksheet protection, selects a cell by clicking on it and then turns the protection on again they can copy and paste the contents of the cell they clicked on. Of course, they will not be able to paste onto the same sheet but I managed to copy data between applications - Excel and Wordpad - quite by accident in this manner. It is likely that will not affect your application as the users may not be able to turn the protection off but I found it - sadly - quite interesting.
kevintong wrote: > > Hello Mark B, > > What I'm trying to do now is protect the worksheet, disable all the user > function(even selecting cell). And then protect the workbook for > structure. > > I'm now using a empty excel file for templete, both worksheet and workbook > are protected with out password. I use my JAVA programe to read that > templete and save as another file after input all the data in it. > I use "protectSheet()" in HSSFSheet class to set the password for the > worksheet. However, I cannot set the password for the workbook, is there > any function to do so?? Or is there any function to protect the workbook > for structure?? > > Thanks > > kevin > > > MSB wrote: >> >> Hello, >> >> Is it possible to do this using Excel itself? The reason I ask is that I >> am not sure you could prevent anyone from copying information from a >> sheet but I could be wrong. >> >> The first thing I do if I am unsure about how to accomplish anything is >> to try and do it using Excel. That often indicates whether the setting I >> am after applies to the workbook, a sheet, etc. Also, it helps to point >> me in the direction of the setting I am after. If I have the time, and I >> cannot promise anything as I am working on another project for a list >> member currently, then I will take a look. >> >> Yours >> >> Mark B >> >> >> kevintong wrote: >>> >>> I have a JAVA program which uses POI library to generate a xls file, and >>> I want to prevent users to add, delete or copy the worksheets. I try to >>> use the writeProtectWorkbook function in HSSFWorkbook class, but it >>> doesn't work. Is there any other way to do so? >>> Please advice, thank you very much! >>> >>> Kevin >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/Protect-workbook-for-structure-tp24316602p24322619.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]
