Displaying 20 results from an estimated 2000 matches similar to: "Re ading multiple Excel 2007 files with a loop"
2009 Apr 27
1
RODBC - XLSX files - dropping/clearing sheets
Hi!
I'm manipulating XLSX data using RODBC, however a limitation which appears
to be driver based is that you can't clear or drop sheets from the XLSX
files, as per the following example:
> library(RODBC)
> xlsx<-odbcDriverConnect("DRIVER=Microsoft Excel Driver (*.xls, *.xlsx,
*.xlsm, *.xlsb);DBQ=c:\\documents and settings\\desktop\\testxlsx.xlsx;
ReadOnly=False")
>
2011 Dec 04
3
RODBC connect to Excel (64-bit Windows 7)
Hi to all.
I have a problem to connect to an Excel database using RODBC.
Namely, I am using 64-bit R 2.14.0, under Windows 7 and I tried following:
library(RODBC)
> channel <- odbcConnectExcel("results.xlsx")
Error in odbcConnectExcel("results.xlsx") :
odbcConnectExcel is only usable with 32-bit Windows # ok this is
clear why it doesn't work
> channel
2007 Mar 06
2
Package RODBC
I have some questions about the RODBC package.
library(RODBC) # required for those who want to repeat these lines
1st, I noticed that the following sequence does not work:
channel <- odbcConnextExcel("test.xls")
tables <- sqlTables(channel)
name1 <- tables[1, "TABLE_NAME"] # this should be the name
plan1 <- sqlFetch(channel, name1) # bang!
2009 Sep 24
2
RODBC problem
Hi,
I'm attempting to use the RODBC package on Windows Vista to import an
excel spreadsheet. The spreadsheet has three worksheets the last of
which is blank. Following an example in Phil Spector's book (p. 34),
after creating a connection named con I did the following:
> con
RODBC Connection 3
Details:
case=nochange
DBQ=c:\temp\test.xls
DefaultDir=c:\temp
2007 May 24
1
"[RODBC] ERROR: Could not SQLExecDirect"
Hi, everyone,
I try to run as follows:
Z>library("RODBC")
Z>cnct<-odbcConnectExcel("Forbes2000.xls")
Z>cnct
RODB Connection 1
Details:
case=nochange
DBQ=C:\Program Files\R\R-2.5.0\Forbes2000.xls
DefaultDir=C:\Program Files\R\R-2.5.0
Driver={Microsoft Excel Driver (*.xls)}
DriverId=790
MaxBufferSize=2048
PageTimeout=5
Z>sqlQuery(cnct, "select
2011 Feb 10
2
Rioja package, creating transfer function, WA, "Error in FUN"
Hi, I am a new R user and am trying to construct a palaeoenvironmental
transfer function (weighted averaging method) using the package rioja.
I've managed to insert the two matrices (the species abundance and the
environmental data) and have assigned them to the y and x values
respectively. When I try and enter the 'WA' function though, I get an 'Error
in FUN' message (see
2009 Oct 28
1
replacing <NA> in character column
I have a small Excel data file with two columns of character variables, one column with a numeric variable and three rows. One of the character cells is blank and one of the numeric cells is blank.
I read the data file with the following code:
library(RODBC)
channel <- odbcConnectExcel('u:/test.xls')
sqlTables(channel)
s1 <- sqlFetch(channel, "Sheet1")
2005 Dec 31
1
r: RODBC QUESTION
hello all
i have a quick question. i have been using the RODBC library (trying to
read Excel data
into R but i am doing this by using Rexcel. this is probably not the
correct forum -
sorry for this).
my code is shown below:
Sub A()
'start the connection to R
Call RInterface.StartRServer
RInterface.RRun "library(RODBC)"
RInterface.RRun "A =
2010 Dec 01
2
Problem in reading Excel spreadsheets
Hi folks,
Win 7 64bit
R 2.12.0 32bit
Problem in reading Excel spreadsheets
(the text file, research_databaseI.xls, was download on Internet)
> data=odbcConnectExcel(file.choose())
> sqlTables(data)
TABLE_CAT TABLE_SCHEM
1 C:\\Users\\satimiswin764\\Documents\\research_databaseI <NA>
2
2014 Aug 14
3
leer ficheros excel en R en Ubuntu
Hola,
Pensé que esto iba a ser trivial en R, pero me estoy encontrado muchos con
mi problema en internet, y que las soluciones ofrecidas no terminan de
funcionar.
Estoy intentando leer un fichero .xls en ubuntu con los siguientes paquetes
y nada:
require(RODBC)
conn = odbcConnectExcel("madrid.xls") # open a connection to the Excel file
sqlTables(conn)$TABLE_NAME # show all sheets
df =
2007 Jul 17
4
[R-sig-DB] RODBC on Oracle DB
essai <- odbcConnect("ORESTE_prod", uid="osis_r", pwd="12miss15" ,case="oracle")
> sqlTables(essai)$ORESTE
...
1315 <NA> ORESTE S_PROFESSIONS_OLD TABLE <NA>
1316 <NA> ORESTE S_PROVENANCES TABLE <NA>
1317 <NA> ORESTE
2012 Aug 01
2
Why the result is coming as NULL?
Why the result is coming as NULL. Can anyone help. I want to find the outliers for a reference
setwd("D:/AZ")
library("RODBC")
cdb_cnct <- odbcConnectExcel("Book1.xls")
cdb_frame <- sqlFetch(cdb_cnct, "Sheet1")
odbcClose(cdb_cnct)
rm(cdb_cnct)
x<- cdb_frame$Publication >=1990 & cdb_frame$Publication <=2012
invalid <- cdb_frame[!x,
2010 Jul 22
1
64 bit use of odbcConnectExcel
Hi All,
I'm using R 2.11.1 on 64 bit windows XP. The little function I wrote below
I use often to import the first 1001 lines in an excel sheet to R. This
works fine on the 32 bit version of R but fails on the 64 bit [both on the
same machine, using the same function, importing the same .xls file]. The
message from 64 bit R is:
Error in sqlTables(channel1) :
first argument is not an
2009 Apr 07
4
Re ading Excel 5.0 files with RODBC?
Hi,
i'm trying to read some data from excel files but it seems that neither
xlsReadWrite nor sqlFetch (RODBC) doesn't like the format (Excel 5.0).
When i open the file in Excel and save it in a new format Excel 97 -2003
everything works fine.
Is it possible to use ODBC connection to open old format files, or i guess i
will have to open and save every file in Excel in new format, which
2007 Mar 23
6
Updating a worksheet in Excel file using RODBC
Hello!
I have no problem reading Excel files (each worksheet in the file is a "table" which can be read - at least in my case).
What I would like to do is to read such a table, change it (just the contents, not the format) and write it back, and this I can not do. I am getting the following error messages (3 slightly different attempts):
> sqlSave(con, x, tablename =
2013 Jul 16
2
Importing data by odbcConnectExcel in 64 bit
I have probably an old question.
I have R.3.0.1 installed in 64 bit windows 7. The odbcConnectExcel in RODBC
library does not work. Tried odbcConnectExcel2007 still does not work.
Any ideas.
Thanks
Melissa<-sqlFetch(odbcConnectExcel2007("F:\\Cotton2012\\validation.xlsx"),sqtable
= "Sheet3",
+ na.strings = "NA", as.is = TRUE)
Error in
2009 Aug 14
1
RODBC does not like table names >11/12 characters
Hi List,
I used to access a Paradox database using RODBC, but since last week I
am not able anymore to fetch any table which has a name longer than 11
or 12 characters.
Here is the the pattern of my code, nothing spectacular:
library(RODBC)
channel2<-odbcDriverConnect('DSN=xxx')
#table names with up to 11 characters still work
sqlFetch(channel2, 'abcdefghijk')
#table names
2004 Dec 04
9
Excel *.xls files, RODBC
I gather from reading the back-issues of r-help that it should be
possible (modulo a number of caveats) to read an excel (yuck!) file
into R using RODBC. I have obtained and installed ODBC and the RODBC
package, but cannot for the life of me figure out how to go about
it. Can anyone give me a simple recipe?
I have an excel file on cdrom, say:
/mnt/cdrom/melvin.xls
I have started R and loaded
2005 Nov 02
2
RODBC and Excel: Wrong Data Type Assumed on Import
The first column in my Excel sheet has mostly numbers but I need to treat it
as character data:
> library(RODBC)
> channel <- odbcConnectExcel("U:/efg/lab/R/Plasmid/construct list.xls")
> plasmid <- sqlFetch(channel,"Sheet1", as.is=TRUE)
> odbcClose(channel)
> names(plasmid)
[1] "Plasmid Number" "Plasmid"
2014 Aug 15
5
leer ficheros excel en R en Ubuntu
Hola,
@javier, me gustaría no tener que hacer nada de forma manual, ni por fuera
de r, rstudio. Es decir, el típico comando de linux que me convierta de xls
a csv prefiero no usarlo. Me gustaría hacerlo todo desde R.
@jorge ->
Con RODBC me salta ->
Error: could not find function "odbcConnectExcel"
Lo que creo que es inevitable en Ubuntu