BookmarkSubscribeRSS Feed
raivester
Quartz | Level 8

I am importing an Excel file to SAS; however, one of variables (often 300+ characters) is getting truncated. I want to use GUESSINGROWS, but I see that it is not compatible with Excel, only text delimited data. It is the nature of the project I am using this data for to not alter the raw data we receive--i.e., I cannot convert the file itself to a compatible format. Does anyone know how I can read in the data so this variable will not be truncated?

 

proc import
	datafile = "&maindir.\Data\State Submissions\&year.\Raw\&state.\&stinptE."
	out = part_e_imp replace
	dbms = excel;
	GUESSINGROWS = 3000;
run;
4 REPLIES 4
Reeza
Super User
Search for DBSASTYPE and using and ODBC connection instead.
r_behata
Barite | Level 11
Have you tried :

GUESSINGROWS = MAX;
ballardw
Super User

@r_behata wrote:
Have you tried :

GUESSINGROWS = MAX;

Guessingrows is not a valid option for XLSX or XLS file formats. It is only valid for delimited text files.

sas-innovate-wordmark-2025-midnight.png

Register Today!

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.


Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1906 views
  • 5 likes
  • 5 in conversation