s-news
[Top] [All Lists]

Importing Excel Worksheets with multiple formats

To: s-news@lists.biostat.wustl.edu
Subject: Importing Excel Worksheets with multiple formats
From: John Kershaw <kershaw@unb.ca>
Date: Thu, 10 Nov 2005 14:23:10 -0400 (AST)
Hello All,

I have been trying to import a batch of excel files (about 800) in Splus
6.2 for Windows.  The files are autocreated by a data collection system.
I have figured out how to do this as a batch, but I have one complication.
The first ten rows of each file contains Unit Descriptors with the heading
in the first column and the value in the second column.  I have figured
out how to read the first 10 rows and transpose it into a data.frame with
the first column becoming the names of the elements in the data.frame.  My
problem is that there is one variable somewhere in the middle of the
rows that is text and the rest are numeric, so Splus assigns NA to the
text value.  Is there any way to force Splus to import everything as text?
I can then use as.numeric to convert the values I need to be numeric.  I
really don't want to have to edit each excel file if possible.

Any help, hints, or solutions are, as always, greatly appreciated.

JAK


<Prev in Thread] Current Thread [Next in Thread>