BookmarkSubscribeRSS Feed
felicity1212
Calcite | Level 5

hi- i have a dataset "allproviders"

i would like to export the data in allproviders to multiple tabs based on change in "providername".  So for every group of "providername" i would like a new excel worksheet.  I found this thread https://communities.sas.com/message/13594#13594, but not sure how to use the code.  Can someone help me with code using my dataset names so that I can undestand it? I am completely new to SAS programmaing.

Thank you kindly

2 REPLIES 2
Cynthia_sas
Diamond | Level 26

Hi:

  I just posted a simple example to your other forum posting. I am teaching today and not on a computer where I can do downloads. However, SASHELP.CLASS has 19 observations and 5 variables. You should be able to run my code posted in your other forum post and figure out how to use your dataset name and variable names with my code.

https://communities.sas.com/message/130211#130211

But run the code first and see if you can figure out what's what. SASHELP.CLASS is the name of the dataset and AGE is the name of the BY variable. So if your variable is called PROVIDERNAME or PROVNAME, then where I have BY AGE, you would have BY PROVNAME or BY PROVIDERNAME in your code.

Then where I have a VAR statement, you would use your other variables instead of NAME, AGE, SEX, HEIGHT and WEIGHT.

cynthia

felicity1212
Calcite | Level 5

thank you cynthia!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 2 replies
  • 3394 views
  • 1 like
  • 2 in conversation