<?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 worksheet header truncation WARNING: in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-worksheet-header-truncation-WARNING/m-p/933577#M26622</link>
    <description>&lt;P&gt;Sorry&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;I should have included example.&amp;nbsp; This shows the problem and message from ODS EXCEL.&amp;nbsp; I am not embedding titles or footnotes.&amp;nbsp; And I don't need the worksheet headers or footers.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;49         title1 'First header line is very long and too long to be a varible name'
50               'First header line is very long and too long to be a varible name'
51               'First header line is very long and too long to be a varible name'
52               'First header line is very long and too long to be a varible name'
53               'First header line is very long and too long to be a varible name';
54         filename xlsx temp;
55         ods excel file="%sysfunc(pathname(xlsx))" options (embedded_titles='NO');
56         proc print data=sashelp.class noobs;
57         run;

NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.03 seconds
      cpu time            0.03 seconds
WARNING: Worksheet header is too long.  Truncation will occur.
58         ods excel close;&lt;/PRE&gt;</description>
    <pubDate>Mon, 24 Jun 2024 15:42:48 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2024-06-24T15:42:48Z</dc:date>
    <item>
      <title>ODS EXCEL worksheet header truncation WARNING:</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-worksheet-header-truncation-WARNING/m-p/933569#M26620</link>
      <description>&lt;P&gt;I have an application that use ODS EXCEL to "FLOW" a text string into a cell with specified width, ODS EXCEL inserts linefeed character '0A'x into the string to produce a new line within each cell.&amp;nbsp; I then read the XLSX back into a data set and count the number of linefeeds.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I have long titles or footnotes, I get the following warnings.&lt;/P&gt;
&lt;P&gt;WARNING: Worksheet header is too long. &amp;nbsp;Truncation will occur.&lt;BR /&gt;WARNING: Worksheet footer is too long. &amp;nbsp;Truncation will occur.&lt;/P&gt;
&lt;P&gt;This application does not need titles or footnotes, but I don't want to turn them off with TITLE; FOOTNOTE; statements because I can't easily turn them back on.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've tried using PROC PRINTTO to send the log to NUL and that works ODS and PROC statements, NOTES etc. disappear from the log but NOT the warning.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ODS EXCEL has an option,&amp;nbsp;MSG_LEVEL='NO NOTES', that looked promising but does not suppress the warnings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think if I could redirect STDERR that would work but I cannot figure that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 14:55:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-worksheet-header-truncation-WARNING/m-p/933569#M26620</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2024-06-24T14:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: ODS EXCEL worksheet header truncation WARNING:</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-worksheet-header-truncation-WARNING/m-p/933575#M26621</link>
      <description>&lt;P&gt;It is not clear from your description what code you are running and where in the process the warnings are being generated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it is in a PROC IMPORT step and the cause is title lines in the spreadsheet then I would suggest skipping the title lines when doing the PROC IMPORT.&lt;/P&gt;
&lt;P&gt;Something like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title1 'First header line is very long and too long to be a varible name';
filename xlsx temp;
ods excel file="%sysfunc(pathname(xlsx))" options (embedded_titles='yes');
proc print data=sashelp.class noobs;
run;
ods excel close;
proc import file=xlsx dbms=xlsx out=test replace;
 range="$A3:";
run;
proc print;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want to see how the titles and footnotes defined look at the DICTIONARY table (view?) called TITLES, which you can also see as SASHELP.VTITLE.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=sashelp.vtitle;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1719242578043.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/97855i309E60A75BBF6F7D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Tom_0-1719242578043.png" alt="Tom_0-1719242578043.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 15:23:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-worksheet-header-truncation-WARNING/m-p/933575#M26621</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-06-24T15:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: ODS EXCEL worksheet header truncation WARNING:</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-worksheet-header-truncation-WARNING/m-p/933577#M26622</link>
      <description>&lt;P&gt;Sorry&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;I should have included example.&amp;nbsp; This shows the problem and message from ODS EXCEL.&amp;nbsp; I am not embedding titles or footnotes.&amp;nbsp; And I don't need the worksheet headers or footers.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;49         title1 'First header line is very long and too long to be a varible name'
50               'First header line is very long and too long to be a varible name'
51               'First header line is very long and too long to be a varible name'
52               'First header line is very long and too long to be a varible name'
53               'First header line is very long and too long to be a varible name';
54         filename xlsx temp;
55         ods excel file="%sysfunc(pathname(xlsx))" options (embedded_titles='NO');
56         proc print data=sashelp.class noobs;
57         run;

NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.03 seconds
      cpu time            0.03 seconds
WARNING: Worksheet header is too long.  Truncation will occur.
58         ods excel close;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Jun 2024 15:42:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-worksheet-header-truncation-WARNING/m-p/933577#M26622</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2024-06-24T15:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: ODS EXCEL worksheet header truncation WARNING:</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-worksheet-header-truncation-WARNING/m-p/933579#M26623</link>
      <description>&lt;P&gt;So SAS has some inconsistency in what it allows in title lengths.&amp;nbsp; The maximum that it will surface in SASHELP.VTITLE is 256 (255?) characters.&amp;nbsp; But it seems to be able to use more.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1719244849602.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/97856i0B4E388716BB4F45/image-size/large?v=v2&amp;amp;px=999" role="button" title="Tom_0-1719244849602.png" alt="Tom_0-1719244849602.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The ODS EXCEL error when trying to put the titles in the header of the spreadsheet is seems to trigger at that 256 length.&amp;nbsp; So that is either an excel limit (or a limit that ODS EXCEL thinks exists).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that if you just change the EMBEDDED_HEADERS option on the ODS EXCEL destination to "YES" then you will not get the warning.&amp;nbsp; So as long as you know how many title lines there are you could probably work out a way to make the file and read it back in.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 16:04:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-worksheet-header-truncation-WARNING/m-p/933579#M26623</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-06-24T16:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: ODS EXCEL worksheet header truncation WARNING:</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-worksheet-header-truncation-WARNING/m-p/933804#M26624</link>
      <description>&lt;P&gt;I change my titles macro to put the title and footnote statements in a temporary file that I can %include as needed.&amp;nbsp; Now I can use&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;TITLE; FOOTNOTE;
*do the EXCEL bits.;
%inc TITLES;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;No warnings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;Thanks for your comments and interest in this topic.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 14:30:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-worksheet-header-truncation-WARNING/m-p/933804#M26624</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2024-06-26T14:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: ODS EXCEL worksheet header truncation WARNING:</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-worksheet-header-truncation-WARNING/m-p/934258#M26625</link>
      <description>&lt;P&gt;I wonder if the system option noquotelenmax works here too.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 13:44:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-worksheet-header-truncation-WARNING/m-p/934258#M26625</guid>
      <dc:creator>A_Kh</dc:creator>
      <dc:date>2024-07-01T13:44:46Z</dc:date>
    </item>
  </channel>
</rss>

