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.

Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 396 views
  • 0 likes
  • 2 in conversation