SAS Program Editor in Microsoft 365

  • SAS Viya
  • Microsoft 365
  • Excel
  • PowerPoint

By Carrie Foreman

The SAS Add-in for Microsoft 365

Did you know that you can integrate SAS and Microsoft functionality within Excel, Word, PowerPoint, and Outlook?


You can integrate common Microsoft 365 applications with SAS Viya using the SAS Add-in for Microsoft 365 which is available through both the desktop and web interfaces and provides access to data, reports, and SAS programs.

The editor is available through the SAS ribbon within Microsoft 365 allowing users to login using their SAS Viya login details:

The add-in allows users to access the following resources whilst maintaining the link to the SAS data to automate updates for:

  • Accessing both in-memory (CAS) and SAS tables
  • Use excel formatting to fully embed results into documents
  • Embed Visual Analytics report elements including graphs and tables
  • Upload data directly from Excel to CAS
  • Delete data from CAS

SAS Program Editor in Microsoft 365

Did you know that the SAS program editor is available to use within the Add-in to Microsoft Excel for SAS Viya?

The SAS program editor can be enabled by an administrator within SAS Viya by following the steps in the following SAS Note:

Once enabled, users can then access the “Programs (Preview)” tab within the add-in window.

This window contains a subset of the functionality which you have within SAS Studio.  Any code which you draft in SAS Studio can be directly copied into the Program window and the corresponding log and results windows are still available.

Code can be directly typed into the code editor.  Here we have a simple PRINT procedure on one of the SASHELP data sets.

Similar to other code editors, select the run button to run the code on the SAS Viya platform.

Once the code has run, the Log Window provides any errors or warnings which may have been produced by the code run – including a handy summary at the top for quick access to the different types of message.

The final tab displays the results of the code:

The results of the code run can be added to the excel spreadsheet by selecting encircle icon above

If any changes are made to the code and it is re-run, the results in the excel spreadsheet can be refreshed by selecting the icon

SAS Viya Programming Course
Back to Insights

Related content

Talk to us about how we can help