Desktop productivity for business analysts and programmers

SAS Charts in Excel

Accepted Solution Solved
Reply
Contributor
Posts: 49
Accepted Solution

SAS Charts in Excel

Hey Everyone

 

So I am still fairly new to EG. I created a couple of graphs in EG and copied them to Excel. Now they are 'objects' in Excel, but I cant move them or delete them. How do I do this? I tried googling, but can't find anything on the topic.

 

I'd appreciate the help..

 

GD


Accepted Solutions
Solution
‎02-20-2018 10:54 PM
Super User
Posts: 24,026

Re: SAS Charts in Excel

I'm suspecting that you're getting HTML mixed in the file somehow. I would consider clicking your results and select export to Excel, rather than copy and paste to see what you get. 

 

I'd probably lean towards saying generate the charts from SAS the more 'modern' and automated way using ODS EXCEL. 

What version of SAS are you using?

 

You'll need to change the path to a path that makes sense for your installation.

 

ods excel file='/folders/myfolders/demo.xlsx';

proc sgplot data=sashelp.class;
scatter x=height y=weight / group=sex;
run;

ods excel close;

View solution in original post


All Replies
Super User
Posts: 24,026

Re: SAS Charts in Excel

The charts are not Excel charts, they're objects so that's correct. You cannot edit them like you would an Excel chart, but you should be able to delete them simply by clicking on them and hitting the delete button.  And you can 'edit' them as objects usually by clicking format objects (after right click).

 


GenDemo wrote:

Hey Everyone

 

So I am still fairly new to EG. I created a couple of graphs in EG and copied them to Excel. Now they are 'objects' in Excel, but I cant move them or delete them. How do I do this? I tried googling, but can't find anything on the topic.

 

I'd appreciate the help..

 

GD


 

 

Contributor
Posts: 49

Re: SAS Charts in Excel

That doesn't work though.

When I click on it, it doesn't look like it is selecting anything, and if I hit delete then nothing happens.

When I click on a spesific bar in the chart, it highlights it. Also when I right click on the chart I get the following pop-up....but still cant move or delete it.

 

image.png

Solution
‎02-20-2018 10:54 PM
Super User
Posts: 24,026

Re: SAS Charts in Excel

I'm suspecting that you're getting HTML mixed in the file somehow. I would consider clicking your results and select export to Excel, rather than copy and paste to see what you get. 

 

I'd probably lean towards saying generate the charts from SAS the more 'modern' and automated way using ODS EXCEL. 

What version of SAS are you using?

 

You'll need to change the path to a path that makes sense for your installation.

 

ods excel file='/folders/myfolders/demo.xlsx';

proc sgplot data=sashelp.class;
scatter x=height y=weight / group=sex;
run;

ods excel close;
Contributor
Posts: 49

Re: SAS Charts in Excel

I'm on EGv7.1 and Excel 2013.
i generated a graph with a bar-line task. Then on the ODS results tab, I clicked on the graph so that it was a dashed out-line. Copy and past directly into Excel.
But then this thing really misbehaves! I can't move it. And when I change my zoom level in Excel, these SAS graphs just does really wierd things.
Super User
Posts: 24,026

Re: SAS Charts in Excel


GenDemo wrote:
I'm on EGv7.1 and Excel 2013.

 

 

That's your EG version, not SAS version. Run the following to see your version, it'll look something like


For Base SAS Software ...
Custom version information: 9.4_M5
Image version information: 9.04.01M5P090617
 
proc product_status;run;
 
I strongly suspect you're copying over the HTML instead of the graph object and that's causing the issue. EG gives you several options to get your results out and copy and paste not working as expected isn't surprising at all. 
Contributor
Posts: 49

Re: SAS Charts in Excel

For Base SAS Software ...
Custom version information: 9.4_M4
Image version information: 9.04.01M4P110916
For SAS/STAT ...
Custom version information: 14.2
For SAS/GRAPH ...
Custom version information: 9.4_M4
For SAS/CONNECT ...
Custom version information: 9.4_M4
For SAS Enterprise Miner ...
Custom version information: 14.2
For SAS Integration Technologies ...
Custom version information: 9.4_M4
For High Performance Suite ...
Custom version information: 2.2_M5
For SAS/ACCESS Interface to PC Files ...
Custom version information: 9.4_M4
For SAS/ACCESS Interface to ODBC ...
Custom version information: 9.4_M4
NOTE: PROCEDURE PRODUCT_STATUS used (Total process time):
real time 0.37 seconds
cpu time 0.11 seconds

 

 

Yeah i only have the SAS Results box checked

image.png

Super User
Posts: 24,026

Re: SAS Charts in Excel

Did checking Excel get you a better version? 

Contributor
Posts: 49

Re: SAS Charts in Excel

Then I get no graph! its so wierd. I get a totally empty Excel sheet.
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 8 replies
  • 282 views
  • 2 likes
  • 2 in conversation