data TEST ; col1 = "Exécution amiable - retour huissier" ; col2 = "Exécution amiable - retour huissier" ; col3 = "Exécution amiable - retour huissier" ; output ; col1 = "Exécution amiable - retour huissier" ; col2 = "Exécution amiable - retour huissier" ; col3 = "Exécution amiable - retour huissier" ; output ; run ; ODS LISTING CLOSE; ODS EXCEL FILE="$GRPFPU/REQUETES_PROD/TEST_NASSER.xlsx" STYLE=HTMLBlue; ODS Excel options (SHEET_NAME = "Base" EMBEDDED_TITLES = "off" FROZEN_HEADERS = "yes" AUTOFILTER = "all" absolute_row_height='30' ROW_HEIGHTS="0,20,0,0,0,0,0"); PROC REPORT DATA=TEST NOWD STYLE(header)=[background=CX9BC2E6 foreground=white] STYLE(column)=[cellwidth=3cm ] ; COLUMN col1 col2 col3; RUN; ODS Excel CLOSE; ODS LISTING;
hello,
by executing this code, I note that there is a return cariage indisde the cell excel.
how could I prevent this ?
thanks a lot in advance for your help
kind regards
Nasser
PROC REPORT DATA=TEST NOWD STYLE(header)=[background=CX9BC2E6 foreground=white] STYLE(column)=[cellwidth=3cm ] ; COLUMN col1 col2 col3; define _all_/style={tagattr='wrap:no'}; RUN;
You need the FLOW option.
specifies that a designated Worksheet area enables Wrap Text and disables newline character insertion. Excel wraps the text to the column width.
enables Wrap Text for a single cell such as “A12” or a cell range such as “C1:E4”.
enables Wrap Text for table data cells.
enables Wrap Text in table column headers.
Alias | HEADER |
enables Wrap Text for table row headers.
Alias | ROWHEADER |
enables Wrap Text for all parts of a table: HEADER, ROWHEADER, and DATA.
Alias | TABLE |
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.
hello
thanks for your quick respons but i did not manage to implement it;
I use the option FLOW but the text still contains a return carriage
thanks
Nasser
I suspect you used the DEFINE statement option FLOW. You need ODS EXCEL OPTIONS(FLOW="TABLE')
ODS Excel options (SHEET_NAME = "Base"
EMBEDDED_TITLES = "off"
FROZEN_HEADERS = "yes"
AUTOFILTER = "all"
FLOW = 'Table'
absolute_row_height='30'
ROW_HEIGHTS="0,20,0,0,0,0,0");
@Nasser_DRMCP wrote:
hello
thanks for your quick respons but i did not manage to implement it;
I use the option FLOW but the text still contains a return carriage
thanks
Nasser
thanks a lot
I get the attended result in excel by cliking on button "automatic retour cariage"
Why this button is turn on ?
thanks
I wonder why this button is activated;
i would like to avoid return cariage
hello
my problem is that wrap text button is enabled by opening my excel file. i would like it to be disabled
thanks a lot in advance for your help
Nass
PROC REPORT DATA=TEST NOWD STYLE(header)=[background=CX9BC2E6 foreground=white] STYLE(column)=[cellwidth=3cm ] ; COLUMN col1 col2 col3; define _all_/style={tagattr='wrap:no'}; RUN;
thanks a lot for your quick respons
the "wrap text" button is disabled and the text has not return carriage
But I wonder why there is a return carriage inside the formul bar ?
by copy/past the content of the excel sheet into ultra edit I can note that the text contains character return cariage; and I do't know why
That is because you used this style "cellwidth=3cm". if remove it ,you would not got return cariage .
PROC REPORT DATA=TEST NOWD STYLE(header)=[background=CX9BC2E6 foreground=white] STYLE(column)=[cellwidth=3cm ] /*<----- Remove it */ ; COLUMN col1 col2 col3; define _all_/style={tagattr='wrap:no'}; RUN;
thanks for your quick respons
by doing that, tthe result is just below. and I agree, the carriage return no longer appaers.
but the column is width.
what I would le to get is that below
many thanks for your help
OK. Try this option "Absolute_Column_Width".
ODS LISTING CLOSE; ODS EXCEL FILE="c:\temp\TEST_NASSER.xlsx" STYLE=HTMLBlue; ODS Excel options (SHEET_NAME = "Base" EMBEDDED_TITLES = "off" FROZEN_HEADERS = "yes" AUTOFILTER = "all" absolute_row_height='30' Absolute_Column_Width="10,10,10" /*<---Try this one*/ ROW_HEIGHTS="0,20,0,0,0,0,0"); PROC REPORT DATA=TEST NOWD STYLE(header)=[background=CX9BC2E6 foreground=white] ; COLUMN col1 col2 col3; define _all_/style={tagattr='wrap:no' } ; RUN; ODS Excel CLOSE; ODS LISTING;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.