[R] Errors in odbcConnectExcel()
田中 聡
sato_t1975 at yahoo.co.jp
Wed Sep 28 17:03:44 CEST 2005
Dear R-help
I would like to read Excel Spreadsheets using
odbcConnectExcel()
in RODBC, but data in the first row can not be read.
For example, I tried to read Excel file 'Book1.xls' in the
current Work Directory with the following data
(Range("A1:B5") in Excel),
1 19
2 27
3 61
4 76
5 98
My commands and the result are as follows.
> library(RODBC)
> Book1 <- odbcConnectExcel("Book1.xls")
> X <- sqlQuery(Book1, "select * from [Sheet1$]")
> X
F1 F2
1 2 27
2 3 61
3 4 76
4 5 98
You can easily see that first line has gone.
I also changed range to Range("A2:B6") in Excel,
but the result did not change.
What is the problem about my procedure?
OS:Windows XP
R :Version 2.1.1
Sincerely yours.
Satoshi
sato_t1975 at yahoo.co.jp
--------------------------------------
Know more about Breast Cancer
More information about the R-help
mailing list