<?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: Detailed setup of Excel output file in SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Detailed-setup-of-Excel-output-file-in-SAS/m-p/650126#M194965</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;&amp;gt; add some additional rows/columns in Excel spreadsheet being created&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Not needed if you have Excel Tables that will dynamically change.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;gt; add some text in specific cells&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Named Ranges is one option, I prefer to use linked cells in my excel sheet instead.&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;gt; add some text formats/background formats/border formats in&amp;nbsp;specific cells&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, search traffic lighting&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;gt; customize some cells by combining them, also wrapping text, alignment text, rotating text, ...&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Some of these yes, not combining cells I believe&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;gt; do auto alignment of cells and rows, also set the fixed size of rows and columns&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Some of what you want is available in ODS EXCEL but not all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DDE allowed you to do most of this but is deprecated. You can use DDE to pass VBA command to Excel though or through a VBS script. If I'm developing these types of reports, I usually make a template and link the cells in Excel rather than worrying about writing to exact cells. I've done all of these, but definitely try and avoid it as much as possible these days.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you search DDE on lexjansen.com you'll find code examples for most of these actions. The actions need to have been available in Excel 4.0 though if you go DDE. If you go VBS you have more options.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 24 May 2020 02:12:49 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-05-24T02:12:49Z</dc:date>
    <item>
      <title>Detailed setup of Excel output file in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Detailed-setup-of-Excel-output-file-in-SAS/m-p/650071#M194927</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Could you please tell me how, when exporting data to Excel, to&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; add some additional rows/columns in Excel spreadsheet being created&lt;/P&gt;&lt;P&gt;&amp;gt; add some text in specific cells&lt;/P&gt;&lt;P&gt;&amp;gt; add some text formats/background formats/border formats in&amp;nbsp;specific cells&lt;/P&gt;&lt;P&gt;&amp;gt; customize some cells by combining them, also wrapping text, alignment text, rotating text, ...&lt;/P&gt;&lt;P&gt;&amp;gt; do auto alignment of cells and rows, also set the fixed size of rows and columns&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think this all can be solved if we are able to write VB code in SAS and&amp;nbsp;&lt;SPAN&gt;transfer it to Excel.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;But I can't find whether it is possible or not.&lt;/P&gt;&lt;P&gt;Could you, please, give me a link on this method(if it exists) or on other methods?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THX!&lt;/P&gt;</description>
      <pubDate>Sat, 23 May 2020 09:45:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Detailed-setup-of-Excel-output-file-in-SAS/m-p/650071#M194927</guid>
      <dc:creator>Ivan555</dc:creator>
      <dc:date>2020-05-23T09:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Detailed setup of Excel output file in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Detailed-setup-of-Excel-output-file-in-SAS/m-p/650097#M194947</link>
      <description>&lt;P&gt;The exportxl macro (see:&amp;nbsp;&lt;A href="https://github.com/art297/Papers/blob/master/Excelling_to_Another_Level_with_SAS/src/exportxl.sas" target="_blank"&gt;https://github.com/art297/Papers/blob/master/Excelling_to_Another_Level_with_SAS/src/exportxl.sas&lt;/A&gt;&amp;nbsp;) doesn't do all of the things you are trying to do, but does use the approach you were asking about. Hopefully, it will give you an idea regarding how to proceed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The paper, powerpoint and tipsheet for the macro can be found at:&amp;nbsp;&lt;A href="https://github.com/art297/Papers/tree/master/Excelling_to_Another_Level_with_SAS/doc" target="_blank"&gt;https://github.com/art297/Papers/tree/master/Excelling_to_Another_Level_with_SAS/doc&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 May 2020 16:10:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Detailed-setup-of-Excel-output-file-in-SAS/m-p/650097#M194947</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2020-05-23T16:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Detailed setup of Excel output file in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Detailed-setup-of-Excel-output-file-in-SAS/m-p/650126#M194965</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;&amp;gt; add some additional rows/columns in Excel spreadsheet being created&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Not needed if you have Excel Tables that will dynamically change.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;gt; add some text in specific cells&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Named Ranges is one option, I prefer to use linked cells in my excel sheet instead.&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;gt; add some text formats/background formats/border formats in&amp;nbsp;specific cells&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, search traffic lighting&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;gt; customize some cells by combining them, also wrapping text, alignment text, rotating text, ...&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Some of these yes, not combining cells I believe&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;gt; do auto alignment of cells and rows, also set the fixed size of rows and columns&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Some of what you want is available in ODS EXCEL but not all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DDE allowed you to do most of this but is deprecated. You can use DDE to pass VBA command to Excel though or through a VBS script. If I'm developing these types of reports, I usually make a template and link the cells in Excel rather than worrying about writing to exact cells. I've done all of these, but definitely try and avoid it as much as possible these days.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you search DDE on lexjansen.com you'll find code examples for most of these actions. The actions need to have been available in Excel 4.0 though if you go DDE. If you go VBS you have more options.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 May 2020 02:12:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Detailed-setup-of-Excel-output-file-in-SAS/m-p/650126#M194965</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-05-24T02:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: Detailed setup of Excel output file in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Detailed-setup-of-Excel-output-file-in-SAS/m-p/650502#M195053</link>
      <description>&lt;P&gt;One technique I have used often, not just in SAS, but also in SSIS, is to have a "template" - not a template as Excel understands the word, but an empty workbook that is formatted the way I want it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can then have a sheet containing your data, formatted the way you want, and perhaps another sheet or two which present the data in a pivot table or whatever.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With that, you first copy your template workbook to wherever you want the output (using FCOPY or X command), then you assign the new workbook as a SAS libname, and write (SAS datastep, SQL select or whatever) to the sheet where the data is supposed to be.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this is helpful.&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 18:02:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Detailed-setup-of-Excel-output-file-in-SAS/m-p/650502#M195053</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2020-05-25T18:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Detailed setup of Excel output file in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Detailed-setup-of-Excel-output-file-in-SAS/m-p/650505#M195056</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/76464"&gt;@s_lassen&lt;/a&gt;&amp;nbsp;: While I mentioned the exportxl macro simply in the hope that it could provide&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/272354"&gt;@Ivan555&lt;/a&gt;&amp;nbsp;with an idea on how to incorporate vb script into SAS code, it includes a way to create a table based on either an existing table or an explicit Excel template.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 19:04:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Detailed-setup-of-Excel-output-file-in-SAS/m-p/650505#M195056</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2020-05-25T19:04:33Z</dc:date>
    </item>
  </channel>
</rss>

