Displaying 20 results from an estimated 7000 matches similar to: "read a xls file"
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
2009 Jan 28
1
StepAIC with coxph
Hi,
i'm trying to apply StepAIC with coxph...but i have the same error:
stepAIC(fitBMT)
Start: AIC=327.77
Surv(TEMPO,morto==1) ˜ VOD + SESSO + ETA + ........
Error in dropterm.default(fit,scope$drop, scale=scale,trace=max(0, :
number of rows in use has changed: remove missing values?
anybody know this error??
Thanks.
Michele
[[alternative HTML version deleted]]
2010 Feb 23
1
RODBC to import/export xls files
Dear R users,
I've learned today about RODBC package in order to import xls file to
dataframes and export the dataframes to xls files.
However I have some problems. Please excuse me if these are basic but as
I said, I've just begun with this package.
Also this email is quite long, but everything is related, so I don't
think it would be better to split it. Moreover, there's a
2006 Dec 07
2
How to use read.xls in R
Hello there,
In gdata package, read.xls is to be used for reading excel data (from
windows).
The following is my code:('C:/session/sampledata.xls' is where the file
is stored)
data1<-read.xls('C:/session/sampledata.xls',sheet=1)
and I got the following error message:
Error in system(cmd, intern = !verbose) : perl not found
Could you please tell me what I have done wrong and
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 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!
2012 Jan 10
3
unir en .dbf luego de aplicar read.xls a varios archivos
Estimados:
Tengo un directorio con varios archivos Excel quiero importarlos todos
y grabarlos en un único archivo .dbf.
Haciendolo uno por uno lo logro de la siguiente manera (solo tomo 2 archivos):
archivos <- list.files(pattern = 'xls')
a1 <- read.xls(archivos[1],
perl="C:\\strawberry\\perl\\bin\\perl.exe",skip=12,dec=",",header=F,as.is=T)
a2 <-
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 =
2004 Nov 09
1
colnames argument in sqlFetch backwards? (PR#7355)
Full_Name: Bert Gunter
Version: 2.0.0 patched
OS: Win2000
Submission from: (NULL) (192.12.78.250)
The TRUE/FALSE options of the colnames argument in sqlFetch (RODBC) seem to be
reversed, at least for .xls files.
## z is a connection to an xls workbook opened by odbcConnectExcel()
> dat<-sqlFetch(z,'SuccessRates',colnames=FALSE)
> dat[1:5,]
RecID Name Run Grams Lost Run
2009 Nov 18
3
Re ading multiple Excel 2007 files with a loop
I have several hundred Excel 2007 data files in a folder. I would like to
read every file in a single given folder using a loop.
I have searched the FAQ, the forum archives here, other or older R boards
and the R Import / Export documentation, and have asked some very
knowledgeable R users without learning of a solution. I hope someone here
can help.
I understand that the most common
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
2003 Mar 13
2
RODBC and Excel in Widows
Hello, I have some problems with RODBC and Excel in Win98
I am using R 1.6.2 and just upgraded RODBC to the last version on CRAN.
I have an Excel file with columns Number, Name, Sex, Age, FEV1 on Sheet
1 and Number, Age, FEV1, Name, Sex on Sheet 2.
Now I open the channel to the file
> chan1 <- odbcConnectExcel("c:/testOdbc.xls")
> tables(chan1)
and the list appears with the 2
2011 Mar 03
1
sqlFetch (RODBC) question
Dear all,
I've used RODBC a lot to read in files created in MS excel and access but
found a strange problem today: a variable in my data file contained both
numbers and text; sqlFetch would set text within a row of numbers to NA; but
if first 5 or 6 rows would be text then all numbers would be read in as NA.
con<-odbcConnectExcel("xample.xls") #the file is attached or at
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
2012 Aug 14
2
Not able to filter factor, class
After importing data from Excel through ODBC.
In the inclusion dataset, class(inclusion$Value) is coming as factor. After filtering the data, length(inclusion$Value == 0),the answer is coming as 4879, but actually Value contains only 225 rows. So how can I get the length as 225.
Can anyone help?
setwd("D:/AZ")
library("RODBC")
cdb_cnct <-
2005 Apr 26
2
writing a data frame in excel format
Hello
I know how read a file in excel format into a R data frame using the
RODBC library, but I don't know how write a R data frame in excel
format. I don't understand the instructions from RODBC user manual.
To read an excel file I use.
library(RODBC);
conex<-odbcConnectExcel("fis_quim.xls");
sqlTables(conex);
data<-sqlFetch(conex,"hoja1");
Suppose I
2004 Nov 09
1
RODBC bug or doc error in sqlFetch on xls files (PR#7354)
R 2.0.0 patched under win2000. MS Office Excel 2003. ODBC Drivers?
This may not come as a surprise -- sqlFetch() (and perhaps other ?) appear
not to handle table/worksheet names with spaces in them in Excel tables. I
was not able to find documentation that specifically mentioned this,
although the Help pages vaguely hinted that there might be difficulty with
Excel's "peculiar
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 Nov 16
3
Error on reading an excel file
Hello everybody, here is the code I use to read an excel file containing two
rows, one of date, the other of prices:
library(RODBC)
z <- odbcConnectExcel("SPX_HistoricalData.xls")
datas <- sqlFetch(z,"Sheet1")
close(z)
It works pretty well but the only thing is that the datas stop at row 7530
and I don?t know why datas is a data frame that contains 7531 rows with the
2009 Jan 31
1
FW: can't get package boot to load
Changing
library(RODBC,boot)
to
library(RODBC)
library(boot)
seems to have solved the problem.
_____
_____________________________________________
From: Gary Smith [mailto:gary.smith28 at comcast.net]
Sent: Saturday, January 31, 2009 12:55 PM
To: 'r-help at R-project.org'
Subject: can't get package boot to load
Hi,
I am new to R and I'm totally confused by this problem.