<?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 Sheet Name length limit reduced when using &amp;amp; in sheet name in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-Sheet-Name-length-limit-reduced-when-using-amp-in/m-p/860600#M339966</link>
    <description>&lt;P&gt;I'd ask tech support about this.&lt;/P&gt;
&lt;P&gt;They'll probably say using &amp;amp;amp; instead of &amp;amp; is a feature, but it looks like a defect to me as it restricts name lengths.&lt;/P&gt;
&lt;P&gt;Tab name length doesn't seem to be byte-restricted either as these tab names are valid (using an English version of Windows).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisNZ_0-1677204677954.png" style="width: 1006px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80805iFEA3D40CEAD66599/image-dimensions/1006x49?v=v2" width="1006" height="49" role="button" title="ChrisNZ_0-1677204677954.png" alt="ChrisNZ_0-1677204677954.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So there really is no excuse for the restriction SAS imposes. Ask them to register it as a defect,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Feb 2023 02:12:37 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2023-02-24T02:12:37Z</dc:date>
    <item>
      <title>ODS Excel Sheet Name length limit reduced when using &amp; in sheet name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-Sheet-Name-length-limit-reduced-when-using-amp-in/m-p/860097#M339793</link>
      <description>&lt;P&gt;While using ODS Excel, sheet name does have limit of 28 characters but if &amp;amp; is present in sheetname this limit is reduced. Could anyone please explain the reason behind this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much in&amp;nbsp;advance!!.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For Example - Sheetname = "Acct_Num&amp;amp;ABCD_BCD&amp;amp;ABC" is getting trimmed to Acct_Num&amp;amp;ABCD_BCD&amp;amp;A.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But Sheetname = "Acct_Num&amp;amp;ABCD_BCDandABC" is not getting trimmed at all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 10:56:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-Sheet-Name-length-limit-reduced-when-using-amp-in/m-p/860097#M339793</guid>
      <dc:creator>arjunsingh3993</dc:creator>
      <dc:date>2023-02-22T10:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel Sheet Name length limit reduced when using &amp; in sheet name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-Sheet-Name-length-limit-reduced-when-using-amp-in/m-p/860338#M339877</link>
      <description>&lt;P&gt;What you describe is not happening to me.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc export data=sashelp.class outfile="&amp;amp;wdir\t3.xlsx"; sheet="Acct_Num&amp;amp;ABCD_BCD&amp;amp;ABC"; run;
proc export data=sashelp.class outfile="&amp;amp;wdir\t4.xlsx"; sheet="Acct_Num&amp;amp;ABCD_BCDandABC"; run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisNZ_0-1677118166238.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80740i14DEDA345F29C8D5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisNZ_0-1677118166238.png" alt="ChrisNZ_0-1677118166238.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please provide more details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that you'll get warnings such as&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisNZ_1-1677118226796.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80741iCB6C3E5F91334169/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisNZ_1-1677118226796.png" alt="ChrisNZ_1-1677118226796.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;if you use double quotes.&lt;/P&gt;
&lt;P&gt;To avoid these warnings, use single quotes when you don't want to resolve macro variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2023 02:12:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-Sheet-Name-length-limit-reduced-when-using-amp-in/m-p/860338#M339877</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2023-02-23T02:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel Sheet Name length limit reduced when using &amp; in sheet name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-Sheet-Name-length-limit-reduced-when-using-amp-in/m-p/860352#M339883</link>
      <description>&lt;P&gt;Thanks for replying ChrisNZ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc export does work but I want to use the functionality of ODS Excel (as I want to format output with title etc.) like in below code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods excel file="path/Report.xlsx";&lt;/P&gt;&lt;P&gt;ods excel options( sheet_name = 'Acct_Num&amp;amp;ABCD_BCD&amp;amp;ABC');&lt;/P&gt;&lt;P&gt;title1 "Report Monday";&lt;/P&gt;&lt;P&gt;proc report data=sashelp.cars;&lt;/P&gt;&lt;P&gt;column _all_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;title;&lt;/P&gt;&lt;P&gt;ods excel close;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In above&amp;nbsp;code sheet name is getting trimmed to&amp;nbsp; 'Acct_Num&amp;amp;ABCD_BCD&amp;amp;AB'.(20 Characters)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use&amp;nbsp;'Acct_NumandABCD_BCDandABC' (25 Characters) is not getting trimmed.&lt;/P&gt;&lt;P&gt;Need to know the reason behind&amp;nbsp;this, Or any possible solution.&amp;nbsp;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2023 05:11:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-Sheet-Name-length-limit-reduced-when-using-amp-in/m-p/860352#M339883</guid>
      <dc:creator>arjunsingh3993</dc:creator>
      <dc:date>2023-02-23T05:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel Sheet Name length limit reduced when using &amp; in sheet name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-Sheet-Name-length-limit-reduced-when-using-amp-in/m-p/860359#M339885</link>
      <description>&lt;P&gt;With my version of SAS (9.4M5) and Excel () the limit seems to&amp;nbsp; actually be 28 bytes.&lt;/P&gt;
