BookmarkSubscribeRSS Feed
tedway
Obsidian | Level 7

How do I copy a dataset to my clipboard in SAS Studio? There are situations when I want to copy a whole dataset or just specific rows to my clipboard so that I can paste in another application. I know I can always export it to Excel or whatever, but just being able to copy directly to the clipboard is really handy. Selecting the rows and hitting Ctrl+C doesn't work.

 

2 REPLIES 2
ballardw
Super User

The contents of SAS data sets are in a pretty proprietary format and almost nothing would be able to use "pasted" data at data set or row level.

 

If you don't want to "export" then you could run Proc Print for the desired rows (observations numbers using the OBS= and FirstObs= data set options) and copy from the result window.

 

Or describe what you want to do with that pasted data. We often see people taking data from SAS to perform actions that can be done directly in SAS.

Reeza
Super User
Not a way afaik, but there's the macro in the library about creating sample data and if you use that you can have it pasted to the log so you can copy/paste it.

Or similarily, run PROC PRINT and copy from there.

There used to be a feature in Base where you right click a data set and it opened in Excel or HTML, that was handy.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 2 replies
  • 3313 views
  • 0 likes
  • 3 in conversation