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 2025: Call for Content

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!

Submit your idea!

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
  • 1970 views
  • 0 likes
  • 2 in conversation