The SAS Output Delivery System and reporting techniques

TAGSETS.EXCELXP proc report maintain numerci format

Reply
Frequent Contributor
Posts: 82

TAGSETS.EXCELXP proc report maintain numerci format

 Hello,

I export a report (via proc report) into excel and I would like to keep a specifiq numerci format.

When I launch this code below, it works. I mean, in excel the number is kept into numeric format

define MNT_MOIS_AMO_AVT_SORTIE / '' style(column)={tagattr='format:000 000 000.00'};

 

but I create this format named "frmt_num_spac_comma" via proc format .

so I try this

define MNT_MOIS_AMO_AVT_SORTIE / '' style(column)={tagattr=frmt_num_spac_comma.};

but it does not work.

how could I specify the created format ? thanks a lot for your in advance.

Nasser

Frequent Contributor
Posts: 82

Re: TAGSETS.EXCELXP proc report maintain numerci format

Posted in reply to Nasser_alfea

for exmple the value 225353,74382 I would like to get in excel, a number (and not text)  like 225 353,74382 (with space thousand and ',' separator).

but with this below, I get the correct displayed but it is a text

define MNT_MOIS_AMO_AVT_SORTIE / '' f = frmt_num_spac_comma.

 

And with this below, I get a number but the display is not correct 000 225 353,74000

define MNT_MOIS_AMO_AVT_SORTIE / '' style(column)={tagattr='format:000 000 000.00000'} ;

 

 

Super User
Super User
Posts: 8,380

Re: TAGSETS.EXCELXP proc report maintain numerci format

Posted in reply to Nasser_alfea

You can only use formats which are in Excel.  Basically Excel takes the text you create and interprets it internally before rendering it, so if it doesn't recognise a format then it doesn't use it.  Have a look at the formats in Excel, there are many of them.  If that doesn't cover it then you need to create a custom format in Excel and store to normal.dot.  Outside the scope of this forum though.

https://support.office.com/en-us/article/Create-or-delete-a-custom-number-format-78f2a361-936b-4c03-...

Frequent Contributor
Posts: 82

Re: TAGSETS.EXCELXP proc report maintain numerci format

thank you very much.

so I started to create a format within, excel like # ##0,00000'

and then in proc report I do this :

define MNT_MOIS_AMO_AVT_SORTIE / '' style(column)={tagattr='format:# ##0,00000'}

I get a number but I only get 2 decimales instaed of 5

 

Ask a Question
Discussion stats
  • 3 replies
  • 130 views
  • 0 likes
  • 2 in conversation