LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 20 Sep 2007 11:58:05 -0600
Reply-To:   Alan Churchill <savian001@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Alan Churchill <savian001@GMAIL.COM>
Subject:   Re: How do I create a bar chart in excel from sas
Comments:   To: robert.sayre@acxiom.com
In-Reply-To:   <B84879D70E8C1C418A6C8DA90F733134E308E3@A-EXCH-VS1.amylin.com>
Content-Type:   text/plain; charset="iso-8859-1"

As I will always suggest, the problem is not a SAS one but an Excel issue. Spin it around and do it from the Excel side and simply read in the SAS data in Excel.

SAS, after transformations, is simply a data repository (no sleight to SAS's other abilities). As such, it can be read in as a database table using SAS's FREE OleDb interface. Use Excel to then do the chart.

If you are using Excel 2007, you could roll your own XML and make it happen as well. Excel 2003 and before require a 3rd party dll or using Excel's COM interfaces.

Alan

Alan Churchill Savian www.savian.net

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Huang, Ya Sent: Thursday, September 20, 2007 11:45 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: How do I create a bar chart in excel from sas

Take a look at Chang's solution for line graph, maybe you can come up something for bar graph?

http://listserv.uga.edu/cgi-bin/wa?A2=ind0408a&L=sas-l&O=A&P=7934

-----Original Message----- From: Sayre Robert - rsayre [mailto:robert.sayre@acxiom.com] Sent: Thursday, September 20, 2007 10:23 AM To: Huang, Ya Subject: RE: Re: How do I create a bar chart in excel from sas

Thanks for the reply. Unfortunately, I need it to look like a real excel graph, not just the list output in a spreadsheet. Do you know of any way to do this? --Bob

-----Original Message----- From: Ya Huang [mailto:ya.huang@AMYLIN.COM] Sent: Thursday, September 20, 2007 12:14 PM To: SAS-L@LISTSERV.UGA.EDU; Sayre Robert - rsayre Cc: Ya Huang Subject: Re: How do I create a bar chart in excel from sas

ods treats proc chart output as pre-formatted text, as it is indeed a text based 'graph'. You can just add ods html and name your output to *.xls to trick excel. The 'bar' chart doesn't look nice, but if it is acceptable for you in SAS, it should be acceptable in excel.

ods html file="c:\temp\junk.xls" style=minimal;

proc chart data=sashelp.class; hbar age; run;

ods html close;

I remember Chang Y. Chung posted a while back a solution using SAS base only. You can search SAS-L archive.

On Thu, 20 Sep 2007 12:31:41 -0400, Bob Sayre <rsayre@ACXIOM.COM> wrote:

>Hi All, >In the past I've created many excel spreadsheet reports using sas and >ods. For the first time, I've got a need to create a simple hbar chart in >excel from sas. We have sas 9.1 on unix by the way. Proc chart works but >proc GChart is not recognized, so I'm assuming you need the graphics >package for that one. Anyway, does anyone have an example of how to >create a basic hbar chart in Excel from base sas using ods? Nothing >fancy, just an excel chart with few colored bars is all that I need. I've >found a lot on the internet, but none that use just proc chart. Thanks in >advance any help that can be provided. >--Bob ************************************************************************ * The information contained in this communication is confidential, is intended only for the use of the recipient named above, and may be legally privileged.

If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.

If you have received this communication in error, please resend this communication to the sender and delete the original message or any copy of it from your computer system.

Thank you. ************************************************************************ *


Back to: Top of message | Previous page | Main SAS-L page