- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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)
Suryakiran
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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)
Suryakiran
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your replay.
I will try and let me know if it's working or not, thanks surya