BookmarkSubscribeRSS Feed
LawrenceHW
Quartz | Level 8

Hi,

 

I am trying to read in an Excel workbook using the LIBNAME statement with the EXCEL option. This normally works just fine but one of the columns in my workbook contain data >1024 in length. So I used the DBMAX_TEXT option to increase the available size of the data imported and when I run a PROC CONTENTS the variable (Body) shows up as a Character of length 5494.

 

However when I try to use this dataset (proc print or via a data step) I get the warning in the log: 

WARNING: During read: Data truncated for column Body

 

Has anyone else managed to successfully use this option?

 

I'm running SAS v9.4 TS4 on a Grid using EG (and Studio) to run programs.

 

Cheers,

Lawrence

2 REPLIES 2
Kurt_Bremser
Super User

Save to a csv file and use proc import once with guessingrows=max to determine the needed size for the column. Then use the resulting data step for future imports.

Tom
Super User Tom
Super User

Did you try using the XLSX engine instead of EXCEL engine?

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1070 views
  • 0 likes
  • 3 in conversation