BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Sylas
Fluorite | Level 6

Hi ,

I am displaying the Number variable in a dataset to excel having properties in cell as number.(Using excelXP tagsets for doing this)

But by using the tagattr='format:#,##' but i am getting the column properties in excel as Custom and zero value in the dataset is getting empty value in excel

Anybody help me to get the solution for the above said two problem.

Thanks

Sylas.J

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi, I am having a hard time understanding what your data looks like, what your code looks like and without any data or code to play with, it's only a guess as to what you are seeing.

  However, it has been my understanding that if you are not explicitly defining a format for 0 inside TAGATTR, as described in my SGF paper (http://support.sas.com/resources/papers/proceedings11/266-2011.pdf , page 8), then you needed to define your format like this:

#,##0  instead of #,### otherwise, I think the # serves to suppress a zero value.

This is my understanding:

The use of the '#‘ in the Microsoft format for the percent plays a different role than the '0‘ in the format specification. A "#" in an Excel format displays one or more numeric digits, excluding insignificant zeros, and the "0" instructs Excel to display a single numeric digit, including insignificant zeros.

cynthia

View solution in original post

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

Hi, I am having a hard time understanding what your data looks like, what your code looks like and without any data or code to play with, it's only a guess as to what you are seeing.

  However, it has been my understanding that if you are not explicitly defining a format for 0 inside TAGATTR, as described in my SGF paper (http://support.sas.com/resources/papers/proceedings11/266-2011.pdf , page 8), then you needed to define your format like this:

#,##0  instead of #,### otherwise, I think the # serves to suppress a zero value.

This is my understanding:

The use of the '#‘ in the Microsoft format for the percent plays a different role than the '0‘ in the format specification. A "#" in an Excel format displays one or more numeric digits, excluding insignificant zeros, and the "0" instructs Excel to display a single numeric digit, including insignificant zeros.

cynthia

Sylas
Fluorite | Level 6

Hi Cynthia,

The above said solution resolves the issue i faced, thank you very much for your solution.

Regards

Sylas.J

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 888 views
  • 1 like
  • 2 in conversation