ODS EXCEL with Graph

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 6
Accepted Solution

ODS EXCEL with Graph

How does one generate a graph and embed it into an Excel document?


Accepted Solutions
Solution
‎10-21-2013 10:07 PM
SAS Super FREQ
Posts: 8,862

Re: ODS EXCEL with Graph

Hi:

  There is no "ODS EXCEL" destination. So I'm not exactly sure what you mean. There are only a few ways to get data/reports from SAS to Excel:

1) Export methods  (dataset --> workbook/worksheet)

    a) PROC EXPORT (no graph support)

    b) LIBNAME EXCEL engine (no graph support)

2) ODS methods (procedure output --> workbook/worksheet)

    a) ODS CSV (comma separated values) (no graph support)

    b) HTML-based destinations: ODS MSOFFICE2K, ODS MSOFFICE2K_X, ODS TAGSETS.TABLEEDITOR

    c) XML-based destinations: ODS TAGSETS.EXCELXP (no graph support)

  As you can see, as far as graph/image support goes, the only ODS destinations that support the inclusion of graph images are the HTML-based destinations, primarily the ones that are designed to work with Microsoft Office (Word, Excel). That is because the HTML that is created by ODS contains a standard HTML <IMG> tag that Excel knows how to open and include in the worksheet. To a certain extent, the file that you create does not contain "embedded" graphs. There are a lot of postings in the forum on using HTML-based methods to create files that Excel can open and render. And, there are a lot of Tech Support notes on using ODS to create files that Excel can open. Using image/graph files is one of the strengths of using using the HTML-based methods.

cynthia

View solution in original post


All Replies
Solution
‎10-21-2013 10:07 PM
SAS Super FREQ
Posts: 8,862

Re: ODS EXCEL with Graph

Hi:

  There is no "ODS EXCEL" destination. So I'm not exactly sure what you mean. There are only a few ways to get data/reports from SAS to Excel:

1) Export methods  (dataset --> workbook/worksheet)

    a) PROC EXPORT (no graph support)

    b) LIBNAME EXCEL engine (no graph support)

2) ODS methods (procedure output --> workbook/worksheet)

    a) ODS CSV (comma separated values) (no graph support)

    b) HTML-based destinations: ODS MSOFFICE2K, ODS MSOFFICE2K_X, ODS TAGSETS.TABLEEDITOR

    c) XML-based destinations: ODS TAGSETS.EXCELXP (no graph support)

  As you can see, as far as graph/image support goes, the only ODS destinations that support the inclusion of graph images are the HTML-based destinations, primarily the ones that are designed to work with Microsoft Office (Word, Excel). That is because the HTML that is created by ODS contains a standard HTML <IMG> tag that Excel knows how to open and include in the worksheet. To a certain extent, the file that you create does not contain "embedded" graphs. There are a lot of postings in the forum on using HTML-based methods to create files that Excel can open and render. And, there are a lot of Tech Support notes on using ODS to create files that Excel can open. Using image/graph files is one of the strengths of using using the HTML-based methods.

cynthia

Occasional Contributor
Posts: 6

Re: ODS EXCEL with Graph

Posted in reply to Cynthia_sas

Great answer Cynthia. THanks!!!

So if I have a SAS server that does include an Web server running on it, and I want to generate a report and send it off to someone, there's no real way to include this with a graph, correct?  (with HTML or XML)

I know I can do it with PDF.

Trusted Advisor
Posts: 3,211

Re: ODS EXCEL with Graph

Experimental underway 9.4:

UNDERSTANDING THE MICROSOFT OFFICE OPEN XML FORMAT

ods excel file="temp.xlsx";

http://support.sas.com/resources/papers/proceedings14/SAS177-2014.pdf

---->-- ja karman --<-----
🔒 This topic is solved and locked.

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

Discussion stats
  • 3 replies
  • 718 views
  • 0 likes
  • 3 in conversation