<?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: PROC REPORT - Spanning Header loses spaces and looks wrapped in excel output in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Spanning-Header-loses-spaces-and-looks-wrapped-in/m-p/985522#M379862</link>
    <description>&lt;P&gt;Make sure the spaces in your program file are spaces and not nulls or other invisible characters.&lt;/P&gt;
&lt;P&gt;Try a simpler example.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename _dataout temp;
ods excel file=_dataout;
proc report data=sashelp.class;
 column ('Header 1' ('Header 2' name sex) ('Header 3' age height weight) ) ;
run;
ods excel close;

%let _dataout_name=example.xlsx;
%let _dataout_mime_type=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 27 Mar 2026 16:42:08 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2026-03-27T16:42:08Z</dc:date>
    <item>
      <title>PROC REPORT - Spanning Header loses spaces and looks wrapped in excel output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Spanning-Header-loses-spaces-and-looks-wrapped-in/m-p/985518#M379860</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please help on the following.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I’m using PROC REPORT to create a report with spanning headers and exporting it to Excel via ODS EXCEL.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;One of my spanning headers is:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Product TRXS Value &amp;amp; Volume (all series)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, in the Excel output, the header text appears with missing spaces and looks like it is wrapped:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Product TRXSValue &amp;amp; Volume(all series)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I am using the following code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data HAVE;
    length 
        ID 8
        TYPE $10
        SALE_DATE 8
        Customer_Name $20
        South 8
        North 8
        West 8
        East 8
        HAS_COMPLETED $1
        Is_From_The_Same_Area $1
        TOTAL_Product_VAL_26 8
        TOTAL_Product_VOL_26 8
        ProductA_VAL_26 8
        ProductA_VOL_26 8
        ProductB_VAL_26 8
        ProductB_VOL_26 8
        ProductC_VAL_26 8
        ProductC_VOL_26 8
        ProductD_VAL_26 8
        ProductD_VOL_26 8
        ProductE_VAL_26 8
        ProductE_VOL_26 8
        Avg_VAL_Product_26 8
        PRODUCT_UNIQ_AREA_12Months 8
        Product_12mnths_VAL 8
        PRODUCT_PRIME_12_MONTHS 8
        PRIME_Total_SERIES_Aggregated 8
    ;

    format SALE_DATE date9.;
    informat SALE_DATE date9.;

    infile datalines dlm='|' dsd truncover;

    input
        ID
        TYPE :$10.
        SALE_DATE :date9.
        Customer_Name :$20.
        South North East West
        HAS_COMPLETED :$1.
        Is_From_The_Same_Area :$1.
        TOTAL_Product_VAL_26 TOTAL_Product_VOL_26
        ProductA_VAL_26 ProductA_VOL_26 
		ProductB_VAL_26 ProductB_VOL_26
        ProductC_VAL_26 ProductC_VOL_26
		ProductD_VAL_26 ProductD_VOL_26
        ProductE_VAL_26 ProductE_VOL_26 
		Avg_VAL_Product_26
        PRODUCT_UNIQ_AREA_12Months
        Product_12mnths_VAL
        PRODUCT_PRIME_12_MONTHS
        PRIME_Total_SERIES_Aggregated
    ;

datalines;
1|Existing|20-Nov-86|AAAAAAAAAA|0|0|0|0|N|N|2610|9|0|0|0|0|2610|9|2610|9|0|0|290|1|6245|0|6245
2|Existing|11-Feb-94|BBBBBBBBBB|0|0|0|0|N|N|180|1|0|0|0|0|180|1|180|1|0|0|180|1|180|0|180
3|Existing|20-Jun-01|CCCCCCCCCC|0|0|0|0|N|N|500|2|0|0|0|0|500|2|500|2|0|0|250|3|540|0|540
4|New|01-Jan-65|DDDDDDDDD|0|0|0|0|N|N|1820|5|0|0|0|0|1820|5|1820|5|0|0|364|3|3720|0|3720
5|Existing|14-Sep-99|EEEEEEEEEE|0|0|0|0|N|N|35|1|0|0|0|0|35|1|35|1|0|0|35|1|35|0|35
6|Existing|30-Jun-00|FFFFFFFFFF|0|0|0|0|N|N|2000|6|0|0|1000|1|1000|5|1000|5|0|0|200|2|5360|0|5360
7|Existing|04-Sep-00|GGGGGGGGGG|0|0|0|0|N|N|150|2|0|0|0|0|150|2|150|2|0|0|75|1|270|0|270
8|Existing|28-May-02|HHHHHHHHHH|0|0|0|0|N|N|2095|4|0|0|0|0|2095|4|2095|4|0|0|523.75|1|3890|0|3890
9|Existing|15-Apr-04|IIIIIIIIII|0|0|0|0|N|N|9000|4|0|0|0|0|9000|4|9000|4|0|0|2250|2|9000|0|9000
10|Existing|29-Dec-05|KKKKKKKKKK|0|0|0|0|N|N|100|2|0|0|0|0|100|2|50|1|50|1|50|1|100|0|100
;
run;


