search for: odbcconnectexcel

Displaying 20 results from an estimated 131 matches for "odbcconnectexcel".

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 sqlFet...
2005 Sep 28
1
Errors in odbcConnectExcel()
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) &g...
2010 Jul 22
1
64 bit use of odbcConnectExcel
...but it seems it is still under development. For now I switch back an forth between 64 bit and 32 bit depending on what I'm working on. Any suggested solutions for xls import problems? My function get.xls.file <- function(xlsfile){ library(RODBC) #xlsfile <- file.choose() channel1 <- odbcConnectExcel(xlsfile) a <- sqlTables(channel1) b <- nchar(a$TABLE_NAME[1]) x <- substring(a$TABLE_NAME[1], 2, b-2) data <- sqlFetch(channel1, x, max=1001) odbcCloseAll() return(data) } JT -- View this message in context: http://r.789695.n4.nabble.com/64-bit-use-of-odbcConnectExcel-tp2298927p22989...
2012 May 19
2
Loading the stupid dataset--help!!!
I am using the following: library(RODBC) chan = odbcConnectExcel("rats-lda") rats.lda = sqlFetch(chan, "data") close(chan) And getting the following error message: > library(RODBC) Error in library(RODBC) : there is no package called ?RODBC? > chan = odbcConnectExcel("rats-lda") Error: could not find function "odbcConne...
2009 Aug 09
3
odbcConnectExcel on non-Windows?
...ello: What should I do regarding code to write an Excel file in a non-Windows platform? The "sos" package [new version of "RSiteSearch"] on R-Forge includes "writeFindFn2xls", which starts with "require(RODBC)". The next line calls "odbcConnectExcel". This works under Windows but fails under Linux and MacOS. What would you suggest we do about this? It currently tests (.Platform$OS.type == "windows"); if(FALSE), it issues an error, saying that it only works under Windows. Also, the help page skips those te...
2008 Apr 04
1
RODBC / odbcConnectExcel Issue
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 TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS 1 T:\\data\\in\\nameclass <NA> nameclass$ SYSTEM TABLE <NA> > qry = paste("SELECT * FROM '",tbls$TABLE_NAME[1],"'",sep=...
2012 Apr 20
1
odbcConnectExcel() fails to fetch all columns
Folks, Is there a parameter somewhere in RODBC that enables more columns to be retrieved from an Excel worksheet? # This next bit uses an undocumented call in RODBC z <- odbcConnectExcel("./BBaselinePtQaires_apr2011.xls") BQ <- sqlFetch(z, "BBaselinePtQaires") Gives me: z RODBC[1] And BQ 134 obs. of 59 variables I have all the rows in the worksheet but only the first 59 out of a total of 70 columns. I?m in RStudio 0.95.263 using RODBC 1.3-3 and R versi...
2005 Mar 11
2
RODBC Package
...get it running. Concerning these issues, I am pretty unexperienced, so please state any step necessary. The actual problem is accessing data in Excel- files. (unfortunately no alternative way of entering the data). I already installed the Package, but it says the following: > versuch <- odbcConnectExcel("Thermanali-Versuch.xls") Error: couldn't find function "odbcConnectExcel" Thanks in Advance Stephan Freyberger
2007 Jul 18
0
sqlSave, ...colnames=F, using "odbcConnectExcel" .... I still get colnames in top row of exprted sheet
...m I coding incorrectly and.or misunderstanding this feature? #example code: sheet = "c:/test2.xls" temp=data.frame(matrix(data=NA,nrow=10,ncol=15)) temp[1,1] = 'sampletext.1.1' temp[1,2] = 'sampletext.1.2' library(RODBC) odbcClose(channel) file.remove(sheet) channel <- odbcConnectExcel(sheet, readOnly=FALSE) sqlSave(channel, temp, "p", fast=FALSE,rownames=F,colnames=F) odbcClose(channel) --------------------------------- [[alternative HTML version deleted]]
2012 May 20
4
write.xls
...tall the missing modules. See the package INSTALL file for more information. # *** NOTE: I may be able to fix this for myself. # *** However, I want to use this in the 'sos' package, # *** and if it doesn't work easily for me, it may not work for others. library(RODBC) xlsFile <- odbcConnectExcel(outFile, readOnly=FALSE) # NOTE: This works with R 2.15.0 32-bit. # However, with 64-bit, I get the following error message here: # Error in odbcConnectExcel(outFile, readOnly = FALSE) : # odbcConnectExcel is only usable with 32-bit Windows # When this works, the following 3 lines of code #...
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 <- odbcConnectExcel2007("results.xlsx") # this was one of proposals from old R...
2005 Jun 07
2
reading non-existing files
Dear all, I'm trying to read to a collection of files in a loop using odbcConnectExcel - but not all of the files exist. This is the code I have for(i in 1:no.of.subs){ channel <- odbcConnectExcel(paste(working.dir, subs[i], ".xls", sep="")) datafiles[[i]] <- as.matrix(sqlFetch(channel, "Data")) close(channel) } I'm not sur...
2008 Apr 19
7
Re ad From EXCEL
Hello!!! I have been read a much about as read data from Excel File, but I haven?t found the necesary information to read the data. Now, I can create a channel : channel <- odbcConnectExcel("file.xls") but I don?t know as read the data?? I hope that you could help me. Thank you very much. -- View this message in context: http://www.nabble.com/Read-From-EXCEL-tp16787900p16787900.html Sent from the R help mailing list archive at Nabble.com.
2003 Jul 21
1
RODBC: problem saving a new table in an "Excel database"
Hi I am using package RODBC version 1.0-1 under R version 1.7.1 on Windows XP Pro. I am having problems writing a new table to an (Excel) database using sqlSave. I connect to an empty Excel spreadsheet using odbcConnectExcel (which, I believe, uses the Microsoft Excel Driver DSN). Then I try and save a new table to the database(spreadsheet) using SqlSave, but obtain an error message. Below is some test code which reproduces the error (assuming that c:\test.xls is a standard "blank" Excel spreadsheet; i.e. S...
2005 May 24
2
reading multiple files
Dear All, How do I read in multiple data frames or matrices in a loop, e.g. for (i in 1:n) { channel <- odbcConnectExcel("filenames") file[i] <- as.data.frame(sqlFetch(channel, "sheet")) } I would like file[i] to be the name of the data.frame (i.e. file[1], file[2], file[3],...etc) rather than a vector. Thanks in advance for any help. Dave
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
2011 Feb 10
2
Rioja package, creating transfer function, WA, "Error in FUN"
...the 'WA' function though, I get an 'Error in FUN' message (see below for full values). Alas, I do not know what this means and have struggled to find similar problems to this online. Is there a step I've missed out between assigning the matrices and the WA function? > SWED=odbcConnectExcel(file.choose()) (SWED is the environmental data > file) > sqlTables(SWED) > Env=sqlFetch(SWED, "Sheet1") > odbcClose(SWED) > Env SampleId WTD Moisture pH EC 1 "N1_1" "20" "91.72700" "3.496674" " 85...
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 <http://stackoverflow.com/questions/3426523/odbcconnectexcel-function-from-rodbc-package-for-r-not-found-on-ubuntu> Con gdata -> Unable to open file '/home/miguelfg/R/x86_64-pc-linux-gnu-library/3.1/gdata/xls/madrid.xls'.Error in xls2...
2009 Jan 31
1
FW: can't get package boot to load
...ied searching the web and haven't found the root of my problem. Apologies if I've missed the obvious. My code is simple: install.packages('RODBC') install.packages('boot') library(RODBC,boot) setwd("C:/Documents and Settings/Gary Smith/My Documents/Blog/") data = odbcConnectExcel("LafferCurve2.xls") mydata = sqlFetch(data,"Data") n=23 m=73 gnp=mydata[[3]][n:m] incTaxFirst=mydata[[7]][n:m] corr(cbind(gnp,incTax)) Here are the console messages: > install.packages('RODBC') Warning: package 'RODBC' is in use and will not be installed &gt...
2009 Jun 25
0
RODBC: Trying to read an Excel file
Try the function sqlFetch to import the data in the spreadsheet. jo<-odbcConnectExcel("i:\\all\\sorkinjohn\\stats\\silvermannatalie\\NEMOcomb ined06-24-09.xls",readOnly = TRUE) mo<-sqlFetch(jo,'Your Sheet Name or Number',colnames=F,rownames=F) mo Hope it helps. ------------------------------------------------------------- MSc. Rodrigo Aluizio Centro de Estudo...