BookmarkSubscribeRSS Feed
anirban_chakra
Calcite | Level 5

I want to change the background color of an excel sheet from R1C1 to R1C10 in an excel sheet. On submitting the below code:

 

filename final dde 'excel|sheet1!r1c1:r1c10' ;
data _null_;
file final;
put '[patterns(1,0,15)]';
run;

 

the text  [patterns(1,0,15)] gets printed in the cell-R1C1, without any background color.

 

Thanks

1 REPLY 1
Reeza
Super User
I don't have anything I can test this out on now, but I can see some issues.

You set the reference to your range but don't actually select it. Make sure to select the cells.
Once cells are selected try the pattern statement again.

If you search on lexjansen.com for a papers on DDE you'll find many references and examples.

A relevant one for you is here on the bottom of Page 3, with a demo of setting a range to a light grey.

http://www2.sas.com/proceedings/sugi27/p190-27.pdf

PS. DDE is considered very old school. If you can, consider using ODS Tagsets.ExcelXP or ODS Excel (SAS 9.4+) instead.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 1 reply
  • 1757 views
  • 0 likes
  • 2 in conversation