In the POI XSSFWorkbook, the methods lockStructure and lockWindows exist with which an Excel Workbook can be protected. (Function in excel menue under "Review->Protect Workbook...")
The function of these methods is analogous to the Workbook.protect method in Excel:
https://learn.microsoft.com/en-us/office/vba/api/excel.workbook.protect
Is there any way to enable this protection in a HSSFWorkbook?
I have already tried the writeProtectWorkbook method from HSSFWorkbook, but it does not do the same as the methods in the XSSFWorkbook. The method writeProtectWorkbook sets an open password.
Probably I have to modify the "worksheet protection block" which is described in section 5.82 here on page 200: http://www.openoffice.org/sc/excelfileformat.pdf
Does anyone know how I can get this block with POI?
I use poi:5.0.0.
Structure lock in HSSFWorkbook possible?
390 Views Asked by Lars At
1
There are 1 best solutions below
Related Questions in JAVA
- I need the BIRT.war that is compatible with Java 17 and Tomcat 10
- Creating global Class holder
- No method found for class java.lang.String in Kafka
- Issue edit a jtable with a pictures
- getting error when trying to launch kotlin jar file that use supabase "java.lang.NoClassDefFoundError"
- Does the && (logical AND) operator have a higher precedence than || (logical OR) operator in Java?
- Mixed color rendering in a JTable
- HTTPS configuration in Spring Boot, server returning timeout
- How to use Layout to create textfields which dont increase in size?
- Function for making the code wait in javafx
- How to create beans of the same class for multiple template parameters in Spring
- How could you print a specific String from an array with the values of an array from a double array on the same line, using iteration to print all?
- org.telegram.telegrambots.meta.exceptions.TelegramApiException: Bot token and username can't be empty
- Accessing Secret Variables in Classic Pipelines through Java app in Azure DevOps
- Postgres && statement Error in Mybatis Mapper?
Related Questions in EXCEL
- Power Query / M Code, extract a list of tables into one main table, some column headers same but some different and in different order (and in row 2)
- Is there a way to validate the cell format (from excel) to fetch the symbol from it (in Java)?
- Excel - Visual Basic, macro with autofill "1"
- Getting Run-time error '13': Type Mismatch using .Find
- Getting website metadata (Excel VBA/Python)
- Excel Code Editor doesn't work (blank window)
- How to find out how many of each 2, 3 and 4 required to fit in 100 using excel?
- How would I apply a rather complex summation formula like this in Excel?
- Removing a Button from Customized Excel Ribbon
- Excel - Update Item Description Based on Accessories Ordered with It
- select duplicates from data based on another column
- How to use VBA to bold just some text
- VBA Code to filter and get values from csv to excel worksheet
- Look up max alpha numeric value
- Azure Batch for Excel VBA
Related Questions in APACHE-POI
- Problem with sample code to set font properties for a whole XWPF Paragraph that includes Word fields
- Create filter on Integer column (with default values selected) while creating pivot table using apache poi
- Apache POI has some vulnerability with POI OOXML jar file
- The total number of document pages in the footer is not calculated correctly
- OutOfMemoryError: Java heap space. Read/Process Large Excel File(150MB) With Limited Memory (-Xmx130m) using Sax Parser
- Convert .docx to pdf using XDocReport
- Package[package ognl] of target class[class ognl.MethodFailedException] of target [ognl.MethodFailedException[java.lang.NoSuchFieldError:Factory]]
- word poi5.1.0 How to make chart add a series
- Is it possible to change Pivot Chart's (Pie chart) data color created using Pivot Table reference using Apache POI?
- Excel runs Apache-POI generated XLSX file but complains about working formula
- How to read Raw value rather then the formatted value from the excel sheet using POI library using XSSFReader class
- Apache POI Word insert both table and text at the same level
- Apache POI: get zoom level by using reflection
- APACHE POI: adding comment to existing word document
- Problem read formula excel file with apache poi
Related Questions in HSSFWORKBOOK
- How to create column in footer of Excel using HSSFFooter in Java
- Data Export to Excel using HSSFWorkbook Works Locally but Not on Test
- Java - How to extract text from an XLS which has wrong format/extension issue?
- java.net.SocketTimeoutException: Read timed out when reading Excel with Workbook
- Mentioned date format (dd/MM/yyyy) is not working for current date in excel using Apache Poi
- How can I insert value in the cell with style using POI
- My Android studio App is not creating XL File in download folder in all mobiles
- write large HSSFWorkbook into OutputStream with ZipOutputStream
- NPOI C#: best way from Workbook to byte[]
- No file are created when I use createNewFile()?
- Apache POI Cell - getCellStyle and CellStyle - setCellStyle gives different background colour
- Latest poi 5.2.1 version is having issue with HSSFWorkbook(fis)
- Excel dependent drop down list using Apache POI
- Attempt to write using POI 5.0.0 give java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook
- How to write data into multiple sheets in same excel
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I found out myself how to enable Workbook Protection. In the InternalWorkbook there is a list of records. These contain the record types ProtectRecord, WindowProtectRecord and PasswordRecord. With these you can set the Workbook Protection: