Hi!
I want to create an xml file in SAS (9.4), and I want it to include conditional formatting, so when you change a cell value in that xml file, that cell eg changes colour. I.e. I don’t want to define the cell value in SAS, but in Excel (2016). Is this possible? If so, how?
/Felicia
Thanks Cynthia. I attach an excel file that contains the conditional formatting I want to be produced in SAS. The thought is that the value of A1 is fixed, and the value of B1 can be changed in Excel (and thus change the color of cell A1). I will also try with Tech Support.
/Felicia
Hi,
it's really odd, but when I look at your sheet, the value of A1 is red and the value of B1 never changes color when I change the value in A1.
Looking at the Excel file itself, it appears that the formula specifies to change A1, not B1.
However, the question for Tech Support will be whether ODS EXCEL (the only destination that creates XLSX files) can insert the necessary XML into the XLSX zip archive, as shown below.
cynthia
For this specific problem, I would look at the following paper (or more accurately poster):
http://www2.sas.com/proceedings/sugi31/142-31.pdf
It describes how do create an Excel file from SAS with formatted values.
Excel uses the term conditional formatting, but SAS calls it traffic lighting. It appears that traffic lighting has been around for a while. The SUGI 31 paper I mentioned above was written in 2006. I have yet to try it myself with SAS 9.4.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.