SAS Office Analytics, SAS Add-In for Microsoft Office, and other integrations

Proc Import

Reply
N/A
Posts: 0

Proc Import

Hi,

I have data in microsoft excel spreadsheet. I will first explain you nature of my data. I have basically 7 excel file with different criteria but the type of data inside all files is about same just the number of records are different in each file according to criteria. All data is character type. I run the PROC IMPORT with all 7 files and create 7 SAS datasets out of it. All the data convert to SAS are fine but the problem is 1 SAS dataset is being created with all variables length of 255 characters. Some of the variables are short in length like 10 characters. Rest of 6 files are being created takes the according variable lengths like 10 characters or 200 characters or 50 characters acording to length of data in excel but only one file comes up with 255 characters in all 29 variables from that excel file even though my ID variable is only 10 characters long. The size of the 6 datasets are around 60-70 KB but 1 SAS dataset size is 700 KB. I think it is not the Proc Import but I will copy you the code I am using for reference:

PROC IMPORT OUT= WORK.CRIT1 DATAFILE= "Path of excel file.xls"
DBMS=EXCEL2000 REPLACE;
RANGE="Criteria1$";
GETNAMES=YES;
RUN;

Jigar.
N/A
Posts: 0

Re: Proc Import

Hi all,

I am really curious to find the solution of the problem. Am I lacking in explanation of my problem on my thread? If so, please let me know I can try again to explain it in better words.

Jigar.
SAS Super FREQ
Posts: 8,820

Re: Proc Import

Hi,
Searching the new SAS knowledge base revealed these 3 notes which seem immediately relevant to your issue:
http://support.sas.com/kb/17/123.html
http://support.sas.com/kb/19/409.html
http://support.sas.com/kb/3/583.html

If you need more help, your best bet is to contact Tech Support.

cynthia
Ask a Question
Discussion stats
  • 2 replies
  • 206 views
  • 0 likes
  • 2 in conversation