BookmarkSubscribeRSS Feed
PaigeMiller
Diamond | Level 26

SAS 9.3 TS1M2, Windows 7 Pro 64 bit

Tagsets.Excelxp version v1.130

I want to create an Excel spreadsheet with two tabs. I have that working properly using ODS Tagsets.Excelxp and PROC REPORT, except for one little thing ...

I want different titles on each tab, and I want the titles in a single merged cell at the top of each worksheet. I have no problem getting different titles on each worksheet, however, the merging never works properly on the 2nd tab. It always (as far as I can tell) uses the number of columns in tab 1. For example, tab 1 has 7 columns and tab 2 has 10 columns defined, and on tab 2, no matter what I do, the title is merged across 7 columns, not 10. Yes, there are 10 columns from PROC REPORT being output to Tab2. Is this a bug, or a user error?

Outline of code:

ods tagsets.excelxp file="myfilename.xml" options(sheet_name="Tab1" embedded_titles='Yes' Absolute_Column_Width='(4,12,10,10,10,10,10)' merge_titles_footnotes='Yes');

title 'Some Title';

proc report data=...

run;

ods tagsets.excelxp options(sheet_name="Tab2" embedded_titles='Yes' Absolute_Column_Width='(4,12,10,10,10,10,10,10,10,10)' merge_titles_footnotes='Yes');

title 'Some Different Title';

proc report data=...

run;

ods tagsets.excelxp close;

--
Paige Miller
4 REPLIES 4
Cynthia_sas
Diamond | Level 26

Hi:

  I see the behavior you describe, but I don't know whether there is a workaround for it or not. The only folks who might know would be Tech Support. I'd suggest you open a track with Tech Support on this question. If this is something that needs to be fixed in the tagset template for the destination, then Tech Support can open a defect and alert the developers.

cynthia

PaigeMiller
Diamond | Level 26

Thanks, Cynthia. I will do that and report back to this thread whatever the final resolution is.

--
Paige Miller
PaigeMiller
Diamond | Level 26

This is a known bug. See http://support.sas.com/kb/46621

SAS was kind enough to provide code for a work-around.

--
Paige Miller
tanyach
Calcite | Level 5

Would you share the work-around?  We have the same issue with SAS 9.3 tagsets that came with installation.  We did not see the same issue in SAS9.2

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 2432 views
  • 0 likes
  • 3 in conversation