BookmarkSubscribeRSS Feed
Yan
Calcite | Level 5 Yan
Calcite | Level 5


I am ods tagset.excelxp and proc report. The column centering worked in base SAS but not on EG. In the EG XML output the column indicated centered but the data cell is actually righ aligned. Can't figue out why.

3 REPLIES 3
Cynthia_sas
Diamond | Level 26

Hi:

  I cannot replicate your problem. When I use TAGSETS.EXCELXP, whether in EG or in Base SAS, with SAS 9.4 and EG 6.1, I do see centering. I see the centering in the SAS Report XML file and I see centering in the XML file created by TAGSETS.EXCELXP. See the attached screen shots and code. The style was used correctly in the EXCELXP output and the default style was used for the SASReport XML output.

  If your experience is different from this, then my recommendation is that you open a track with SAS Tech Support. (BTW, in order to see centering, sometimes you have to make the column wider to see the impact of centering -- in my program, I made the column wider with code.

cynthia


sas_report_xml_centered.pngexcel_centered.pngexcelxp_code.png
Yan
Calcite | Level 5 Yan
Calcite | Level 5

Thanks, Cynthia.

I tried your codes in my EG still right aligned. I guess it's probably something on the SAS server. I did open the xml file in notepad and found the following codes made the alignment happen.

<Style ss: ID="data" ss:Parent="table">

<Alignment ss:WrapText="1" ss:Horizontal="Right"/>

</Style>

When I run the local base SAS I won't see those style codes in the xml file generated.


Cynthia_sas
Diamond | Level 26

Hi, it's still not clear to me what you mean by "EG XML" -- EG uses SASReport XML by default. This is NOT the same as Spreadsheet Markup Language XML created by TAGSETS.EXCELXP. My code was run in SAS 9.4 from inside EG. Both of my outputs did have centered values -- the SASReport XML and the TAGSETS.EXCELXP XML. If you ran my code and did not get centered results, then you need to open a track with Tech Support so they can investigate in more detail. It could be the version of SAS on your server. It could be that your version of TAGSETS.EXCELXP needs to be updated. It is impossible to guess. That is what Tech Support can help you with.

cynthia

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