Help using Base SAS procedures

Help importing Excel datasheet with sporadic data

Reply
New Contributor Ili
New Contributor
Posts: 3

Help importing Excel datasheet with sporadic data

Hi! I am having an issue when I import my Excel spreadsheet into SAS 9.1 My problem is that my datasheet contains many variables with only a few numerical entries. I know SAS reads the first 8 observations and chooses the num or char format based on the most common entry in those first 8 obs. I have tried to sort my data so that most of my data is in those first 8 obs, but I cannot do this for all variables because i just dont have enough complete or consistent data across all of my variables. Is there a way to change the import method in sas so that it will import all of these variables in NUM format and not change the empty variables to character?
Occasional Contributor
Posts: 15

Re: Help importing Excel datasheet with sporadic data

Did you try changing the column type in Excel to numeric before importing?
New Contributor Ili
New Contributor
Posts: 3

Re: Help importing Excel datasheet with sporadic data

Yes, i have done both. The problem is that there just isnt enough data to in each column to keep the type at numeric.
Occasional Contributor
Posts: 15

Re: Help importing Excel datasheet with sporadic data

If that doesn't work, go to File>> Import and choose Excel.
When you choose the table to import, click on the 'options' button . make sure that "convert numeric values to characters in a mixed type column" in unchecked before importing.
Ask a Question
Discussion stats
  • 3 replies
  • 121 views
  • 0 likes
  • 2 in conversation