BookmarkSubscribeRSS Feed
ABZ
Calcite | Level 5 ABZ
Calcite | Level 5

Hi, I am new to SAS add in for Excel, and  I'm trying to create age categories from a numeric age variable (i.e., take varaible age in years and break it into ages 16-30,31-50,51-64. I've tried using the split columns task, but no luck. Suggestions?

5 REPLIES 5
Kurt_Bremser
Super User

The SAS Add-In for Microsoft office can only deliver data from SAS; either from datasets, multidimensional cubes, or stored processes. It does not offer a program interface, for this you either need SAS Studio or Enterprise Guide.

So you either do your logic in Excel, or you switch to programming the logic in SAS, using one of the aforementioned tools. From there you can either use the Add-In to retrieve the manipulated data (store the resulting dataset in a permanent library), or you can export to an Excel workbook.

ABZ
Calcite | Level 5 ABZ
Calcite | Level 5
Thanks! So I basically have to create the new variables in excel first? Do you know what the “Split Columns” task in SAS add-in is used for?


ChrisHemedinger
Community Manager

Actually, the SAS Add-In for Office does offer a program editor interface now!  You can create and run SAS programs, if you want.


However, the approach to your problem is probably best served by using SAS formats, which allow you to define age ranges into categories, then create a report based on those categories.

 

The Create Format task is not part of the SAS Add-In menu (I don't think) -- so you could do that step in code or via SAS Enterprise Guide, then store the format definition in a library that you can access in your SAS Add-In for Microsoft Office session.  Then the Summary Tables report or even One-Way Frequencies could be used.

 

Or you can add these classifications to Excel -- then the range rules would be part of your spreadsheet, not part of your SAS process.  That's up to you.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
Kurt_Bremser
Super User

@ChrisHemedinger wrote:

Actually, the SAS Add-In for Office does offer a program editor interface now!  You can create and run SAS programs, if you want.

 


Heh. Have to test that out, once I'm through with the upgrade to SAS 9.4 😉

 

Althought my preferred method will always be to keep the logic in SAS codes that can be reviewed & versioned. Makes for a simpler life with auditors.

ChrisHemedinger
Community Manager

You can see this feature in action - here's a demo from the SAS R&D developer!

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 5 replies
  • 804 views
  • 0 likes
  • 3 in conversation