Re: [R] Reading file

From: Jeff Newmiller <jdnewmil_at_dcn.davis.ca.us>
Date: Wed, 27 Apr 2011 18:35:50 -0700

I don't know the answer to your question, but I avoid these problems by saving my data as csv and avoiding direct interaction with Excel files. Excel is NOT a database, even though it has supposed support through ODBC. I find this holds true regardless of the programming environment from which I try to access Excel.



Jeff Newmiller The ..... ..... Go Live... DCN:<jdnewmil_at_dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k

Sent from my phone. Please excuse my brevity.

Val <valkremk_at_gmail.com> wrote:

Hi all, I am trying to read Excel file usingthe follwoing commnad library(RODBC) data=odbcConnectExcel(file.choose()) sqlTables(data) Bdat=sqlFetch(data, "test") odbcClose(data) head(Bdat) 1. The above script works if the Excel file is opened. If the excel file is not opened then I get the following message "External table is not in the expected format" and it stops. 2. Instead of "(file.choose())" I wanted to use the following command data <- read.table('G:/test.xlsx", header=T) But it did not work again. Warning message: In read.table("G:/test.xlsx", header = T) : incomplete final line found by readTableHeader on 'G:/test.xlsx' Did I miss something there? Your help is highly appreciated Val 	[[alternative HTML version deleted]]_____________________________________________
R-help@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.

        [[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 Thu 28 Apr 2011 - 01:41:11 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 Thu 28 Apr 2011 - 01:50:33 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