title: Reading a password-protected xlsx-file into R without installing Java (password is known)
body: <p>currently I am preparing an R-lesson for a customer. We want to read in data from a password protected xlsx file. Thus, I am trying to read this password protected xlsx file into R (unprotecting the file itself is no solution). Unfortunately I cannot use ways that include installing additional software, such as Java.</p>
  <p>Neither <strong>openxlsx</strong>, <strong>readr</strong> nor <strong>readxl</strong> seem to support using passwords when reading in excel files.</p>
  <p>There are two packages which seem to support this: <strong>xlsx</strong> and <strong>excel.link</strong>
  I have tried the <strong>xlsx</strong> package but it requires Java. So does <strong>XLConnect</strong></p>
  <p>I have tried the <strong>excel.link</strong> package but it just crashes (&quot;R session aborted&quot;) everytime I try to open the file. So does <strong>RDCOMClient</strong>.</p>
  <p>Stackoverflow postings that unfortunately were not suitable answers to my problem:</p>
  <p><a href="https://stackoverflow.com/questions/35852722/how-do-you-read-a-password-protected-excel-file-into-r">How do you read a password protected excel file into r?</a></p>
  <p><a href="https://stackoverflow.com/questions/34233738/how-to-read-an-xls-file-that-is-encrypted-with-r">How to read an .xls file that is encrypted with R?</a></p>
  <p><a href="https://stackoverflow.com/questions/13996740/import-password-protected-xlsx-workbook-into-r">Import password-protected xlsx workbook into R</a></p>
  <p><a href="https://stackoverflow.com/questions/61962466/reading-any-kind-of-password-protected-file-into-r">Reading Any kind of password protected file into R</a></p>
  <p><a href="https://stackoverflow.com/questions/34233738/how-to-read-an-xls-file-that-is-encrypted-with-r">How to read an .xls file that is encrypted with R?</a></p>
  <p>After encountering these problems I just updated all my packages. Here is info on my R-version.</p>
  <pre><code> version
                 _                           
  platform       x86_64-w64-mingw32          
  arch           x86_64                      
  os             mingw32                     
  system         x86_64, mingw32             
  status                                     
  major          4                           
  minor          0.3                         
  year           2020                        
  month          10                          
  day            10                          
  svn rev        79318                       
  language       R                           
  version.string R version 4.0.3 (2020-10-10)
  nickname       Bunny-Wunnies Freak Out     
  </code></pre>
  <p>Do you know any other packages that fit my needs? Do you alternatively have any clue why both excel.link and RODCOMClient seem not to work at all?</p>
  <p>Thank you very much for any suggestions!</p>