- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have been working with SAS 9.4 software and now I am working with SAS studio. With SAS 9.4 it was very easy to "copy and paste" the SAS code to a word document because it keeps the format of SAS (colours, etc.) however I wasn't able to do it with SAS studio, is there any trick to do that simple task keeping the SAS format?
Many thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Are you using Paste Special or Paste?
Had a chance to test that, doesn't work in my two second test. I had to use the right click code, select and paste special. Even when selecting source formatting the colour was lost.
That's definitely annoying as heck.
One, long, workaround is to paste it into a different editor that does maintain the formatting and then into Word.
NotePad++ and VisualStudio both have extensions to color code your SAS programs.
@Sou1 wrote:
Hi,
I have been working with SAS 9.4 software and now I am working with SAS studio. With SAS 9.4 it was very easy to "copy and paste" the SAS code to a word document because it keeps the format of SAS (colours, etc.) however I wasn't able to do it with SAS studio, is there any trick to do that simple task keeping the SAS format?
Many thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You can do a two-stage copy/paste as mentioned elsewhere - copy from sas/studio to SAS Universal Viewer (download from here) and from the viewer to word.
The viewer will re-institute the formatting (looks the same as pc-sas program formatting), and the subsequent paste to word will preserve colors.
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set
Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets
--------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Will do that!
Many thanks to all for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@alexal Do you have any say on SAS Studio features to support or add?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@ChrisNZ ,
I've never tried to copy anything from the SAS Studio to Word. I've tried to copy SAS code from SAS Studio running on 9.4 M6 and SAS Viya 3.5, both of them didn't keep text style. Also, I've tried to copy the code from EG 7 and 8 and they do keep text style.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@alexal I meant: Do you have a way for this shortcoming to appear on the developers' radar?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@ChrisNZ I added it to the list here:
Not as good as the developers already working on it but a start at least.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I'd say it's harsh since that hasn't been the pattern in the past few years. The recent ones are more monitored and they are marking them as planned or not considered and updating when they implement it.
I do think they should blow away anything older than a few years though, otherwise it does become a graveyard for sure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I want to believe I contributed to some of the VA additions
even though the evidence points to the simplest and most useful improvements
https://communities.sas.com/t5/SASware-Ballot-Ideas/Add-a-label-field-in-SAS-VA/idi-p/264042
being rejected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I played around a little. This is an issue in the SAS Studio applet running in the context of the browser, as it does not send the coloring of the code to the clipboard. Other colored text (e.g. the log) is sent with the coloring when doing Copy from the same browser (in my case Safari on a Mac). Only the text in the code tab is copied black-and-white.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Sou1,
Which version of SAS Studio and which browser are you using?
I am able to copy code from SAS Studio and paste it in Word with the syntax highlighting intact, but only if I use Chrome and only if I copy the code using the "Copy code" icon on the editor's toolbar, which is highlighted in this screenshot:
Here is how it displays after I paste it in Word:
This works for me in both SAS Studio 3.6 and SAS Studio 3.8. It does not work for me if I use the CTRL+C shortcut or if I right click --> Copy. It also does not work for me if I use Firefox instead of Chrome. So the workaround is a little specific, but it at least avoids the need to have an intermediate copy/paste step.
Does this work for you?
-Brian