similar to: Problems reading excel file with RODBC connect

Displaying 20 results from an estimated 4000 matches similar to: "Problems reading excel file with RODBC connect"

2009 May 28
4
Read & name multiple excel sheets using RODBC
I'd like to be able to read multiple sheets from an excel workbook and use the sheet name to name the resulting dataframe using RODBC. at the moment i've figured out how to do it the long way (see below) but feel sure that there is a speedier & possibly automatic way to do it in R. i've tried to run a loop using sqlTables but it seemed to break the connection. unless i've
2010 Nov 01
0
RODBC - odbcConnectExcel2007 headers issue
Apologies if this is already answered elsewhere, but I could not find the answer searching the archives. I am trying to bring my data in from an .xlsx file. The data of interest is an n x m array, but it is preceded with ~2 columns and 30 rows of instrumental "information." An abbreviated example (cols denoted with "," for this example: Subject , 01 wavelength, 400 (30
2012 May 29
1
RODBC, Excel, and data truncation when writing
Hi, I am hoping to use the RODBC package to write a dataframe to an Excel .xlsx file. The dataframe contains at least one field with character elements that exceed 255 bytes, which appears to be the cell width limit in Excel. Below is example code and the warning message received: library(RODBC) d <-
2005 Aug 31
0
Reading numeric data in Excel as character data in R using RODBC
The Excel 'database' I am pulling from mixes multiple character indicators for different kinds of non-numeric results in the same column as the numeric values. A simple sqlFetch turns all of the character indicators into NAs. I would like to pull in all of the Excel data as character so that I can split the column into multiple types of vectors and control the type conversion within R. Can
2010 Jul 13
2
RODBC and Excel 2010 xlsx
Hi List, just to know if the issue is only a problem of mine or if it is a general issue due to the new MS Office pack. I'm using R 2.11.1 32 bits in a Windows 7 x64 with the MS office 2010 x64 installed. I can import .xls files normally (the same way I did with my Excel 2007 32 bits). But the function odbcConnectExcel2007 isn't able to import .xlsx files now that I have the new version of
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
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"
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!
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
2010 Feb 23
1
Importing Headers from excel files
Hello I am trying to import an Excel file but I am loosing the headers, My headers are in the first to rows of the EXCEL file. In the following R output, the NA are supposed to be the second item in the Header. Is there any way to Import more than one row as headers?. Thank you Felipe Parra > Data<-odbcConnectExcel('Curva LIBOR.xlsx',readOnly=T,) >
2007 Jan 30
0
calloc bug in RODBC 1.1-7 and later?
I'm trying to load Affy Annotation data from an Access database into R using RODBC. This has worked fine for quite some time. The bug seems to be correlated to RODBC versions 1.1-7 and later. Works fine: R 2.2.0 with RODBC 1.1-4; R 2.3.0 or R 2.4.1 with RODBC 1.1-6 Fails: R 2.3.1 with RDOBC 1.1-7; R 2.4.1 with RODC 1.1-7 or 1.1-8 Details ===== This works fine: Version 2.2.0
2010 Jul 29
4
reading dates in Excel into R
I am reading dates in Excel2007 into R. Here are the functions I used: library(RODBC) channel<-odbcConnectExcel2007("myfile.xlsx") tmp<-sqlFetch(channel,"1",as.is=T) The dates in myfile.xlsx are all in this format: mm/dd/yyyy. But when I read it to R, some columns look like "yyyy-mm-dd 00:00:00", some columns look like "yyyy-mm-dd", and some
2014 Jun 30
2
Change database in SQL Server using RODBC
I wish to query tables that are NOT in the default SQL Server 2012 database. At work I am using SQL Server 2012 and Windows 7. I tested the following on my home set up of Server 2012 and Windows 7. I am using RStudio. I wish to connect to several SQL Server 2012 databases from R. This page helped me get started. http://andersspur.wordpress.com/2013/11/26/connect-r-to-sql-server-2012-and-14/
2011 Mar 01
0
odbcConnectExcel2007 creates corrupted files
I tried creating a .xlsx file using odbcConnectExcel2007 and adding a worksheet with sqlSave. This seems to work, I am even able to query the worksheet, but when I try opening the file in Excel I get the following message: "Excel cannot open the file 'test.xlx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file
2009 Jan 26
2
R crashes when using the RODBC Package
Hi, I've written some code that fetches data from an Access Database (2003), processes the data, then saves the modified data back into a table in the Access database. It works if I only pass through the code once, but if I put a loop around the code so that I fetch data from a different source table, and then save it again to a different destination table, the code crashes. It is
2004 Nov 11
2
RODBC & POSIX & Daylight Saving blues
Dear All, The recent improvement in RODBC to recognize datetimes in tables has exposed my ongoing confusion. All my data are obtained from a satellite system (Argos) which tags events in the GMT time zone. Daylight saving is ignored. To my way of thinking this means that 1. twelve-o-clock means halfway through the day regardless of season, and 2. the difftime of any two dates where
2009 May 12
2
Specifying data type when creating a dataframe using RODBC
H R-helpers, I am using the following code to make a dataframe from an Excel spreadsheet: library(RODBC) channel <- odbcConnectExcel("Spreadsheet.xls") Data <- sqlFetch(channel, "Tab1") odbcClose(channel) One column (several, actually) in the spreadsheet contains integers in its first few rows but later values in these columns contain a mixture of numbers, letters and
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 =
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
2008 Jun 26
1
RODBC, sqlFetch error when accessing Excel
This is about R 2.7.0 and related packages on windows NT. I have a mixture of numeric and character data and empty cells in an Excel spreadsheet with several tabs that I'm trying to read with sqlFetch from RODBC. The data that is returned by sqlFetch is unfortunately not identical to the source data in that in columns with character values in the first few rows the subsequent rows of that