proc format;
value $hdfmt
'Other Info &amp;amp; Details' = 'cx002060'
'Product TRXS Value &amp;amp; Volume (all series)' = 'cx7030A0'
'Region / Area' = 'cxFF0000'
'Customer Information' = 'cx00B050'
;
run;

ODS EXCEL 
FILE = FILEOUT
;

proc report data=HAVE nowd split='|'
	style(header)={background=$hdfmt. foreground=white 
	tagattr="wrap:no" 
	vjust=middle}
;

    column 
		("Customer Information"
            ID SALE_DATE Customer_Name TYPE					
        )

		("Region / Area"
			South North East West
        )
		
		("Product TRXS Value &amp;amp; Volume (all series)"
            Product_12mnths_VAL
			TOTAL_Product_VAL_26 TOTAL_Product_VOL_26
			ProductA_VAL_26 ProductA_VOL_26
			ProductB_VAL_26 ProductB_VOL_26 
			ProductD_VAL_26 ProductD_VOL_26 
			Avg_VAL_Product_26
			ProductC_VAL_26 ProductC_VOL_26 
			ProductE_VAL_26 ProductE_VOL_26 
        )

		("Other Info &amp;amp; Details"
			PRODUCT_UNIQ_AREA_12Months Is_From_The_Same_Area HAS_COMPLETED 
			PRODUCT_PRIME_12_MONTHS PRIME_Total_SERIES_Aggregated 
        )

  ;

    define ID / display "Cust ID|(ID)" 
        style(header)=[background=cx00B050 foreground=white tagattr="wrap:yes" vjust=middle]
        style(column)=[just=left cellwidth=0.80in];

    define SALE_DATE / display "Sale|Start Date" 
        style(header)=[background=cx00B050 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[just=left cellwidth=0.80in];

    define customer_name / display "Customer|Name" 
        style(header)=[background=cx00B050 foreground=white tagattr="wrap:yes" vjust=middle]
        style(column)=[just=center cellwidth=1.00in];

    define TYPE / display "Cust Type"
        style(header)=[background=cx00B050 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[just=left cellwidth=1.00in];
   
    define South / display "South|Area"
        style(header)=[background=cxFF0000 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[just=center cellwidth=0.50in];

    define North / display "North|Area" 
        style(header)=[background=cxFF0000 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[just=center cellwidth=0.55in];

    define West / display "West|Area" 
        style(header)=[background=cxFF0000 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[just=center cellwidth=0.75in];

    define East / display "East|Area" 
        style(header)=[background=cxFF0000 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[just=center cellwidth=0.62in];

	define Product_12mnths_VAL / "Overall|Product Val|last 12|months" 
	    style(header)=[background=cx7030A0 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[tagattr='format:£#,##0.00' just=center cellwidth=1.00in];

	define TOTAL_Product_VAL_26 / "Overall Product|Val|YTD"
		style(header)=[background=cx7030A0 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[tagattr='format:£#,##0.00' just=center cellwidth=1.00in];

	define TOTAL_Product_VOL_26 / "Overall Product|Vol|YTD"  
		style(header)=[background=cx7030A0 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[just=center cellwidth=1.00in];

	define ProductA_VAL_26 / "ProductA Val|YTD" 
	 	style(header)=[background=cx7030A0 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[tagattr='format:£#,##0.00' just=center cellwidth=0.9in];

	define ProductA_VOL_26 / "ProductA Vol|YTD" 
	 	style(header)=[background=cx7030A0 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[just=center cellwidth=0.75in];

	define ProductB_VAL_26 / "ProductB Val|YTD"  
	 	style(header)=[background=cx7030A0 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[tagattr='format:£#,##0.00' just=center cellwidth=0.75in];

	define ProductB_VOL_26 / "ProductB Vol|YTD" 
	 	style(header)=[background=cx7030A0 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[just=center cellwidth=0.8in];

	define ProductD_VAL_26 / "ProductD|Val|YTD" 
	 	style(header)=[background=cx7030A0 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[tagattr='format:£#,##0.00' just=center cellwidth=0.8in];

	define ProductD_VOL_26 / "ProductD|Vol|YTD" 
	 	style(header)=[background=cx7030A0 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[just=center cellwidth=0.8in];

	define Avg_VAL_Product_26 / "Product Overall|Avg Val|Dep" 
	 	style(header)=[background=cx7030A0 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[tagattr='format:£#,##0.00' just=center cellwidth=0.8in];

	define ProductC_VAL_26 / "ProductC|Val|YTD" 
	 	style(header)=[background=cx7030A0 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[tagattr='format:£#,##0.00' just=center cellwidth=0.8in];

	define ProductC_VOL_26 / "ProductC|Val|YTD" 
	 	style(header)=[background=cx7030A0 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[just=center cellwidth=0.8in];

	define ProductE_VAL_26 / "ProductE|Val|YTD"
		style(header)=[background=cx7030A0 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[tagattr='format:£#,##0.00' just=center cellwidth=0.8in];

	define ProductE_VOL_26 / "ProductE|Vol|YTD" 
		style(header)=[background=cx7030A0 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[just=center cellwidth=0.8in];

	define PRODUCT_UNIQ_AREA_12Months / "Product Unique Areas|Last 12 Mths"  
	    style(header)=[background=cx002060 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[just=center cellwidth=0.85in];

	define Is_From_The_Same_Area / "Same Area|As of Day YTD"  
	    style(header)=[background=cx002060 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[just=center cellwidth=0.85in];

	define HAS_COMPLETED / "LOGIN|Completed"  
	    style(header)=[background=cx002060 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[just=center cellwidth=0.85in];

	define PRODUCT_PRIME_12_MONTHS / "Product Overall prime last|12 months" 
	    style(header)=[background=cx002060 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[tagattr='format:£#,##0.00' just=center cellwidth=0.85in];

	define PRIME_Total_SERIES_Aggregated / "Prime &amp;amp; Overall Series|(last 12 mths)" width=12
	    style(header)=[background=cx002060 foreground=white tagattr="wrap:yes" vjust=middle]
		style(column)=[tagattr='format:£#,##0.00' just=center cellwidth=0.90in]; 

run;


ODS EXCEL CLOSE;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When exported in excel, it gives me the following output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="current output.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/113889i5801C1EC0101DFB9/image-size/large?v=v2&amp;amp;px=999" role="button" title="current output.png" alt="current output.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I have tried different things but nothing has worked.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any way to make it display without missing spaces like the below?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="current output want.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/113890i7614D9DC453CC284/image-size/large?v=v2&amp;amp;px=999" role="button" title="current output want.png" alt="current output want.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2026 16:07:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Spanning-Header-loses-spaces-and-looks-wrapped-in/m-p/985518#M379860</guid>
      <dc:creator>Zatere</dc:creator>
      <dc:date>2026-03-27T16:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT - Spanning Header loses spaces and looks wrapped in excel output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Spanning-Header-loses-spaces-and-looks-wrapped-in/m-p/985522#M379862</link>
      <description>&lt;P&gt;Make sure the spaces in your program file are spaces and not nulls or other invisible characters.&lt;/P&gt;
&lt;P&gt;Try a simpler example.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename _dataout temp;
ods excel file=_dataout;
proc report data=sashelp.class;
 column ('Header 1' ('Header 2' name sex) ('Header 3' age height weight) ) ;
run;
ods excel close;

%let _dataout_name=example.xlsx;
%let _dataout_mime_type=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Mar 2026 16:42:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Spanning-Header-loses-spaces-and-looks-wrapped-in/m-p/985522#M379862</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-03-27T16:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT - Spanning Header loses spaces and looks wrapped in excel output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Spanning-Header-loses-spaces-and-looks-wrapped-in/m-p/985527#M379863</link>
      <description>&lt;P&gt;SAS is mistakenly replacing some of the spaces with linefeeds to cause that wrapping.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Open a support ticket with SAS support.&amp;nbsp; It seems to be triggering some type of bug in their code (or possible in Excel's code).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems to be related to the number of columns that heading is spanning because if I split into two blocks and give each of them the same heading it prints fine.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   (
    "Product TRXS Value &amp;amp; Volume (all series)" 

      Product_12mnths_VAL
      TOTAL_Product_VAL_26 TOTAL_Product_VOL_26
      ProductA_VAL_26 ProductA_VOL_26
      ProductB_VAL_26 ProductB_VOL_26 
      ProductD_VAL_26 ProductD_VOL_26 
        )
        
        (
    "Product TRXS Value &amp;amp; Volume (all series)" 

      Avg_VAL_Product_26
      ProductC_VAL_26 ProductC_VOL_26 
      ProductE_VAL_26 ProductE_VOL_26 
        )    &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-03-27 at 1.29.17 PM.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/113892i3280213F49B459BE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2026-03-27 at 1.29.17 PM.png" alt="Screenshot 2026-03-27 at 1.29.17 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2026 19:18:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Spanning-Header-loses-spaces-and-looks-wrapped-in/m-p/985527#M379863</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-03-27T19:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT - Spanning Header loses spaces and looks wrapped in excel output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Spanning-Header-loses-spaces-and-looks-wrapped-in/m-p/985558#M379864</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;SAS is mistakenly replacing some of the spaces with linefeeds to cause that wrapping.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Is the problem related to the FLOW option?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(FLOW=&amp;lt;"cell-names" | "DATA" | "HEADERS" | "ROWHEADERS" | "TABLES" | "TEXT" | "NONE"&amp;gt;)
&lt;FONT color="#800080"&gt;specifies that a designated Worksheet area enables Wrap Text and disables newline character insertion.&lt;/FONT&gt; Excel wraps the text to the column width.
cell-names
enables Wrap Text for a single cell such as “A12” or a cell range such as “C1:E4”.
DATA
enables Wrap Text for table data cells.
HEADERS
enables Wrap Text in table column headers.
Alias	HEADER
ROWHEADERS
enables Wrap Text for table row headers.
Alias	ROWHEADER
TABLES
enables Wrap Text for all parts of a table: HEADER, ROWHEADER, and DATA.
Alias	TABLE
TEXT
makes ODS TEXT output work like titles, footnotes, PROC titles, and BY lines. The text is written into multiple merged cells and Wrap Text is enabled.
NONE
specifies that text wrapping is not enabled. This option can turn off the FLOW= option.
Default	NONE
Examples	 ods excel file="c:\file-path\test.xlsx" options(flow="A2");
ods excel file="c:\file-path\test.xlsx" options(flow="tables");
ods excel file="c:\file-path\test.xlsx" options(flow="text");
&lt;/PRE&gt;
&lt;P&gt;I tested it and OPTIONS(FLOW="HEADERS") fixed it.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2026 20:40:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Spanning-Header-loses-spaces-and-looks-wrapped-in/m-p/985558#M379864</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2026-03-27T20:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT - Spanning Header loses spaces and looks wrapped in excel output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Spanning-Header-loses-spaces-and-looks-wrapped-in/m-p/985579#M379865</link>
      <description>&lt;P&gt;That is interesting because telling it something like&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;flow="A1:C9999" &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;did not work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But of course that was because I flipped rows and columns in my head.&amp;nbsp; Should have been something like A1:ZZ3&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2026 22:27:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Spanning-Header-loses-spaces-and-looks-wrapped-in/m-p/985579#M379865</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-03-27T22:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT - Spanning Header loses spaces and looks wrapped in excel output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Spanning-Header-loses-spaces-and-looks-wrapped-in/m-p/985582#M379866</link>
      <description>&lt;P&gt;Use style 'asis=on' to keep blank as it was:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc report data=HAVE nowd split='|'
	style(header)={background=$hdfmt. foreground=white  &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;asis=on&lt;/STRONG&gt;&lt;/FONT&gt;
	tagattr="wrap:no" 
	vjust=middle}
;
&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="屏幕截图 2026-03-28 145430.png" style="width: 811px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/113936i560033B7D9975C50/image-size/large?v=v2&amp;amp;px=999" role="button" title="屏幕截图 2026-03-28 145430.png" alt="屏幕截图 2026-03-28 145430.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Mar 2026 06:55:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Spanning-Header-loses-spaces-and-looks-wrapped-in/m-p/985582#M379866</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2026-03-28T06:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT - Spanning Header loses spaces and looks wrapped in excel output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Spanning-Header-loses-spaces-and-looks-wrapped-in/m-p/985584#M379867</link>
      <description>&lt;P&gt;Style 'nobreakspace=on' also can solve this problem :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc report data=HAVE nowd split='|'
	style(header)={background=$hdfmt. foreground=white  &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;nobreakspace=on&lt;/STRONG&gt;&lt;/FONT&gt;
	tagattr="wrap:no" 
	vjust=middle}
;
&lt;/PRE&gt;</description>
      <pubDate>Sat, 28 Mar 2026 08:23:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Spanning-Header-loses-spaces-and-looks-wrapped-in/m-p/985584#M379867</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2026-03-28T08:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT - Spanning Header loses spaces and looks wrapped in excel output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Spanning-Header-loses-spaces-and-looks-wrapped-in/m-p/985586#M379868</link>
      <description>I will try nobreakspace=on as well</description>
      <pubDate>Sat, 28 Mar 2026 10:54:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Spanning-Header-loses-spaces-and-looks-wrapped-in/m-p/985586#M379868</guid>
      <dc:creator>Zatere</dc:creator>
      <dc:date>2026-03-28T10:54:34Z</dc:date>
    </item>
  </channel>
</rss>

