title: How to fix "Error: `path` does not exist:" and "Contains magic number?"
body: <p>I'm trying to read a .xls file but it is not working. It either says that the file-path does not exist, that the file is corrupted or that it contains a magic number. When manually selecting the file it also does not work, but I can open the excel file just fine.</p>
  
  <p>I was initially trying to convert the xls file to CSV and reading it using <code>read.csv</code>, then I started using <code>read_excel</code> directly with the xls file</p>
  
  <pre><code>load("~/Downloads/Crime2018EXCEL/noncampusarrest151617.xls")
  </code></pre>
  
  <blockquote>
    <p>Error in load("~/Downloads/Crime2018EXCEL/noncampusarrest151617.xls") :<br>
          bad restore file magic number (file may be corrupted) -- no data loaded<br>
        In addition: Warning messages:<br>
        1: In grepl("RD[ABX][2-9]\n", magic) :<br>
          input string 1 is invalid in this locale<br>
        2: In grepl("RD[ABX][2-9]\r", magic) :<br>
          input string 1 is invalid in this locale<br>
        3: file ‘noncampusarrest151617.xls’ has magic number '������������������������'<br>
          Use of save versions prior to 2 is deprecated </p>
  </blockquote>
  
  <pre><code>crimestat&lt;-read_xls("oncampuscrime151617.xls") #You might need to change the filepath
  </code></pre>
  
  <blockquote>
    <p>Error: <code>path</code> does not exist: ‘oncampuscrime151617.xls’</p>
  </blockquote>