BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
msimolucasjames
Fluorite | Level 6

Dear colleagues of SAS Community, Hie am new member on SAS community, I have a question and a problem on how to import or upload data from Excel file into SAS Studio. For Analysis and how to go afterward for the data analysis in SAS Studio. So please give me a detailed step wise procedure on how to go about. As of now am already landed on my SAS Studio.

 

Thank you in advance once again 

 

With Kind regards,

 

 

Lucas James Msimo

S.A.O 

1 ACCEPTED SOLUTION

Accepted Solutions
sbxkoenk
SAS Super FREQ

Hello,

 

Welcome to the SAS Community!
I moved this topic to "SAS programming"-board. That's a more appropriate board for this question.

 

Here are some starters:

BR, Koen

View solution in original post

7 REPLIES 7
sbxkoenk
SAS Super FREQ

Hello,

 

Welcome to the SAS Community!
I moved this topic to "SAS programming"-board. That's a more appropriate board for this question.

 

Here are some starters:

BR, Koen

Haemoglobin17
Obsidian | Level 7

Hi Lucas!

In order to import an excel file into SAS Studio, you should first upload it into the SAS remote server. These are the steps:

1) create a folder to upload the file: On the top left, go to the section "Server files and folders". there is a square with an asterisk, go to the arrow headed down and select folder. You will see a square where you can choose a name for the new created folder.

2) upload your file: In the "Server files and folders" section, under "Files (Home)" you can find the newly created folder. Select it and go up, in the line immediately after the "Server files and folders", and select the upload icon. Now you can navigate to your file and upload it.

3) write a libname to link your file to the program editor, this is the code:

 

                                          libname Name_file " Path_file";

     To know the Path_file: go to your file, left click on it, go to properties and copy the location.

 

I hope this is helpful. 

Have a nice day 😉

msimolucasjames
Fluorite | Level 6

Thanks, for your reply and am trying on how to go about it,

within a minute I will be back to you.

 

With Kind regards

Yours 

 

Lucas James Msimo

msimolucasjames
Fluorite | Level 6

Hie Thanks for reply and helpful information on Importing Data from Excel file to SAS Studio.

I managed and however I stack here, see the results below. just at step seven (7) as proposed by Mathew Parker. So, from here I failed on how to Run the Code to generate the Dataset. and of course, to identify which is the code. I found information talking about the libname as the path-file is the code which may be seen on the properties on the studio. So, from this output results how should I go about Run the code to create or generate the data set.

/* Generated Code (IMPORT) */ /* Source File: Data for all 4 sites Final.xlsx */ /* Source Path: /home/u63661790 */ /* Code generated on: 11/6/23, 4:05 AM */ %web_drop_table(WORK.IMPORT); FILENAME REFFILE '/home/u63661790/Data for all 4 sites Final.xlsx'; PROC IMPORT DATAFILE=REFFILE DBMS=XLSX OUT=WORK.IMPORT; GETNAMES=YES; RUN; PROC CONTENTS DATA=WORK.IMPORT; RUN; %web_open_table(WORK.IMPORT);

sbxkoenk
SAS Super FREQ

Hello,

 

A couple of remarks:

  • If the question is not entirely solved yet (not fully solved yet), then do not mark it as solved. (You have already marked my 1st reply as the solution, with the consequence that other people won't look here anymore ... so you decrease your chances on getting a good answer)
  • If you want to copy / paste SAS code in your post, ...
    then COPY, then click the running-man-icon (Insert SAS Code icon) in the header, then PASTE your code in the pop-up box. That way, the code preserves formatting and is nicely formatted in your post.

As a response to your last query ...
Which version of SAS Studio are you using? 
If you are using SAS Viya 3.5 with SAS Studio V (SAS® Studio (Enterprise) Release 5.2)) ... then click on the + - sign, enter your code in the editor and "Run" (again you see the running-man-icon to click on and submit).

sbxkoenk_0-1699275416826.png

 

BR, Koen

msimolucasjames
Fluorite | Level 6

Moreover, thanks for your help and concern regarding my difficulties in importing data and Run the Studio to get the SAS output results. However, when I managed to Run the code to generate the Data set to be put into Work library, the following information appears. "The statement is not valid, or it is used out of proper order. So, from here I once again bag for your help SAS community.

 

Thanks, 

 

With kind regards,

 

 

Lucas James Msimo

sbxkoenk
SAS Super FREQ

Hello,

 

>> The statement is not valid, or it is used out of proper order.  
I need to see your LOG to know which statement is concerned.

 

Can you copy / paste your LOG??
For pasting LOG-content, you need to click </> icon (Insert Code) in the header banner just above. In the pop-up window, paste the LOG.

 

Thanks, Koen

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
  • 7 replies
  • 1322 views
  • 1 like
  • 3 in conversation