The SAS Output Delivery System and reporting techniques

ExcelXP, use Excel's "Group" feature?

Accepted Solution Solved
Reply
Contributor
Posts: 53
Accepted Solution

ExcelXP, use Excel's "Group" feature?

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! 


Accepted Solutions
Solution
‎04-27-2012 03:17 PM
SAS Super FREQ
Posts: 8,868

Re: ExcelXP, use Excel's "Group" feature?

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


All Replies
Solution
‎04-27-2012 03:17 PM
SAS Super FREQ
Posts: 8,868

Re: ExcelXP, use Excel's "Group" feature?

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
Contributor
Posts: 53

Re: ExcelXP, use Excel's "Group" feature?

Posted in reply to Cynthia_sas

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!

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 930 views
  • 0 likes
  • 2 in conversation