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
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?
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?
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.
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.
@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.
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 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: