Re: [R] reading Excel file

From: Hans-Peter <>
Date: Tue, 25 Mar 2008 18:14:42 +0100

> But what can I do in case I don't know the number of columns in my
> file??
 I mean is there any way I can specify the colClass of only third column
> and for other columns it can take the default classes??

Not supported, sorry (I put it on the list).

x = read.xls( "D:\\file.xls", colClasses = c( rep( NA , 2 ),"isodate", rep( NA, 9 ) ) ) should work. But you still have to know the total number of columns. (The pro version does have a command and/or you could read in just the first row and check its content).


	[[alternative HTML version deleted]]

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 25 Mar 2008 - 17:20:27 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 Tue 25 Mar 2008 - 18:30:23 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive