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

Something missing?

ods tagsets.ExcelXP file='D:\Admin\CA_NIC.xml' style=printer;

ods tagsets.ExcelXP options(sheet_interval='bygroup' sheet_label='Distrct'

absolute_column_width = '6,10,11,11,25,10,25,6,6,6,30,25,11,11,11,11');

Title 'Current Quarter Assets vs. Previous Quarter';

Proc print data=Admin.Canicmerged noobs label split='*';

by lead_ofc_id;

var id_rssd;       

var    PctDiff    / Style={tagattr='format:0.00;[Red]\(0.00\)'};   

var    &qtr2    ;   

var    &qtr1    ;   

var    idrssd    ;   

var    supr_event_nr    ;

1 ACCEPTED SOLUTION

Accepted Solutions
mikersas
Obsidian | Level 7

The problem was that the field was formatted as NEGPAREN8.2 in the table.

As soon as I changed it to 8.2 and recreated the table - it worked.

Thanks all!

View solution in original post

4 REPLIES 4
data_null__
Jade | Level 19

Sometimes style overrides don't work and you have to create new style elements.

proc template;                                               
  
define style styles.my_journal;                          
     
parent=styles.journal;                                 
     
style angle_header from header / tagattr = 'rotate:45';
     
style red_data from data    / tagattr='format:0.00;[Red]\(0.00\)';
     
end;                                                   
  
run;             

data test;
   do x = -1 ,1,-2,1,-100000;
     
output;
     
end;
  
run;
ods tagsets.excelxp file='~/red.xml' style=my_journal;
proc report nowd list;
  
columns x;
   define x / display style(column)=red_data style(header)=angle_header 'Traffic Light';
  
run;
ods tagsets.excelxp close;

10-22-2014 6-05-54 AM.png  
   
                                                             
mikersas
Obsidian | Level 7

Same result.  Is the number supposed to be stored by excel as text? Maybe I should change the format in the table.

mikersas
Obsidian | Level 7

The problem was that the field was formatted as NEGPAREN8.2 in the table.

As soon as I changed it to 8.2 and recreated the table - it worked.

Thanks all!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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
  • 4 replies
  • 1822 views
  • 3 likes
  • 3 in conversation