BookmarkSubscribeRSS Feed
Raj_C
Obsidian | Level 7

 

Hi SAS Users,

 

I am converting SAS dataset to excel and I am using following code. but the issue is in excel the width is eneven (kindly see the screenshot which attached). kindly let me know where I need to update the code.

Note: I am using SAS EG 7.1 (64-bit).

 

ods listing close;
ods tagsets.excelxp
file="&XLS"
STYLE=sas_xls
OPTIONS (Orientation = 'landscape'
embedded_titles = 'yes'
row_repeat='header'
FitToPage = 'Yes'
Pages_FitWidth = '1'
Pages_FitLength = '100'
sheet_interval='none'
sheet_name="&CK"
autofilter = 'all');
%let trans=;


doubt.PNG
3 REPLIES 3
Kurt_Bremser
Super User

I guess your complaint is not about width, but height of cells.

Since this is basically free-form text, look for hidden linefeeds.

(convert the strings in the dataset to hexadecimal representation using the $HEXw. format to show special characters)

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

 

There isn't enough information there, that is just the file open command.  What is your proc report doing?  What should the output look like?  What is this sas_xls style?

Reeza
Super User

Tagsets has a auto row height option as well as a skip space option. 

Have you tried those?

 

its unlikely but verify your running the latest tagsets version. 

The version is posted in your log after the ods statement and the latest version is on the download page. 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register 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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 865 views
  • 0 likes
  • 4 in conversation