BookmarkSubscribeRSS Feed
j2m2brown24
Calcite | Level 5

In the past, I have used Excel or Word to create SAS recode programs and copied them into a SAS program in SAS EG. I am new to SAS University Studio and am trying to do the same. Can someone help and tell pe how I wpuld copy the code? 

 

I highlight the code in Excel but can't click paste in the SAS Studio program.

 

Thanks

6 REPLIES 6
Tom
Super User Tom
Super User

Highlight the text.

Copy the text, usually just use Ctril-C.

Make sure that you have focus in an editor window in SAS/Studio.  If unsure if you have focus hit Enter and see if a new line is inserted.

Paste the text. usually just use Ctrl-V.

 

You can probably also try to drag and drop the text, but why?

samdupont
SAS Employee

Not being able to use the Copy or Paste icons or context menu is a browser security thing. Only keyboard shortcuts work  It's crazy I know, but if you're interested just google "not pasting into a browser". I did that and this was one of the first hits...  

 

Why you can't copy/paste in a browser?

 

Reeza
Super User

It varies from browser to browser it seems. IE is very restrictive, on Safari I find I have to use the menu not the buttons that may be due to the non-mac keyboard issues I have sometimes.

Kurt_Bremser
Super User

Just tested it with

SAS 9.4 on AIX, SAS Studio 3.3

Windows 7 Professional

MS Word 2013

PaleMoon browser (fork from Firefox), 27.3.0 (current)

Ctrl-C in Word and Ctrl-V in the browser worked perfectly.

 

Since neither Word (ugh) or Excel (vomit) provide any syntax help, what's the use in writing code there? The SAS enhanced editors are much better for that.

Since SAS code is always plain text, any "simple" text editor like notepad++ or UltraEdit is much better suited for programming work, if you want to use an external editor at all. Some of those can even be trained to do syntax highlighting.

ballardw
Super User

@Kurt_Bremser wrote:
 

Since neither Word (ugh) or Excel (vomit) provide any syntax help, what's the use in writing code there? The SAS enhanced editors are much better for that.


Perhaps the OP is doing something similar to one of my limited uses of Excel: Turning a layout document with variable name, type, length and description information into Informat, Input and Label statements. Which can go much faster for some of the data sources I get to play with when the documentation is actually well structured (and often 100+ variables). A few formulae in Excel will generate pasteable text for such routine repetitive and tedious tasks. Just on Label statements I've saved hours worth of typing out field descriptions for single datasets.

 

 

 

j2m2brown24
Calcite | Level 5
Thanks to all responder. Great advice.

Any thoughts on how to copy code, log and listings to a Word document in a cut paste method?

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 6 replies
  • 2402 views
  • 2 likes
  • 6 in conversation