BookmarkSubscribeRSS Feed
Mike_Davis
Fluorite | Level 6

Hello everyone,

when I use proc import excel file(.xls) into SAS ,some cells with very long character will be trimed after they come to SAS dataset.

how to fix it?

Thanks!

Mike

PROC IMPORT
OUT= one
DATAFILE= "c:\new\process.xls"
DBMS=EXCEL REPLACE;

SHEET="detail$";

GETNAMES=YES;
MIXED=YES;
USEDATE=YES;
SCANTIME=YES;
RUN;

2 REPLIES 2
SASKiwi
PROC Star

Add the TEXTSIZE= option to your IMPORT program as a separate statement (eg textsize = 4096;). By default the maximum text size is 1024 characters.

Useful link here: http://support.sas.com/documentation/cdl/en/acpcref/63184/HTML/default/viewer.htm#a003103761.htm

BTW, you should find it quicker to search for these answers yourself, by looking at the PROC IMPORT SAS Help or online SAS documentation.

I found the above link by searching SAS support with the key words:maximum variable length import procedure 

fd2010
Calcite | Level 5

I have found a post at this link that helped me to solve the problem. It is not elegant, but it works.

https://communities.sas.com/thread/33890?start=0&tstart=0

SAS should provide an option for the user to control how many rows to scan instead of relying on the windows registry.

Good luck.


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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1390 views
  • 3 likes
  • 3 in conversation