BookmarkSubscribeRSS Feed
Nasser_DRMCP
Lapis Lazuli | Level 10

 

Data have;
infile datalines dsd;
informat DIRECTION $70.  ;
input DIRECTION $ ;
datalines ;
DIR REGULARISATION CLIENT
DIRECTION DES CLIENTELES
run ;


%MACRO mc_export_table(p_chemincomplet) ;

ODS EXCEL FILE="$GRPFPU/REQUETES_PROD/have.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=have NOWD
     STYLE(header)=[background=CX9BC2E6 foreground=white just=center]
     STYLE(column)=[cellwidth=3cm];
     COLUMN
DIRECTION

;

define DIRECTION / display "DIRECTION" ;
RUN;
ODS Excel CLOSE;
ODS LISTING;
%MEND mc_export_table;

%mc_export_table ;

hello

 

as you can see there is some blank in the direction's name.

But by exporting in a excel file, I get this

DIRREGULARISATIONCLIENT

DIRECTION DESCLIENTELES

 

thanks for your help

NassR

 

2 REPLIES 2
Nasser_DRMCP
Lapis Lazuli | Level 10

solution found by adding this option

flow="tables"

Tom
Super User Tom
Super User

Yes. That should solve the issue of SAS changing the values so that Excel will split the values into multiple lines.  Which you can see in this screen shot of the two different files.

Screenshot 2026-04-08 at 10.05.31 AM.png

Which is not what I took your original question to be about.

 

Catch up on SAS Innovate 2026

Dive into keynotes, announcements and breakthroughs on demand.

Explore Now →
How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 242 views
  • 0 likes
  • 2 in conversation