BookmarkSubscribeRSS Feed
ASC1
Calcite | Level 5

When I copy a SAS Report that's formatted html blue then paste into Excel, the html blue format isn't retained when I select Keep Source Formatting.

 

We recently upgraded to version 8.4 Update 2 (8.4.2.22) (64-bit) from 7.1.  Before the upgrade, the format of the SAS Report would be retained when pasting into Excel.  

 

The need to copy and paste is on an ad-hoc basis so I don't want to used ods excel to export.  How can I retain the SAS Report formatting when pasting into Excel?

5 REPLIES 5
PaigeMiller
Diamond | Level 26

Instead of copy/paste, use ODS EXCEL

 

Example:

 

ods excel file='temp.xlsx';
proc something data=whatever;
...
run;
ods excel close;
--
Paige Miller
ASC1
Calcite | Level 5

ODS EXCEL isn't ideal because the SAS Report being copied/pasted is from a step later in a process.  The report is being pasted into a file previously exported using ODS EXCEL so I don't want to recreate it or create a second exported file that has to be merged into the original file. 

 

Process is:

Initial file is created using ODS EXCEL

User makes selections in the exported file, then uploads the file to update tables on a server

A SAS Report with a summary of selections and calculations is created - this is what we have been able to paste into the original file and retain html blue when using version 7.1

 

Is there an Add-In that's needed or a setting I need to change to keep the formatting when pasting?

ballardw
Super User

Please describe exactly what "format" is involved. Not the name but the actual property- font, font size, cell color, borders, what.

 

Also what output is this copied from?

Note that copy/paste is going to be limited to what the clipboard can get which varies depending on source.

 

 

ASC1
Calcite | Level 5

Screenshot 2024-10-24 103444.png

In the above: The left is how it appears in Excel when pasted. The right shows how it appears in the SAS Report. 

 

Below shows the Style selected for SAS Report.

 

Screenshot 2024-10-24 104235.png

ChrisNZ
Tourmaline | Level 20

There are various menu entries iirc. Have you tried them? I don't remember the exact phrase, but something like Sent to or Open with or View with.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 869 views
  • 0 likes
  • 4 in conversation