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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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