Ben Maxwell Posted January 27, 2021 Share Posted January 27, 2021 This is a follow-up to my previous post on installing traffic light icons into reports. When using this code I am see different results based on the output type. Code used is "<span style=color : green;> &|#x1F311; HTML output is XLXS output is '<span style=color : green;> &|#x1F311; XLS output is HTML comes out exactly as desired, XLXS totally brings back nothing, and XLS is close but not quite right. Any suggestions on how I can make the Excel outputs looks like the HTML Link to comment Share on other sites More sharing options...
David Beagan Posted January 28, 2021 Share Posted January 28, 2021 You can go with wingding or other font, for example: TABLE FILE ibisamp/ggsales SUM UNITS COMPUTE CIRCLE/A2 = CHAR(108); AS '' BY REGION ON TABLE PCHOLD FORMAT XLSX ON TABLE SET STYLE * TYPE=DATA, COLUMN=CIRCLE, SIZE=10, JUSTIFY=CENTER, FONT=WINGDINGS, $ TYPE=DATA, COLUMN=CIRCLE, WHEN=UNITS GE 930000, COLOR=GREEN, $ TYPE=DATA, COLUMN=CIRCLE, WHEN=UNITS LT 930000, COLOR=RED, $ ENDSTYLE END Use this code to see get a table of possible characters for different fonts and outputs: -DEFAULT &Font = 'WINGDINGS'; -DEFAULT &WFFMT = 'HTML'; SET PAGE=NOLEAD,ACROSSLINE=SKIP DEFINE FILE ibisamp/ggsales SEQ10/I2 = MOD(SEQ_NO, 10); SEQROW/I4 = SEQ - SEQ10; END TABLE FILE ibisamp/ggsales SUM SEQ_NO NOPRINT COMPUTE char/A1 = CHAR(SEQ_NO); AS '' BY SEQROW AS '' ACROSS SEQ10 AS '' WHERE SEQ_NO FROM 32 TO 255 ON TABLE PCHOLD FORMAT &WFFMT ON TABLE SET STYLE * TYPE=REPORT, SIZE=11, ORIENTATION=LANDSCAPE, BORDER=LIGHT, BORDER-COLOR=RGB(220 220 220), $ TYPE=ACROSSVALUE, FONT=ARIAL, BACKCOLOR=RGB(245 245 245), $ TYPE=DATA, SIZE=11, FONT=&Font, JUSTIFY=CENTER,$ TYPE=DATA, COLUMN=N1, SIZE=11, FONT=ARIAL, BACKCOLOR=RGB(245 245 245), $ ENDSTYLE END Link to comment Share on other sites More sharing options...
Ben Maxwell Posted January 28, 2021 Author Share Posted January 28, 2021 Thanks a lot David, that gave me what I needed to be able to create some nice traffic lights into XLSX. I never thought I would have a business need to use the WingDings Font, but that did the trick. Link to comment Share on other sites More sharing options...
David Beagan Posted January 28, 2021 Share Posted January 28, 2021 We went old school on that one. Glad it worked out. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now