[R] Re ading Excel 5.0 files with RODBC?

Yuri Volchik yuri.volchik at gmail.com
Wed Apr 8 16:23:43 CEST 2009


Seems like the place where i get those files from has an error somewhere when
they create the file which doesn't allow ODBC to see sheet with data, i.e
sqlTables returns:
[1] TABLE_CAT   TABLE_SCHEM TABLE_NAME  TABLE_TYPE  REMARKS    
<0 rows> (or 0-length row.names)

When i open this file in excel 2003 and try to save it, i get a message that
this file is of Excel 5.0 format (but the original file has more than 16k
rows which is impossible with excel 5.0 format) and information wil be lost.
When i save it on my pc either in excel 5.0 or excel 97 format i can open it
with RODBC with no problems so the problem has to be with the way original
xls files are created.
Thanks a lot for all replies.



Prof Brian Ripley wrote:
> 
> On Wed, 8 Apr 2009, Yuri Volchik wrote:
> 
>>
>> Thanks for reply David,
>>
>> but the problem is that the place i get those files from saves them in
>> the
>> old Excel format (Excel 5.0), not Excel 97-2003, so neither of the
>> packages
>> (RODBC, xlsReadWrite) can read it.
> 
> RODBC supports any format for which an ODBC driver is installed and 
> Microsoft have long supplied ones for Excel 3.0 and later (up to Excel 
> 2007 at present).
> 
> -- 
> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: http://www.nabble.com/Reading-Excel-5.0-files-with-RODBC--tp22929781p22951583.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list