BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
bob021
Calcite | Level 5


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

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

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

8 REPLIES 8
Ksharp
Super User

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

bob021
Calcite | Level 5

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

Ksharp
Super User

What environment is your SAS under ?

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

bob021
Calcite | Level 5

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

Ksharp
Super User

OH. You are using SAS9.1 .

Maybe you should check SAS9.1 documentation.

bob021
Calcite | Level 5

Ksharp

Thank You

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

Bob

Ksharp
Super User

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

Cynthia_sas
SAS Super FREQ

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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