Help using Base SAS procedures

How to export proc tabulate procedure to image file (png or jpeg)?

Accepted Solution Solved
Reply
Contributor
Posts: 60
Accepted Solution

How to export proc tabulate procedure to image file (png or jpeg)?


Hi to All

This is my ods proc. tab. export to html:

ods listing close;

ods html body = 'f:\opdata.html' ;

run;

proc tabulate data=opdata_readin;

class process place taget time;

    table process = '' * place = ''* taget = '' , time = ''

/misstext='0';

run;

ods html close;

ods listing;

run;

Can you please tell me how to export proc tabulate procedure to image (png or jpeg)?

Thank you in advance.

Bob


Accepted Solutions
Solution
‎06-21-2012 03:28 AM
Super User
Posts: 9,676

Re: How to export proc tabulate procedure to image file (png or jpeg)?

How about using Universal Print ?

options printerpath=(png out);
filename out 'c:\out.png';
ods listing close;
ods printer;
proc tabulate data=sashelp.class;
class sex age;
var weight height;
    table sex, age*(weight height)
/misstext='0';
run;

ods printer close;
ods listing;

Ksharp

View solution in original post


All Replies
Solution
‎06-21-2012 03:28 AM
Super User
Posts: 9,676

Re: How to export proc tabulate procedure to image file (png or jpeg)?

How about using Universal Print ?

options printerpath=(png out);
filename out 'c:\out.png';
ods listing close;
ods printer;
proc tabulate data=sashelp.class;
class sex age;
var weight height;
    table sex, age*(weight height)
/misstext='0';
run;

ods printer close;
ods listing;

Ksharp

Contributor
Posts: 60

Re: How to export proc tabulate procedure to image file (png or jpeg)?

Hi Ksharp

Thank you for quick respond.

1. When I run this SAS first ofer me window "save as *.xps" I wan't just to export to image file.

2. When I cancel "save as ..." window SAS finalze export to png but no image in it, just empty png file.

3. printerpath = ERROR 3-12: Invalid option value.

Thank you again.

Bob

Super User
Posts: 9,676

Re: How to export proc tabulate procedure to image file (png or jpeg)?

What environment is your SAS under ?

And Did you try click 'save as' and give it a name ?

Contributor
Posts: 60

Re: How to export proc tabulate procedure to image file (png or jpeg)?

1. My SAS is PC version. SAS 9.1.3. Service Pack 4 for XP_PRO platform.

2. Yes, save as *.xps and table is in file.

3. Also found one error in error log. "printerpath = ERROR 3-12: Invalid option value."

Bob

Super User
Posts: 9,676

Re: How to export proc tabulate procedure to image file (png or jpeg)?

OH. You are using SAS9.1 .

Maybe you should check SAS9.1 documentation.

Contributor
Posts: 60

Re: How to export proc tabulate procedure to image file (png or jpeg)?

Ksharp

Thank You

According SAS9.1 documentation It is a time for new version of SAS Smiley Happy

Bob

Super User
Posts: 9,676

Re: How to export proc tabulate procedure to image file (png or jpeg)?

OR, If you don't mind using GIF image.

ods printer SAS file="c:\temp.gif" printer=gif;
proc tabulate data=sashelp.class;
class sex age;
var weight;
table sex,age*weight;
run;
ods printer close;

Ksharp

SAS Super FREQ
Posts: 8,743

Re: How to export proc tabulate procedure to image file (png or jpeg)?

Hi: this previous forum posting is immediately relevant -- it shows exactly how to send tabulate output to a PNG file using PAPERSIZE and PRINTERPATH.

https://communities.sas.com/message/124855#124855

The person who posted this question, posted it in the ODS GRAPHICS forum, but the solution involved making a PNG file from TABULATE output. The solution was tested in SAS 9.3...I don't know whether it would work in 9.1.3. That is a question for Tech Support.

cynthia

☑ This topic is SOLVED.

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

Discussion stats
  • 8 replies
  • 821 views
  • 6 likes
  • 3 in conversation