BookmarkSubscribeRSS Feed
NCNyrk
Calcite | Level 5
Elsewhere I have seen that it was suggested to use

style={tagattr="\000000"};

to retain leading zeroes in XML. It works fine for 5-or less digits, but when I have a 6-digit number, an extra leading 0 is appearing in Excel:

SAS 234567 --> Excel 0234567

I have also tried style={tagattr="format: @"}; but no leading zeroes are retained in that case.

Any other ideas?
2 REPLIES 2
Eric_SAS
SAS Employee
This works fine for me when I use a format of 00000.

What does excel say the format is for your cells?
Chevell_sas
SAS Employee
Make sure that you have the downloaded the latest ExcelXP tagset from the ODS Markup page. Using the text format "@" should have worked as well.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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