[R] RODBC / odbcConnectExcel Issue

From: Vishal Belsare <shoot.spam_at_gmail.com>
Date: Fri, 04 Apr 2008 15:16:23 +0530

Can someone throw light on the following problem I am having with RODBC? There's an Excel file I am trying to read from, it has one sheet named 'nameclass'.

Thanks in anticipation.

Vishal Belsare

> library(RODBC)
> con = odbcConnectExcel(file.choose())
> tbls <- sqlTables(con)
> tbls

1 T:\\data\\in\\nameclass        <NA> nameclass$ SYSTEM TABLE    <NA>

> qry = paste("SELECT * FROM '",tbls$TABLE_NAME[1],"'",sep="")
> result = sqlQuery(con,qry)
> result

[1] "[RODBC] ERROR: Could not SQLExecDirect"

[2] "42000 -3506 [Microsoft][ODBC Excel Driver] Syntax error in FROM clause."

        [[alternative HTML version deleted]]

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. Received on Fri 04 Apr 2008 - 09:49:31 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 04 Apr 2008 - 14:30:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive