BookmarkSubscribeRSS Feed
GreggB
Pyrite | Level 9

try this.  modify the path to find your data.  var is the name of column one so you may have to change it.

  libname db "C:\excel files\test1.xls"  mixed=yes;

   data test3;
     set db."Sheet1$"n(DBSASTYPE=(var='char(1024)'));
   run;

   libname db;

NN
Quartz | Level 8 NN
Quartz | Level 8

Hi gregg,

The libname statement gives the following error

ERROR: Library DB is not in a valid format for access method RANDOM.

ERROR: Error in the LIBNAME statement.

I think what you have suggested would work on windows. But since i am on a Unix platform maybe it doenot work here.

Thanks...

kleinhev
Calcite | Level 5

Please see this thread:

agoldma
Pyrite | Level 9

If you want PROC IMPORT to have an option to import all fields as character, please vote:

PROC IMPORT -- all fields as character

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Discussion stats
  • 18 replies
  • 28612 views
  • 7 likes
  • 9 in conversation