title: Error in xlsx package while reading multiple xlsx files from a directory
body: <p>I'm writing a code to read data from a directory. The files have different extensions such as xlsx, xls, CSV etc. I'm using if else conditions to read different formats. My snippet to read xlsx files is as follows:</p>
  <pre><code>inputPath = &quot;C:/work1/Apple/Data/LA/Test/L3&quot;
  if(str_detect(string = inputPath, pattern = &quot;.xlsx&quot;)) {
      dataInput = read.xlsx(xlsxFile = filePath,
                            sheet = 1)}
  </code></pre>
  <p>When I run this code, I get an error like this and the traceback is as follows:</p>
  <pre><code> Error in file(description = xlsxFile) : invalid 'description' argument 
  4.
  file(description = xlsxFile) 
  3.
  getFile(xlsxFile) 
  2.
  read.xlsx.default(xlsxFile = inputPath, sheet = 1) 
  1.
  read.xlsx(xlsxFile = inputPath, sheet = 1) 
  </code></pre>
  <p>I have created this input path as follows:</p>
  <pre><code>identifier = &quot;Test&quot;
  dataDirPath = file.path(getwd(), &quot;Data/LA&quot;, identifier)
  mode = &quot;L3&quot;
  inputPath = list.files(file.path(dataDirPath, mode), full.names = TRUE)
  </code></pre>
  <p>inputPath contains this:</p>
  <pre><code>&gt; inputPath
  [1] &quot;C:/work1/Apple/Data/LA/Test/L3/12303?????????(???????).xlsx&quot;
  [2] &quot;C:/work1/Apple/Data/LA/Test/L3/12306?????????(???????).xlsx&quot;
  [3] &quot;C:/work1/Apple/Data/LA/Test/L3/12309?????????(???????).xlsx&quot;
  [4] &quot;C:/work1/Apple/Data/LA/Test/L3/12312?????????(???????).xlsx&quot;
  [5] &quot;C:/work1/Apple/Data/LA/Test/L3/34503?????????(???????).xlsx&quot;
  [6] &quot;C:/work1/Apple/Data/LA/Test/L3/34506?????????(???????).xlsx&quot;
  [7] &quot;C:/work1/Apple/Data/LA/Test/L3/34509?????????(???????).xlsx&quot;
  [8] &quot;C:/work1/Apple/Data/LA/Test/L3/34512?????????(???????).xlsx&quot;
  [9] &quot;C:/work1/Apple/Data/LA/Test/L3/56703?????????(???????).xlsx&quot;
  &gt; 
  </code></pre>
  <p>One thing is that the files in this directory contains japanese characters and some numbers.
  Here in the above inputPath output, '?' actually contains japanese characters. But code doesn't read it.</p>
  <p>Note: I have set the locales to Japanese at the start itself.</p>
  <p>For example,</p>
  <p>1234林檎.xlsx</p>
  <p>Is there anything wrong here?</p>