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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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