Home > Back-end > Java import excel when, how to verify the protection of the workbook password is correct? Pray god g
Java import excel when, how to verify the protection of the workbook password is correct? Pray god g
Time:04-02
Does anyone know the Java import excel when, how to verify the protection of the workbook password is correct?
Correct password is known, the password when I export has been set up, such as sheet, protectSheet (new String (" 123456 "));//123456 is password.
But how can I import again to verify the correctness of this password,
The diagram below:
CodePudding user response:
Great god teach genuflect is begged!!!!!!!!!!
CodePudding user response:
First check when the import correctness refers to enter a password when reading the book?
The Decryptor. GetInstance (new EncryptionInfo (new NPOIFSFileSystem (File File, Boolean readOnly))). The verifyPassword (password);
Have you ever been tampered with or to verify the password of the workbook?
Will correspond to the password stored in export, and then check when the import
CodePudding user response:
Right, it is to point to read the workbook inside data validates the workbook to protect password is correct, the correct password is known, the need of the import according to the known correct password authentication import file workbook password is correct, objective: rules can only be used when the user action by the system of export excel template, to import the data update, as shown in figure 1 and figure 2, figure a, figure 2