BookmarkSubscribeRSS Feed
Jude815
Calcite | Level 5

I'm trying to use proc sql pass through with excel.  I have had the same code and used it for awhile, but now I am getting an error that states the microsoft access engine could not find the object.  Any suggestions on how to fix this problem?

6 REPLIES 6
Reeza
Super User

Have you changed your version of Excel or your ODBC drivers? Or your OS? A lot of moving parts in such a system.

Always helps to post your code as well.

Jude815
Calcite | Level 5

No changes.  Here is a copy of the code and error:


proc sql dquote=ansi;

connect to excel (header=yes path="&filepath.\&filename.");

create table jude.sampling as

select * from connection to excel

     (select * from strata);

ERROR:  Describe:  The Microsoft Access database engine could not find the object 'strata'.

                Make sure the object exists and that you spell its name and the path name correctly.  If

               'strata' is not a local object, check your network connection or contact the server administrator.

As you can see, I am not trying to use access but excel.  The name and path are correct.

Reeza
Super User

Is Strata a sheet name or a named range?

Also, does the case match, ie strata vs Strata

Jude815
Calcite | Level 5

Reeza wrote:

Is Strata a sheet name or a named range?

Also, does the case match, ie strata vs Strata

Strata was a sheet name and they were the same.

Next time I will try to be more clear from the beginning.

PGStats
Opal | Level 21

If your file is .xlsx, try to convert it to older format .xls and see if you can access that.

PG
Jude815
Calcite | Level 5

Thanks all, I found I had to put my worksheet name in [strata$] and that worked.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 6 replies
  • 1270 views
  • 0 likes
  • 3 in conversation