SAS Office Analytics, SAS Add-In for Microsoft Office, and other integrations

setting data type reading from excel

Reply
Contributor
Posts: 73

setting data type reading from excel

I'm trying to read an excel spreadsheet into sas

a problem I'm having is that sometimes a column that contains a datetime is reading as text but sometimes it is reading as a numeric field or datetime

my basic code is

%let in1=\\MASTER.xlsx;

proc sql;

connect to odbc (noprompt="dsn=Excel Files;Dbq=&in1");

create table table as

select  *

from connection to odbc (select * from "Sheet1$");

disconnect from odbc;

quit;

Is there a way to cause SAS to read a specific column in a format?  for example

(select datefield as enabled format best. from "Sheet1$");

Post a Question
Discussion Stats
  • 0 replies
  • 175 views
  • 0 likes
  • 1 in conversation