Recent Activity
Hello
I am using ODS excel to export report into excel.
I want to color the sheet tab name based on a macro variable:
if there is an invoice>30,000 then sheet tab color be red, else be green.
So, as I understand need to define proc format that get color value based on the macro var.
What is the way to do it please???
proc sql noprint;
select max(case when invoice>30000 then 1 else 0 end ) as Ind_max_invoice_Gt_30K into :Ind_max_invoice_Gt_30K
from sashelp.cars
where Make="Honda"
;
quit;
ods excel file="/usr/local/SAS/SASUsers/LabRet/UserDir/udclk79/Honda_Report.xlsx"
options (sheet_name='Honda'
embedded_titles='yes'
embedded_footnotes='yes'
sheet_interval="proc"
gridlines = 'yes'
zoom='50'
tab_color=&Color_Fmt. /*Change TAB Color based on macro var Ind_max_invoice_Gt_30K : if =1 then Red , else Green*/
);
title 'Honda_Report';
proc report data=sashelp.cars contents="Honda Cars";
where Make="Honda";
column ("Car" make model) ("Cost" msrp invoice)
("Fuel Efficiency" mpg_city mpg_highway);
run;
ods excel close;
... View more

0
5
Can SAS Connect to duckdb? Using odbc or other libname engine?
Any experience?
... View more

0
9
I've got numeric zip code values of various length. I used z format in the example below. It worked for value that was 2 digits but I got weird results for the ones longer than 5. Is there a better way? data sample; input num_zip 8.; format num_zip 9.; put _all_; /*read un numeric values of various lengths*/ datalines; 23 7777777 999999999 ; run; data convert; set sample; zipcode=put(num_zip,z5.); run; proc print data=convert noobs; var zipcode; run; zipcode 00023 778E4 001E7
... View more

0
1
Hi - I would like to get rid of these apostrophes from first and last names. Currently names appear as: "Martha" and I would want to and up with Martha Should be simple enough, Thank you,
... View more

0
2
Want to know all of the latest announcements and what’s new in SAS Viya?
In this SAS Viya Release Highlights Show, we’re packing our bags and heading to Orlando to showcase the latest from SAS Innovate 2025 – SAS’ premier data and AI conference for data scientists, statisticians, data engineers, analysts, developers and C-level leaders.
We’ll be covering what’s new on topics such as SAS Data Maker, SAS Models, Agentic AI and more.
You’ll also get up to speed on the SAS Hackathon, Quantum AI, SAS Viya Workbench and AI governance.
Plus, you’ll hear about a new partnership between SAS and Epic Games!
If you weren’t able to join us at SAS Innovate in person, register for a complimentary Digital Pass to watch keynotes, breakout sessions, demos and more. Visit https://www.sas.com/digitalpass.
... View more

0
0
Unanswered topics
These topics from the past 30 days have no replies. Can you help?
Subject | Likes | Author | Latest Post |
---|---|---|---|
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
5 | |||
0 |