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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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