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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1542 views
  • 5 likes
  • 5 in conversation