DATA Step, Macro, Functions and more

reading Excel file into SAS OnDemand for Professinals

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 8
Accepted Solution

reading Excel file into SAS OnDemand for Professinals

Hi,

I am at ch.5,   p.181 of EG 6.1. A couple of questions:

1. Do I have within Prep Guide  6.1 a licensed SAS/ACCESS Interface mentioned by the Guide?

2. Are there Excel files under SASApp which are possible to read?

If reading possible then  any examples would be appreciated.

Vladimir Kievsky


Accepted Solutions
Solution
‎03-16-2014 10:08 PM
SAS Super FREQ
Posts: 8,868

Re: reading Excel file into SAS OnDemand for Professinals

Hi:

  You can read Excel files, if you use the "internal EG method" of FILE --> IMPORT DATA choice on the EG File menu. There are a limited number of Excel files on the server that can be used with the EG classes.

   

  However, when you use FILE --> IMPORT DATA, you are *NOT* using the LIBNAME engine or PROC IMPORT (which need SAS/ACCESS pieces that you do not have) when you are on the UNIX server. The IMPORT DATA item uses the Microsoft ACE engine to allow EG to build a DATA step program, which reads the embedded data that the ACE engine takes out of the workbook and embeds in the program. As it shows on the screen shot of Step 4, since the SAS OnDemand server is a UNIX server, you do not have the pieces of SAS/ACCESS for PC Files that are needed to read Excel files directly with the LIBNAME engine or PROC IMPORT.

    

  I don't understand what you mean by "ch.5,   p.181 of EG 6.1" -- what is name of the book or course you are using with SAS OnDemand for Professionals?? Is it the course Enterprise Guide 1: Querying and Reporting or the SAS Press book Little SAS Book or ??? In our e-learning courses, for the programming classes, we generally recommend that you skip over any of the exercises that involve using the LIBNAME engine or PROC IMPORT, since those will not work on the SAS OnDemand for Professionals server.

      

  There is an XLSX file called employee_info.xlsx in the ECEG151 folder on the SAS OnDemand for Professionals server. You can find it by following this path (clicking each folder to expand): SASApp server, then FILES, then BOOKDATA, then ECOURSES, then ECEG151. You can use the FILE-->IMPORT DATA technique to import employee_info.xlsx file. See the 4 steps attached.

cynthia


step1_select_file.png
step4_adv_options.pngstep2_select_workbook_sheet.pngstep3_check_attributes.png

View solution in original post


All Replies
Solution
‎03-16-2014 10:08 PM
SAS Super FREQ
Posts: 8,868

Re: reading Excel file into SAS OnDemand for Professinals

Hi:

  You can read Excel files, if you use the "internal EG method" of FILE --> IMPORT DATA choice on the EG File menu. There are a limited number of Excel files on the server that can be used with the EG classes.

   

  However, when you use FILE --> IMPORT DATA, you are *NOT* using the LIBNAME engine or PROC IMPORT (which need SAS/ACCESS pieces that you do not have) when you are on the UNIX server. The IMPORT DATA item uses the Microsoft ACE engine to allow EG to build a DATA step program, which reads the embedded data that the ACE engine takes out of the workbook and embeds in the program. As it shows on the screen shot of Step 4, since the SAS OnDemand server is a UNIX server, you do not have the pieces of SAS/ACCESS for PC Files that are needed to read Excel files directly with the LIBNAME engine or PROC IMPORT.

    

  I don't understand what you mean by "ch.5,   p.181 of EG 6.1" -- what is name of the book or course you are using with SAS OnDemand for Professionals?? Is it the course Enterprise Guide 1: Querying and Reporting or the SAS Press book Little SAS Book or ??? In our e-learning courses, for the programming classes, we generally recommend that you skip over any of the exercises that involve using the LIBNAME engine or PROC IMPORT, since those will not work on the SAS OnDemand for Professionals server.

      

  There is an XLSX file called employee_info.xlsx in the ECEG151 folder on the SAS OnDemand for Professionals server. You can find it by following this path (clicking each folder to expand): SASApp server, then FILES, then BOOKDATA, then ECOURSES, then ECEG151. You can use the FILE-->IMPORT DATA technique to import employee_info.xlsx file. See the 4 steps attached.

cynthia


step1_select_file.png
step4_adv_options.pngstep2_select_workbook_sheet.pngstep3_check_attributes.png
🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 954 views
  • 0 likes
  • 2 in conversation