BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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.
2 REPLIES 2
deleted_user
Not applicable
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.
Cynthia_sas
SAS Super FREQ
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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Discussion stats
  • 2 replies
  • 729 views
  • 0 likes
  • 2 in conversation