BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
FrankE
Fluorite | Level 6

Hi guys, I find myself with a problem and I can't seem to find the solution by searching...

All of our reporting is created via SAS 9.3 and outputted though the ExcelXP tagset.  I'd like to use the feature in Excel 2010 for Grouping (Data Ribbon --> "Group" button).  Is there any way to apply this via SAS when I'm creating the report?

The business issue is this:  We have records of customers which have subsidiaries.  In the final report I'd like to show the customer grouped with any subsidiaries it may own.  I know I could add a parmeter to the report to allow the user to include/exclude these rows but I think it might be cleaner to always include them but in a collapsed group with the parent company.  Any help would be appreciated! 

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  I do not think you can do what you want. For a test, I went into Excel and manually made a worksheet with groups set on the rows. Then I told Excel to save the file as XML Spreadsheet 2003 (which is the type of XML that TAGSETS.EXCELXP creates). When I tried to save the spreadsheet with groups as XML, I got the popup box that you see in the screenshot. I clicked YES, saved the file as 2003 XML and then reopened the file -- the group settings were gone.

  To me that says that there is no support for groups in the XML. If there is no support for groups in the XML, then there's nothing that TAGSETS.EXCELXP can do to put grouping commands into the file. SAS and ODS can only write what is allowed in Spreadsheet XML 2003, as defined by Microsoft.

  If you need collapsing, based on some category, would pivot tables work??? You can create pivot tables if you use ODS TAGSETS.MSOFFICE2K_X.

cynthia


msg_save_group_as_xml.png

View solution in original post

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

Hi:

  I do not think you can do what you want. For a test, I went into Excel and manually made a worksheet with groups set on the rows. Then I told Excel to save the file as XML Spreadsheet 2003 (which is the type of XML that TAGSETS.EXCELXP creates). When I tried to save the spreadsheet with groups as XML, I got the popup box that you see in the screenshot. I clicked YES, saved the file as 2003 XML and then reopened the file -- the group settings were gone.

  To me that says that there is no support for groups in the XML. If there is no support for groups in the XML, then there's nothing that TAGSETS.EXCELXP can do to put grouping commands into the file. SAS and ODS can only write what is allowed in Spreadsheet XML 2003, as defined by Microsoft.

  If you need collapsing, based on some category, would pivot tables work??? You can create pivot tables if you use ODS TAGSETS.MSOFFICE2K_X.

cynthia


msg_save_group_as_xml.png
FrankE
Fluorite | Level 6

Hey Cynthia, thanks again for your response.  I had a feeling that it wasn't possible as I didn't find anything about it on Google or these forums.  Although grouping would be nice, I can live without it.  Thanks for the help!

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!

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
  • 2 replies
  • 2118 views
  • 0 likes
  • 2 in conversation