<?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: ods excel options(flow=&amp;quot;tables&amp;quot;) and custom sorting in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-excel-options-flow-quot-tables-quot-and-custom-sorting/m-p/598678#M23412</link>
    <description>&lt;P&gt;Or try other blank character like TAB character ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;format&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
	&lt;SPAN class="token keyword"&gt;value&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;$&lt;/SPAN&gt;custsort
		&lt;SPAN class="token string"&gt;"USA"&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;"'09'x '09x' USA"&lt;/SPAN&gt;
		&lt;SPAN class="token string"&gt;"Asia"&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;"'09'x  Asia"&lt;/SPAN&gt;
		&lt;SPAN class="token string"&gt;"Europe"&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;"Europe"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;quit&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 23 Oct 2019 12:28:24 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2019-10-23T12:28:24Z</dc:date>
    <item>
      <title>ods excel options(flow="tables") and custom sorting</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-excel-options-flow-quot-tables-quot-and-custom-sorting/m-p/598409#M23407</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have just found the nead flow="tables" option to ods excel which prevents the insertion of newlines making tables much easier to reformat. Unfortunately, there is also a side effect: one can no longer custom sort the values by inserting spaces into the format such as this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
    value $custsort
        "2" = "  2"
        "1" = " 1"
        "3" = "3";&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is because enabling the flow option disables the automatic stripping of the values resulting in the sorting spaces being visible in the final output. Is there a way of preventing the newline insertion and keeping the values stripped at the same time? Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 14:40:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-excel-options-flow-quot-tables-quot-and-custom-sorting/m-p/598409#M23407</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2019-10-22T14:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: ods excel options(flow="tables") and custom sorting</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-excel-options-flow-quot-tables-quot-and-custom-sorting/m-p/598411#M23408</link>
      <description>&lt;P&gt;How are you creating the tables that you are displaying?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A few&amp;nbsp;procedures, such as Proc Tabulate and Report, allow use of PRELOADFMT that will maintain an order if the format is defined with the Notsorted option and the correct options are chosen.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 14:46:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-excel-options-flow-quot-tables-quot-and-custom-sorting/m-p/598411#M23408</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-10-22T14:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: ods excel options(flow="tables") and custom sorting</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-excel-options-flow-quot-tables-quot-and-custom-sorting/m-p/598421#M23409</link>
      <description>&lt;P&gt;The tables are created with proc report. I am then using the format similar to the one displayed above for the group variables:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ETA: added code example&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
	value $custsort
		"USA" = "  USA"
		"Asia" = " Asia"
		"Europe" = "Europe";
quit;

ods excel file="C:\Users\&amp;amp;sysuserid\test.xlsx" options(flow="tables");

proc report data=sashelp.cars;
	columns Origin Type, Horsepower;
	define Origin / " " group format=$custsort.;
	define Type / " " across;
	define Horsepower / " " analysis max;
run;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Oct 2019 15:12:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-excel-options-flow-quot-tables-quot-and-custom-sorting/m-p/598421#M23409</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2019-10-22T15:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: ods excel options(flow="tables") and custom sorting</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-excel-options-flow-quot-tables-quot-and-custom-sorting/m-p/598450#M23410</link>
      <description>&lt;P&gt;With proc report you are golden. Consider:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc format;
	value $custsort &lt;FONT color="#ff00ff"&gt;&lt;STRONG&gt;(notsorted)
&lt;/STRONG&gt;&lt;/FONT&gt;		"USA" = "  USA"
		"Asia" = " Asia"
		"Europe" = "Europe";
quit;



proc report data=sashelp.cars;
	columns Origin Type, Horsepower;
	define Origin / " " group &lt;FONT color="#ff00ff"&gt;&lt;STRONG&gt;preloadfmt order=data&lt;/STRONG&gt; &lt;/FONT&gt;format=$custsort.;
	define Type / " " across;
	define Horsepower / " " analysis max;
run;&lt;/PRE&gt;
&lt;P&gt;You can use the same approach for any format and shouldn't need the inserted spaces you had used. Do note that the format definition needs the Notsorted option and there are restrictions to use Preloadfmt thought the order=data is likeliest. This will also provide a row for the output for the format even if no values are encountered.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 16:10:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-excel-options-flow-quot-tables-quot-and-custom-sorting/m-p/598450#M23410</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-10-22T16:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: ods excel options(flow="tables") and custom sorting</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-excel-options-flow-quot-tables-quot-and-custom-sorting/m-p/598678#M23412</link>
      <description>&lt;P&gt;Or try other blank character like TAB character ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;format&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
	&lt;SPAN class="token keyword"&gt;value&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;$&lt;/SPAN&gt;custsort
		&lt;SPAN class="token string"&gt;"USA"&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;"'09'x '09x' USA"&lt;/SPAN&gt;
		&lt;SPAN class="token string"&gt;"Asia"&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;"'09'x  Asia"&lt;/SPAN&gt;
		&lt;SPAN class="token string"&gt;"Europe"&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;"Europe"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;quit&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Oct 2019 12:28:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-excel-options-flow-quot-tables-quot-and-custom-sorting/m-p/598678#M23412</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-10-23T12:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: ods excel options(flow="tables") and custom sorting</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-excel-options-flow-quot-tables-quot-and-custom-sorting/m-p/598853#M23414</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Or try other blank character like TAB character ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;format&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
	&lt;SPAN class="token keyword"&gt;value&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;$&lt;/SPAN&gt;custsort
		&lt;SPAN class="token string"&gt;"USA"&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;"'09'x '09x' USA"&lt;/SPAN&gt;
		&lt;SPAN class="token string"&gt;"Asia"&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;"'09'x  Asia"&lt;/SPAN&gt;
		&lt;SPAN class="token string"&gt;"Europe"&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;"Europe"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;quit&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;And I though I was bad using ASCII&amp;nbsp;null characters, hold down ALT key and enter 255 on the numeric pad in Windows,&amp;nbsp;to force indents before style ASIS was available. One headache I ran into with this approach was remembering that I had typed nulls and not spaces so extra comments were a very good idea.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The OP wanted the order but not the appearance of leading spaces and I can see the results of tabs as spaces in Excel.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 22:21:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-excel-options-flow-quot-tables-quot-and-custom-sorting/m-p/598853#M23414</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-10-23T22:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: ods excel options(flow="tables") and custom sorting</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-excel-options-flow-quot-tables-quot-and-custom-sorting/m-p/598935#M23417</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;, your suggestion works! I am not getting rows for empty categories though with this code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
	value $custsort (notsorted)
		"Dummy" = "Dummy"
		"USA" = "USA"
		"Asia" = "Asia"
		"Europe" = "Europe";
quit;

ods excel file="C:\Users\&amp;amp;sysuserid\test.xlsx" options(flow="tables");

proc report data=sashelp.cars;
	columns Origin Type, Horsepower;
	define Origin / " " group preloadfmt order=data format=$custsort.;
	define Type / " " across;
	define Horsepower / " " analysis max;
run;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Oct 2019 07:04:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-excel-options-flow-quot-tables-quot-and-custom-sorting/m-p/598935#M23417</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2019-10-24T07:04:22Z</dc:date>
    </item>
  </channel>
</rss>

