I have a column in excel that exceeds 255. When I read the data in and use dbsastype to force the column char and length, it still gives me 255. Any ideas of what I'm doing wrong.
Here is some of the code:
LIBNAME WrkBk EXCEL "file" MIXED=YES;
DATA test.;
SET WrkBk."sh1"n(
DBSASTYPE=("f1"='char(450)'));
RUN;
LIBNAME WrkBk CLEAR;
Have you tried it with dbms=xlsx. Unfortunately, it doesn't allow mixed and dbsastype, but often does what one wants. e.g.:
LIBNAME WrkBk xlsx "/folders/myfolders/book1.xlsx"; DATA test; SET WrkBk.sheet1; RUN; LIBNAME WrkBk CLEAR;
Art, CEO, AnalystFinder.com
Take control. Save the data to a csv file and read that with a data step. The Excel file format is unusable as a reliable transport.
Try another option.
LIBNAME WrkBk EXCEL "file" MIXED=YES dbmax_text=32767 ;
DATA test;
SET WrkBk."sh1"n;
run;
Unfortunately that didn't work either
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!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: