title: annoying "feature" (or bugs?) for RODBC
body: <p>RODBC is the main library in R to import data from a database into R. <code>RODBC</code> seems to have the ability of &quot;guess&quot; the datatype of the column which I find it particularly annoying.</p>
  <p>I have uploaded a file <code>test.xls</code> <a href="http://www.sendspace.com/file/m144px" rel="nofollow noreferrer">here</a>, or you may create a xls file yourself:</p>
  <ol>
  <li>create 2 columns, first column named <code>col_a</code> and the second column named <code>col_b</code>.</li>
  <li>type whatever you like in <code>col_a</code>, I typed letters on this column for 92 rows</li>
  <li>at the 92th row of col_b, type a number there, I typed &quot;1923&quot; without changing the data type (i.e. not using <code>'</code>)</li>
  <li>try to import the xls file into R using the following script:</li>
  </ol>
  <hr />
  <pre><code>library(RODBC)
  
  setwd(&quot;C:/Users/hke775/Documents/Enoch/MISC/R_problems/RODBC&quot;)
  channel &lt;- odbcConnectExcel(&quot;test.xls&quot;,readOnly=TRUE)
  dummy.df &lt;- sqlFetch(channel,&quot;Sheet1&quot;)
  odbcClose(channel)
  </code></pre>
  <hr />
  <p>You will see that in <code>dummy.df</code>, <code>col_b</code> is all <code>NA</code>, the <code>1923</code> in this column is gone.</p>
  <p>If you want to see the <code>1923</code> again, you can change the 1st row of <code>col_b</code> to a number, and it is back again.</p>
  <p>This is very annoying as I don't prefer modifying data manually. I need to use other package to do the xls importing, but I can't find other packages do as smooth as <code>RODBC</code> (I tried <code>gdata</code> and <code>xlsReadWrite</code>).</p>
  <p>Did I missing anything in the <code>sqlFetch</code> command, and cause the trouble? Thanks.</p>