Sas ODS Excel/Proc报告-无换行/合并单元格?

Sas ODS Excel/Proc报告-无换行/合并单元格?,sas,Sas,我经常使用SAS ODS导出预绑定的excel文件。其中一个文件的标题比所有列的宽度都要长,所以它们会换行,这使得文件看起来很糟糕 是否有任何方法可以在关闭“自动换行”的情况下导出文件?我在SAS支持论坛上搜索过,发现很少有用的信息 %let myfile = "C:\Users\dicegods\testfile.xlsx"; ods excel file=&myfile. options (orientation='portrait' sheet_name='Baseball' e


我经常使用SAS ODS导出预绑定的excel文件。其中一个文件的标题比所有列的宽度都要长,所以它们会换行,这使得文件看起来很糟糕

是否有任何方法可以在关闭“自动换行”的情况下导出文件?我在SAS支持论坛上搜索过,发现很少有用的信息

%let myfile = "C:\Users\dicegods\testfile.xlsx"; 
ods excel file=&myfile. options (orientation='portrait' sheet_name='Baseball' embedded_titles='yes'); 

options LeftMargin=0.25in RightMargin=0.25in TopMargin=0.25in BottomMargin=0.25in; 
proc report data=sashelp.baseball; 
column name nHome nHits; 
define name / display 'Name'; 
define nHome / display 'Homers' sum; 
define nHits / analysis 'Hits' sum; 
title; title1 J=L "Baseball Players from SAS Help Database - sashelp library inEG - more run on stuff"; 
run; 

我认为您需要这个选项FLOW,如下图所示


尝试使用ODS文本。下面的代码片段显示了一种使用ODS文本在下面的PROC步骤生成的工作表顶部插入“标题”的简单方法。查阅ODS文本,了解如何控制生成文本的格式

%let myfile = "C:\downloads\testfile.xlsx"; 
ods excel file=&myfile. options (orientation='portrait' sheet_name='Baseball' embedded_titles='no'); 
ods text="Baseball Players from SAS Help Database - sashelp library inEG - more run on stuff"; 

options LeftMargin=0.25in RightMargin=0.25in TopMargin=0.25in BottomMargin=0.25in; 
proc report data=sashelp.baseball; 
column name nHome nHits; 
define name / display 'Name'; 
define nHome / display 'Homers' sum; 
define nHits / analysis 'Hits' sum; 
title J=L "Baseball Players from SAS Help Database - sashelp library inEG - more run on stuff"; 
run; 
title;

ods excel close;

您还可以添加一小段代码来重现此问题吗?
%let myfile=“C:\Users\dicegoods\testfile.xlsx”;ods excel文件=&myfile。选项(方向=“肖像”表\u name=“棒球”嵌入的\u标题=“是”);选项LeftMargin=0.25英寸RightMargin=0.25英寸TopMargin=0.25英寸BottomMargin=0.25英寸;过程报告数据=sashelp.battle;列名nHome nHits;定义名称/显示“名称”;定义nHome/显示“荷马”总和;定义NHIT/分析“点击次数”总和;标题标题1 J=L“SAS帮助数据库中的棒球运动员-EG中的sashelp库-更多跑步资料”;运行