title: Get the excel workbook password using Apache POI
body: <p>I am trying to read an excel sheet of data, I am able to get the data and read it using <code>HSSFWorkbook</code> Everything works well, I am able to get the data. </p>
  
  <p>I have set a password for the workbook, manually in the excel sheet <code>Protect Workbook</code> to "ABCXYZ" and while opening the excel file it will ask me the password and only after the password in correct it lets me in to write or read the excel file.  </p>
  
  <p>My question is how to get this password "ABCXYZ" in the java program.</p>
  
  <pre><code>HSSFWorkbook wb = new HSSFWorkbook(inputStream);
  wb.isWriteProtected();--&gt; This returns false.
  </code></pre>