title: read.xls() from gdata package fails with "no lines available in input"
body: <p>I am using <code>read.xls()</code> from the <code>gdata</code> package to read Excel workbooks where each workbook has one sheet. The read fails with the following error.</p>
  
  <pre><code>&gt; read.xls(list.files[[1]])
  Error in read.table(file = file, header = header, sep = sep, quote = quote,  : 
    no lines available in input
  </code></pre>
  
  <p>I can't figure out the error. <code>sheetCount()</code> returns the following error.</p>
  
  <pre><code>&gt; sheetCount(list.files[[1]])
  Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  : 
    line 161 did not have 13 elements
  </code></pre>
  
  <p>But this is odd, because the workbook has 27 columns. And nothing seems out of the ordinary for rows 161+/-1 or columns 13+/-1. </p>
  
  <p>Throughout the workbook repeated entries are blank and you're expected to manually extend them down (which is impractical for the 750+ workbooks that I would like to read). </p>
  
  <p>I tried manually setting <code>quote=''</code> and <code>quote='\''</code>, but these don't change the output. Is my problem that <code>read.xls()</code> sees some rows as ragged but not others? Any pointers? (I tried the <code>xlsReadWrite</code> package, but I am on 64bit Win 7 and it only works on 32bit systems).</p>
  
  <p>Thanks!</p>
  
  <hr>
  
  <p>Update </p>
  
  <p>I followed @G. Grothendieck's suggestions and get the following.</p>
  
  <pre><code>&gt; k &lt;- count.fields(xls2csv(list.xls[[1]]), sep = ","); k
  NULL
  &gt; L &lt;- readLines(xls2csv(list.xls[[1]])); L
  character(0)
  </code></pre>
  
  <p>The temp file that <code>xls2csv()</code> generates is empty, so now I can't figure out why my <code>countSheets()</code> call returns the "line 161, column 13" error.</p>
  
  <p>I also followed @Joran's suggestions and converted the .xls file to a .csv file in Libre Office and it converts and reads just fine (i.e., it counts 27 fields in all 236 lines and logical <code>readLines()</code> output).</p>
  
  <hr>
  
  <p>Update 2</p>
  
  <p>I should add that I <em>think</em> that these .xls files are <em>not</em> generated by Excel (my source is a little secretive about their origin), but I don't get any errors or warnings when I open them in Libre Office. </p>