Help using Base SAS procedures

Creating and exporting graphs to excel

Reply
Super Contributor
Posts: 259

Creating and exporting graphs to excel

Hi I have a query in relation to creating graphs and exporting them to sheets in excel.

I'm trying to automate a process where I export four graphs for a particular factor for 20 factors. Creating macros in excel to do this is very slow and time-consuming. Below is a sample dataset showing details for one factor.

I've included a screenshot of what I want the graphs to look like. So the exposure will be a bar chart, the ratios will be a line chart etc. Is it possible to output in a tiled format? I'm new to sas/graph so any help would be greatly appreciated.

factorlevelno_of_observationsexposureRatio1Ratio2value1200820092010201120122013
factor115001000105%35%2000                   
  - 
                   
  - 
                    39                  172                  280                  348
factor121000200082%25%3000                       0
                       1
                    74                  463                  605                  644
factor1320000300080%22%2000                       0
                       0
                  177                  477                  469                  633
factor142300050076%21%1000                       0
                       0
                  185                  988                  641                  494
factor1522333800086%40%3500              1,794              1,882              1,208              1,014              1,078                  797

graph.PNG
Super User
Posts: 17,863

Re: Creating and exporting graphs to excel

What version of SAS do you have?

Have you checked Rob AllI sons page?

Robslink.com

Super Contributor
Posts: 259

Re: Creating and exporting graphs to excel

9.3 with sas/stat, sas/graph, sas/access, sas/export.

Thanks for the link.

In terms of exporting to a program out of sas, can you export to xlsx without it messing up the format? Is it better to output to pdf for graphs. I don't need to edit the graphs as this will all be done in SAS before the export.

Finally is it possible to export 4 graphs on one page/sheet?

Thanks

Ask a Question
Discussion stats
  • 2 replies
  • 204 views
  • 0 likes
  • 2 in conversation