<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Report and Graph simultaneously in excel in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Report-and-Graph-simultaneously-in-excel/m-p/8770#M2882</link>
    <description>Hi guys,&lt;BR /&gt;
i have to prepare an MIS report which should consist of table and graph.like suppose i have table1 ,graph1,table2 graph2 ....etc.i have 12 variables for which i have plot tables and corresponding graph and each variable should be in a differe sheet of a single work book.&lt;BR /&gt;
so i have to display it in excel as my table followed by corresponding graph.&lt;BR /&gt;
and i would like to know is there any option for diverting my report to different sheets ina single work book.&lt;BR /&gt;
please help me with this guys.&lt;BR /&gt;
Thanks &amp;amp; Regards&lt;BR /&gt;
srinivas</description>
    <pubDate>Fri, 20 Mar 2009 10:37:36 GMT</pubDate>
    <dc:creator>sreenu_reddy</dc:creator>
    <dc:date>2009-03-20T10:37:36Z</dc:date>
    <item>
      <title>Report and Graph simultaneously in excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Report-and-Graph-simultaneously-in-excel/m-p/8770#M2882</link>
      <description>Hi guys,&lt;BR /&gt;
i have to prepare an MIS report which should consist of table and graph.like suppose i have table1 ,graph1,table2 graph2 ....etc.i have 12 variables for which i have plot tables and corresponding graph and each variable should be in a differe sheet of a single work book.&lt;BR /&gt;
so i have to display it in excel as my table followed by corresponding graph.&lt;BR /&gt;
and i would like to know is there any option for diverting my report to different sheets ina single work book.&lt;BR /&gt;
please help me with this guys.&lt;BR /&gt;
Thanks &amp;amp; Regards&lt;BR /&gt;
srinivas</description>
      <pubDate>Fri, 20 Mar 2009 10:37:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Report-and-Graph-simultaneously-in-excel/m-p/8770#M2882</guid>
      <dc:creator>sreenu_reddy</dc:creator>
      <dc:date>2009-03-20T10:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Report and Graph simultaneously in excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Report-and-Graph-simultaneously-in-excel/m-p/8771#M2883</link>
      <description>Hi:&lt;BR /&gt;
  The only ways to create output from SAS that can be opened in Excel are (using SAS methods):&lt;BR /&gt;
1) Export methods: PROC Export/Libname engine (only supports Tables)&lt;BR /&gt;
   &lt;BR /&gt;
2) ODS CSV: creates comma-separated files (only supports Tables)&lt;BR /&gt;
    &lt;BR /&gt;
3) ODS HTML: creates HTML files and links to external &amp;lt;IMG&amp;gt; tags -- HTML files CAN be opened and rendered in Excel. However ALL the output goes on 1 sheet in 1 workbook by default.&lt;BR /&gt;
   &lt;BR /&gt;
4) ODS TAGSETS.EXCELXP: creates Spreadsheet Markup Language files from SAS Tabular output -- also allows multiple worksheets automatically, but, due to a Microsoft restriction, Spreadsheet Markup Language files cannot contain graphic images of any kind.&lt;BR /&gt;
    &lt;BR /&gt;
