From the course: SAS® 9.4 Cert Prep: Part 02 Accessing Data

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Demo: Using a library to read Excel files

Demo: Using a library to read Excel files - SAS Tutorial

From the course: SAS® 9.4 Cert Prep: Part 02 Accessing Data

Demo: Using a library to read Excel files

- [Instructor] We're going to create a library to connect to an Excel workbook and then reference that Excel data in our SAS Program. To start with let's take a look at the Excel workbook. Specifically the Storm Summary spreadsheet. I want to point out that the Hem NS and Hem EW columns both have a space in the column headers. We want to make sure when we read this data that those column headers have underscores replacing the spaces. So now back to SAS Studio. First I'll complete the option statement to add the VALIDVARNAME=V7 option. So remember the VALIDVARNAME=V7 option enforces our SAS naming rules so those spaces will be replaced with underscores. Next I'll compete the LIBNAME statement to connect to our Excel workbook. I'll name the library xlstorm and we'll use the xlsx engine. And then in quotes I'll provide the path and file name for the Excel workbook I want to read. At this point I'll run those two…

Contents