<?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 Re: Export Multiple tables into one XLSX sheet in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Export-Multiple-tables-into-one-XLSX-sheet/m-p/760422#M240463</link>
    <description>&lt;P&gt;The documentation for the TITLE statement shows&amp;nbsp; the options for setting color height font background color text angles and such.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsglobal/p10gcmrmf83iaxn1ilrx4pra969n.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsglobal/p10gcmrmf83iaxn1ilrx4pra969n.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Aug 2021 17:09:13 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2021-08-09T17:09:13Z</dc:date>
    <item>
      <title>Export Multiple tables into one XLSX sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-Multiple-tables-into-one-XLSX-sheet/m-p/760361#M240438</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to export multiple summary tables into one XLSX (EXCEL) file into one Sheet.&lt;/P&gt;
&lt;P&gt;I want that the tables will be below each other with a few rows distance between them.&lt;/P&gt;
&lt;P&gt;I also want that the columns titles will be with grey background.&lt;/P&gt;
&lt;P&gt;IT might happend that need to adjust the columns width in order that we can see it well in Excel and in order that it will look nice.&lt;/P&gt;
&lt;P&gt;What is the recommended way to do it please and please show the code , thanks&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Title 'Table1: One Dimensional Table'
proc tabulate data=sashelp.baseball;
   class Team;
   tables Team;
quit;


Title 'Table2: One Dimensional Table'
proc tabulate data=sashelp.baseball;
   class Team;
   var nHome;
   tables Team, nHome;
quit;


Title 'Table3: One Dimensional Table'
proc tabulate data=sashelp.baseball;
   class Team League;
   var nHome;
   tables League, Team, nHome;
quit;


Title 'Table4: Three Dimensional Table';
 proc tabulate data=sashelp.baseball;
   class Team League;
   var nHome;
   tables League, Team, nHome;
quit;

TITLE ' Listing of Top 5 Rows of SASHELP.SHOES';
proc sql outobs=5;
 select * from sashelp.shoes;
 quit;

Title ' Summary Sales by Region';
proc means data=sashelp.shoes sum;
 class region;
 var sales;
 run;


data weight2;                      
input IDnumber $ Week1 Week16; 
WeightLoss2=Week1-Week16;     
datalines;       
2477 195  163
2431 220  198
2456 173  155
2412 135  116
;                            

proc print data=weight2;      
run;  


data investment;   
   begin='01JAN1990'd;
   end='31DEC2009'd;
   do year=year(begin) to year(end);   
      Capital+2000 + .07*(Capital+2000);
      output;    
   end;
   put 'The number of DATA step iterations is '_n_; 
run;


proc print data=investment;    
format Capital dollar12.2;  
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Aug 2021 14:09:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-Multiple-tables-into-one-XLSX-sheet/m-p/760361#M240438</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-08-09T14:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Export Multiple tables into one XLSX sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-Multiple-tables-into-one-XLSX-sheet/m-p/760376#M240441</link>
      <description>&lt;P&gt;Just check the documentation on ODS EXCEL destination.&lt;/P&gt;
&lt;P&gt;Make sure to include semi-colons to end your TITLE statements.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file='c:\downloads\one_sheet.xlsx'
  options (embedded_titles='ON' sheet_interval='NONE' sheet_name='REPORT')
; 
Title 'Table1: One Dimensional Table';
proc tabulate data=sashelp.baseball;
   class Team;
   tables Team;
quit;


Title 'Table2: One Dimensional Table';
proc tabulate data=sashelp.baseball;
   class Team;
   var nHome;
   tables Team, nHome;
quit;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 706px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62407iF8982AFB14A18C8F/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 14:26:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-Multiple-tables-into-one-XLSX-sheet/m-p/760376#M240441</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-08-09T14:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: Export Multiple tables into one XLSX sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-Multiple-tables-into-one-XLSX-sheet/m-p/760422#M240463</link>
      <description>&lt;P&gt;The documentation for the TITLE statement shows&amp;nbsp; the options for setting color height font background color text angles and such.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsglobal/p10gcmrmf83iaxn1ilrx4pra969n.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsglobal/p10gcmrmf83iaxn1ilrx4pra969n.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 17:09:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-Multiple-tables-into-one-XLSX-sheet/m-p/760422#M240463</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-09T17:09:13Z</dc:date>
    </item>
  </channel>
</rss>

