BookmarkSubscribeRSS Feed
channa43
Fluorite | Level 6

ods tagsets.excelxp
options(sheet_name="Business Interruption"
autofit_height='yes' frozen_headers='yes' autofilter='yes' embedded_titles='yes' );

title "2,2820 records (2010), 2,2828 records (Now)";
proc print data=buss_int label noobs;

run;

ods tagsets.ExcelXP close;
ods results;

 

when the excel output is created it truncates the Geo code field, I am trying to stop truncating this specific field

Appreciate yoyr help

Cheers

2 REPLIES 2
ChrisNZ
Tourmaline | Level 20

It looks like the default format is too short for you (Goodness knows why SAS Institute chose best12. as default! )

This works fine if you add a format statement:

ods tagsets.excelxp file="%sysfunc(pathname(WORK))\t.xls";
ods tagsets.excelxp
options(sheet_name="Business Interruption"
autofit_height='yes' frozen_headers='yes' autofilter='yes' embedded_titles='yes' );

data BUSS_INT; 
 X=1234567890123; output;
 X=123.4567890123; output;
 format X best32.16;
run;
proc print data=BUSS_INT label noobs;
run;

ods tagsets.ExcelXP close;

 

 

 

 

channa43
Fluorite | Level 6
Thanks Chris, yes it works
Appreciate it, cheers

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 2 replies
  • 656 views
  • 0 likes
  • 2 in conversation