BookmarkSubscribeRSS Feed
i_Van
Fluorite | Level 6

Hello,

 

Is it possible to export dataset to excel defining colour filling and excel format for each cell?

 

The dataset is formed like:

Segment   Name        Value

earnings   local_calc  100

earnings   reported     120

earnings   difference   0.20     (=reported-local / local)

spends .....

 

But in EXCEL I want:

 

Segment   Name        Value

earnings   local_calc  100$

earnings   reported     120$

earnings   difference   20%     (=reported-local / local)

spends .....

 

in EXCEL I want to have format regarded on Name column (if Column = difference then PERCENTN10.1 else DOLLAR10) and highlight differences more than 10% by filling cell yellow.

1 REPLY 1
Patrick
Opal | Level 21

You can use Proc Export with styles for this. Do some searching for examples here in this forum and/or via Google. 

Use as search terms something like Proc Report and Conditional Formatting.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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