&lt;P&gt;But it does seem to shorten by 4 bytes for every &amp;amp;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So for every &amp;amp; you add to the name you need to chop four off the length of the sheet name.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file="%sysfunc(pathname(work))test.xlsx";
ods excel options (sheet_name="a234567890b2345678901234567890") ;
proc print data=sashelp.class;
run;
ods excel options (sheet_name="a&amp;amp;34567890b2345678901234567890") ;
proc print data=sashelp.class;
run;
ods excel options (sheet_name="a&amp;amp;3&amp;amp;567890b2345678901234567890") ;
proc print data=sashelp.class;
run;
ods excel options (sheet_name="a&amp;amp;3&amp;amp;5&amp;amp;7890b2345678901234567890") ;
proc print data=sashelp.class;
run;
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="Tom_0-1677130241604.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80746iFFC8B8D6F5AC98DA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Tom_0-1677130241604.png" alt="Tom_0-1677130241604.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It is probably actually writing the HTML tag &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;amp;amp;&lt;/FONT&gt;&lt;/STRONG&gt; instead of just &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;amp;&lt;/FONT&gt;&lt;/STRONG&gt; so it needs 5 bytes instead of 1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure if this is a feature of EXCEL or just how ODS EXCEL is generating the sheet name when it writes the file. I suspect the latter since Excel will let me rename to sheet to something that is 31 bytes long.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_1-1677130467562.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80747iEDF34A02881D92F1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Tom_1-1677130467562.png" alt="Tom_1-1677130467562.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The other 3 bytes are probably eaten by quotes and possible $ that sometimes appears in sheet references.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2023 19:36:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-Sheet-Name-length-limit-reduced-when-using-amp-in/m-p/860359#M339885</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-02-23T19:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel Sheet Name length limit reduced when using &amp; in sheet name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-Sheet-Name-length-limit-reduced-when-using-amp-in/m-p/860600#M339966</link>
      <description>&lt;P&gt;I'd ask tech support about this.&lt;/P&gt;
&lt;P&gt;They'll probably say using &amp;amp;amp; instead of &amp;amp; is a feature, but it looks like a defect to me as it restricts name lengths.&lt;/P&gt;
&lt;P&gt;Tab name length doesn't seem to be byte-restricted either as these tab names are valid (using an English version of Windows).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisNZ_0-1677204677954.png" style="width: 1006px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80805iFEA3D40CEAD66599/image-dimensions/1006x49?v=v2" width="1006" height="49" role="button" title="ChrisNZ_0-1677204677954.png" alt="ChrisNZ_0-1677204677954.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So there really is no excuse for the restriction SAS imposes. Ask them to register it as a defect,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 02:12:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-Sheet-Name-length-limit-reduced-when-using-amp-in/m-p/860600#M339966</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2023-02-24T02:12:37Z</dc:date>
    </item>
  </channel>
</rss>

