|Date: ||Fri, 2 Jan 2004 21:46:32 -0500|
|Reply-To: ||Lou <lpogodajr292185@COMCAST.NET>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Lou <lpogodajr292185@COMCAST.NET>|
|Subject: ||Re: how to tell data type and width of columns of excel file via
DDE when import to SAS?|
"Helen" <firstname.lastname@example.org> wrote in message
> Dear SAS-L,
> I am trying to import excel file (one workbook with multipul
> worksheets) to SAS via DDE. I would like to know the type of every
> column of excel file(e.g. character,numeric, date and datetime) so I
> can define them in my SAS dataset. It seems that get.cell(7) function
> can do a little. But I am not quite sure especially when one column
> only contains numbers but get.cell(7) return 'general' (I take it as
> characters type).
> Could someone give me any advice? Thanks!
The "general" format treats numbers as numeric and non-numbers as character
or text. In a spreadsheet, **columns** don't have a data type, **cells**
do. It's quite possible to have a column where every cell is different.
Even in an otherwise well behaved spreadsheet, the first populated row is
often text (the name of the column) even when all of the entries below it a