Help using Base SAS procedures

problem of importing excel file with big cell

Reply
Regular Contributor
Posts: 222

problem of importing excel file with big cell

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;

Super User
Posts: 3,105

Re: problem of importing excel file with big cell

Add the TEXTSIZE= option to your IMPORT program as a separate statement (eg textsize = 4096Smiley Wink. 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 

Occasional Contributor
Posts: 14

Re: problem of importing excel file with big cell

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.


Ask a Question
Discussion stats
  • 2 replies
  • 220 views
  • 3 likes
  • 3 in conversation