Hi all could please help for below question,
I have a .xlsb file containing one lakh records in that few of the records of a particular variable has above 500 characters towards bottom of the file, but i could read only up to 250 characters using proc import, how do I read the complete 500 characters?
In simple terms the how to increase the length of the particular record up to 500?
I have tried SCANTEXT, GETNAMES, but nothing worked. Please help me.
Sample program which I have tried.
proc import datafile=work.abc DBMS=excelcs replace out="C:\Users\work\Desktop\abc.xlsb";
sheet='Repayment';
getnames="yes";
scantext="yes";
run;
Proc Import by default scans first 20 rows to identify the maximum variable width. Try GUESSINGROWS=MAX. The maximum value for the GUESSINGROWS= statement for PROC IMPORT when reading a comma, tab, or delimited file is 2147483647 (SAS 9.4)
Save to a sensible format like csv from Excel and read the resulting text file with a SAS data step where you can set attributes as needed. With Excel files, you are forced to live with the guesses proc import makes.
Hi Kurt, I am tried to convert the file to csv and another formats but the problem is the file is saved in the server and mostly that file updated every day. So that's the reason we can't able to convert that file.
thanks
@kiran_reddy wrote:
Hi Kurt, I am tried to convert the file to csv and another formats but the problem is the file is saved in the server and mostly that file updated every day. So that's the reason we can't able to convert that file.
thanks
It's absolutely easy to select "save as" when writing the file, so that's no argument at all.
Proc Import by default scans first 20 rows to identify the maximum variable width. Try GUESSINGROWS=MAX. The maximum value for the GUESSINGROWS= statement for PROC IMPORT when reading a comma, tab, or delimited file is 2147483647 (SAS 9.4)
Thanks for your replay.
I will try and let me know if it's working or not, thanks surya
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.