5) Using the SAS Add-in for Microsoft Office (as part of the Enterprise Intelligence Platform, you could perform tasks or run stored processes to populate every sheet.&lt;BR /&gt;
    &lt;BR /&gt;
From the above list, using SAS methods, #3 creating an HTML file is the way that you could create your table and graph There are several ODS destinations to choose from: ODS HTML3, ODS HTML, ODS MSOFFICE2K, ODS PHTML, ODS CHTML, etc, etc. However, the basic limitation for HTML files is that 1 HTML file = 1 sheet in 1 workbook. So if even if you created multiple HTML files, each file with 1 table and 1 &amp;lt;IMG&amp;gt; tag for the graph, then Excel, by default, would open each separate HTML file into 1 separate workbook. But, Excel -does- have a method whereby you can link separate HTML files together so they open in one workbook, each HTML file as a separate sheet -- however, this is dependent on Microsoft's specification for how to link multiple HTML files together. And the Microsoft specification requires that all the files be physically located together in a specific directory/subdirectory structure.&lt;BR /&gt;
                  &lt;BR /&gt;
However, SAS does not automatically create the structure that Microsoft wants in order to display multiple HTML files in one workbook -- each file on one worksheet. For example, Microsoft wants files to be in this structure: &lt;B&gt;&lt;BR /&gt;
c:\temp\Main_Report.html  or c:\temp\Main_Report.xls&lt;BR /&gt;
c:\temp\Main_Report_files\  &amp;lt;-- is a subdir under the main dir&lt;BR /&gt;
c:\temp\Main_Report_files\filelist.xml&lt;BR /&gt;
c:\temp\Main_Report_files\file1.html&lt;BR /&gt;
c:\temp\Main_Report_files\file1.png&lt;BR /&gt;
c:\temp\Main_Report_files\file2.html&lt;BR /&gt;
c:\temp\Main_Report_files\file2.png&lt;BR /&gt;
c:\temp\Main_Report_files\mystyle.css &lt;/B&gt;&lt;BR /&gt;
        &lt;BR /&gt;
If you are going to create LINKED HTML files -- so that each HTML file (for example) would populate 1 worksheet, then your Main_Report.html file might look like this (this is an actual example that I built -- filenames are different than those used above):&lt;BR /&gt;
[pre]&lt;BR /&gt;
&amp;lt;html xmlns:o="urn:schemas-microsoft-com:office:office"&lt;BR /&gt;
      xmlns:x="urn:schemas-microsoft-com:office:excel"&lt;BR /&gt;
      xmlns="http://www.w3.org/TR/REC-html40"&amp;gt;&lt;BR /&gt;
&amp;lt;head&amp;gt;&lt;BR /&gt;
&amp;lt;meta name="Excel Workbook Frameset"&amp;gt;&lt;BR /&gt;
&amp;lt;meta name="Generator"  content="SAS Software, http://www.sas.com"  sasversion="9.1"&amp;gt;&lt;BR /&gt;
&amp;lt;meta http-equiv="Content-type" content="text/html"&amp;gt;&lt;BR /&gt;
&amp;lt;meta name="ProgId" content="Excel.Sheet"&amp;gt;&lt;BR /&gt;
&amp;lt;link rel="stylesheet" type="text/css" href=".\Main_report_files\mystyle.css"&amp;gt;&lt;BR /&gt;
&amp;lt;link rel=File-List href=".\Main_report_files\filelist.xml"&amp;gt;&lt;BR /&gt;
&amp;lt;!--[if gte mso 9]&amp;gt;&amp;lt;xml&amp;gt;&lt;BR /&gt;
&amp;lt;x:ExcelWorkbook&amp;gt;&lt;BR /&gt;
  &amp;lt;x:ExcelWorksheets&amp;gt;&lt;BR /&gt;
    &amp;lt;x:ExcelWorksheet&amp;gt;&lt;BR /&gt;
      &amp;lt;x:Name&amp;gt;By Region&amp;lt;/x:Name&amp;gt;&lt;BR /&gt;
      &amp;lt;x:WorksheetSource HRef=".\Main_report_files\byreg.html"/&amp;gt;&lt;BR /&gt;
    &amp;lt;/x:ExcelWorksheet&amp;gt;&lt;BR /&gt;
    &amp;lt;x:ExcelWorksheet&amp;gt;&lt;BR /&gt;
      &amp;lt;x:Name&amp;gt;By Year&amp;lt;/x:Name&amp;gt;&lt;BR /&gt;
      &amp;lt;x:WorksheetSource HRef=".\Main_report_files\byyear.html"/&amp;gt;&lt;BR /&gt;
    &amp;lt;/x:ExcelWorksheet&amp;gt;&lt;BR /&gt;
    &amp;lt;x:ExcelWorksheet&amp;gt;&lt;BR /&gt;
      &amp;lt;x:Name&amp;gt;Detail&amp;lt;/x:Name&amp;gt;&lt;BR /&gt;
      &amp;lt;x:WorksheetSource HRef=".\Main_report_files\details.html"/&amp;gt;&lt;BR /&gt;
    &amp;lt;/x:ExcelWorksheet&amp;gt;&lt;BR /&gt;
   &amp;lt;/x:ExcelWorksheets&amp;gt;&lt;BR /&gt;
&amp;lt;/x:ExcelWorkbook&amp;gt;&lt;BR /&gt;
&amp;lt;/xml&amp;gt;&amp;lt;![endif]--&amp;gt;&lt;BR /&gt;
&amp;lt;/head&amp;gt;&lt;BR /&gt;
&amp;lt;/html&amp;gt;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                &lt;BR /&gt;
Then, your filelist.xml file might look like this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
&amp;lt;xml xmlns:o="urn:schemas-microsoft-com:office:office"&amp;gt;&lt;BR /&gt;
  &amp;lt;o:MainFile href="Main_report.xls"/&amp;gt;&lt;BR /&gt;
  &amp;lt;o:File href="byreg.html"/&amp;gt;&lt;BR /&gt;
  &amp;lt;o:File href="byyear.html"/&amp;gt;&lt;BR /&gt;
  &amp;lt;o:File href="details.html"/&amp;gt;&lt;BR /&gt;
  &amp;lt;o:File href="mystyle.css"/&amp;gt;&lt;BR /&gt;
  &amp;lt;o:File href="filelist.xml"/&amp;gt;&lt;BR /&gt;
&amp;lt;/xml&amp;gt;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                           &lt;BR /&gt;
SAS does not automatically create the directory structure or these 2 files -- you might have to do that either manually or programmatically. But SAS will create all the separate HTML files and &amp;lt;IMG&amp;gt; files for you.&lt;BR /&gt;
 &lt;BR /&gt;
Alternately, you might investigate other techniques, such as DDE or OLE-DB or Excel Macros or VB scripts to do what you want. Some folks write their tables to multiple worksheets using SAS techniques, such as #1 or #4 and then open Excel and run an Excel macro or VB script to insert the graphs (using Excel) and then resave the file as an XLS file.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Fri, 20 Mar 2009 16:13:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Report-and-Graph-simultaneously-in-excel/m-p/8771#M2883</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-03-20T16:13:24Z</dc:date>
    </item>
  </channel>
</rss>

