BookmarkSubscribeRSS Feed
Doc
Calcite | Level 5 Doc
Calcite | Level 5
Good morning,

As you know I am new to SAS, but trying to learn.

I just created a new Library with an excel file using the point and click method. I now have a new library called neuneu. It has 3 files in it sheet1$, sheet2$, and sheet3$. When I double click on sheet1$ is contains the data. However, I cannot reference it in a Program file.

I get the following error. It is obviously looking for a .data file. How do I read this file.

1 proc print data=neuneu.sheet1$;
-
22
-
200
ERROR: File NEHU.sheet1.DATA does not exist.
ERROR 22-322: Syntax error, expecting one of the following: ;, (, DATA, DOUBLE, HEADING, LABEL, N,
NOOBS, OBS, ROUND, ROWS, SPLIT, STYLE, UNIFORM, WIDTH.
ERROR 200-322: The symbol is not recognized and will be ignored.

Thank you,

Doc
4 REPLIES 4
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Do you have a LIBNAME statement pointing to your "external" Excel file with the appropriate "engine" specified? SAS needs this information in order to access the file.

Recommend SAS support http://support.sas.com/ technical papers on this topic - here is a Google advanced search argument you can use to find some matching documentation based on the posted topic:

libname excel engine read sheet site:sas.com


Scott Barry
SBBWorks, Inc.
Doc
Calcite | Level 5 Doc
Calcite | Level 5
I get really confused when tying to read those tech support pages. But I am trying and will get better.

When I created the library using the point and click I chose the excel engine. Do I have to add something else to my program to access the data?
Cynthia_sas
SAS Super FREQ
Hi:
This Tech Support page is very clear:
http://support.sas.com/kb/24/509.html

They show this example, if you're using the Excel Libname engine:
[pre]

LIBNAME XLS 'C:\Excel Files\scores.xls';

DATA NEW;
SET XLS.'SHEET1$'n;
RUN;
[/pre]

which means that a PROC PRINT for the same sheet would be:

[pre]
proc print data=xls.'sheet1$'n;
title 'reading an excel sheet';
run;
[/pre]

cynthia

ps...if you are using SAS Enterprise Guide, then you might find more EG help by posting in the EG forum.
Doc
Calcite | Level 5 Doc
Calcite | Level 5
Cynthia,

You are the greatest. I will give this a try and let you know.

Will have to be tomorrow. We breed Chinese crested dogs and the puppies need attention.

I will let you know.

Thank you for monitoring these forums as well as you do!

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!

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