Help using Base SAS procedures

Proc Import for Excel files

Reply
Occasional Contributor DJ
Occasional Contributor
Posts: 6

Proc Import for Excel files

Hi
I need to import an excel file. My excel file contains column which has numeric as well as character values. Alhough I have mentioned "MIXED=YES", the column is read as numeric so my character values became period(.). I know that sas will read first some rows and decide the type of variable.

Is there any proc import statement which tells sas to scan all the values and then decide variable type???

Note: I dnt want to change my registry for this.

Thanks in advance.
DJ
Trusted Advisor
Posts: 2,116

Re: Proc Import for Excel files

The way you change it is by changing the "typeguessrows" parameter in the registry. How you do it is SAS version dependent. Search support.sas.com for it and your SAS version. Message was edited by: Doc@Duke
Occasional Contributor DJ
Occasional Contributor
Posts: 6

Re: Proc Import for Excel files

Thanks for reply.

I am using SAS v9.2 and I dnt want to change registry settings for this. I am searching an option like GUESSROWS= for importing excel spread sheet. This option works fine with other file types.

any thoughts???
Trusted Advisor
Posts: 2,116

Re: Proc Import for Excel files

Other suggestions: I'm afraid that you are outta luck. Because SAS uses Micro$oft tools to read Excel, you have to do it the Micro$oft way.

[I hate doing it this way as it can't be controlled through programing and is not portable, but I think that we are stuck with it.] Message was edited by: Doc@Duke
Occasional Contributor DJ
Occasional Contributor
Posts: 6

Re: Proc Import for Excel files

Thanks anyway for your input.

DJ
Ask a Question
Discussion stats
  • 4 replies
  • 125 views
  • 0 likes
  • 2 in conversation