BookmarkSubscribeRSS Feed
PaigeMiller
Diamond | Level 26

I am trying to read monthly Excel pivot tables into SAS (there are about 100 such Excel files), and create a single SAS data set. Normally, I can do this via macros or CALL EXECUTE without needing help. But the part that has me stumped is that there is a dropdown menu in Excel which is set to 0 for all of these spreadsheets (see below), and I need to obtain the values when this dropdown menu is set to "All". Can I set the dropdown menu to "All" using SAS programmatically, or do I have to go into each pivot table and manually set the dropdown menu to what I want and then manually re-save the Excel files, so I can then read them properly?

 

This is the dropdown menu in cell B1, set to zero (which is not what I want)

 

PaigeMiller_0-1685535224254.png

 

--
Paige Miller
1 REPLY 1
ChrisHemedinger
Community Manager

Paige, I don't think you'll be able to get SAS to set this for you.

 

You could automate the process using VB Script or PowerShell -- plenty of examples around that. You can automate pretty much any action that you can do in the UI. You can record the action as an Excel macro and examine the script to get a view into what it takes.

SAS Hackathon registration is open! Build your skills. Make connections. Enjoy creative freedom. Maybe change the world.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1 reply
  • 222 views
  • 0 likes
  • 2 in conversation