BookmarkSubscribeRSS Feed

Uploading Tables to SAS and CAS Libraries using SAS for Microsoft 365

Started ‎08-27-2024 by
Modified ‎08-30-2024 by
Views 550

SAS for Microsoft 365 enables users to seamlessly integrate the capabilities of SAS with Microsoft applications. This post will illustrate how to upload existing Excel tables to SAS and CAS libraries using SAS for Microsoft 365. While demos in this blog were performed using the desktop version of Excel, they can also be performed in the Excel web app.

 

I recently visited Glacier National Park and saw a variety of animals including bears, goats, and eagles. Curious to learn more about the animals I saw, I created a table of the most common animals found in Glacier National Park. This table includes information on the species, color, average weight, and average lifespan of each animal. This table is saved in an Excel workbook called Glacier on my desktop and my goal is to upload it to a SAS library called ANIMALS.

 

01_ST_glaciertable.png

Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.

 

I open the Glacier workbook in Excel, click SAS Viya > Home on the top ribbon, and sign in with my credentials in the SAS Viya pane. I click anywhere on table and click the Upload Data icon.

 

02_ST_logon.png

 

03_ST_clickingud-1.png

 

A box appears that allows me to choose which cells of the table to include (the default is the entire table) and has an option to identify the first row as column names.

 

04_ST_box.png

 

Note: If you forget to click on the table before clicking Upload Data, no columns are selected. To fix that, simply click anywhere on the table and select the Update with current Excel selection icon.

 

05_ST_nocol.png

 

06_ST_refresh1.png

 

The table also displays column properties including the name, label, type, length, and format of each column. You can click a column and the Edit column properties icon to change any of the column properties.

 

07_ST_editbutton.png

 

08_ST_columnprop.png

 

Going back to the Glacier data, I don't want to make any changes to the column properties so I click Upload data and a list of available SAS libraries appears. I select the ANIMALS library as the location for the table, call the table Glacier, and click Save as.

 

09_ST_Animals.png

 

If I wanted to save the table to a caslib, I could click the Create a default CAS session and assign SAS librefs for existing caslibs icon. Available caslibs appear in the list of connected libraries.

 

10_ST_cas_session-1.png

 

11_ST_casuser.png

 

Using the Upload data feature allows users to quickly and easily upload existing tables to libraries directly in Excel and does not require any programming to do so. To learn more about SAS for Microsoft 365 please visit SAS for Microsoft 365 | SAS Support.

 

 

Find more articles from SAS Global Enablement and Learning here.

Version history
Last update:
‎08-30-2024 01:55 PM
Updated by:
Contributors

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags