Dear Friends,
Can you please help me with this query.
Using below code to generate excel from SAS dataset. Porc print is wrapping fine , however excel output has unwrapped text. I want some clean output ,unwrapped text in spreadsheet.
ods excel file="/FFLDatacleansing/ABC- &StartWeek.-&EndWeek. 2023.xlsx" options(sheet_interval='BYGROUP'
sheet_name='#byval1') style=meadow
options (tab_color ="Grey" ) ;
proc print data=FINAL_OUTPUT1 noobs style(header)={backgroundcolor=Maroon color=white} style(data)={tagattr="wrap:no" asis=on } ;
by Group;
variables ID Customer_CID Customer_Name Service_Type Service_Sub_Type Queue_Name
'Staff ID'n 'Staff Name'n Svs_Failure RM_Code RM_Name 'Manager Name'n Lead
Team Group Creator_Business 'Close Date'n Contact_1
Contact_1_Mob Contact_1_Email / style(data)= {tagattr="type:num"} ;
run;
ods excel close;
GOPTIONS ACCESSIBLE;
filename outbox email 'SAS_No_REPLY@adcb.com';
Explore the flow= option of the ODS EXCEL statement.
(FLOW=<"cell-names" | "DATA" | "HEADERS" | "ROWHEADERS" | "TABLES" | "TEXT" | "NONE">)
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.
AliasHEADER |
enables Wrap Text for table row headers.
AliasROWHEADER |
enables Wrap Text for all parts of a table: HEADER, ROWHEADER, and DATA.
AliasTABLE |
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.
specifies that text wrapping is not enabled. This option can turn off the FLOW= option.
NONE |
|
|
|
I dont want text to be wrapped. Just unwrapped data in all cells. How to achieve that.
From the docs posted by @FloydNevseta i would assume that flow=none does this.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.