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@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@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]]