SAS 9.4 - 在 ODS HTML 关闭后重新激活结果查看器但禁止写入 HTML 主体文件

SAS 9.4 - Re-activate Results Viewer after ODS HTML CLOSE but suppress writing HTML Body File

当我需要导出到 SAS 9.4 中的 Excel 时,我通常 运行 像这样的代码:

ods html close;
ods html file="C:\folder\filename.xls";
ods html close;
ods html; /*with this I'm trying to send my output back to the results viewer once more*/

但是,当我运行最后一个ODSHTML试图发送到Results Viewer时,日志显示如下信息:

"Writing HTML Body file: sashtml1.htm."

这会使结果显示在结果查看器中,但也会在我的计算机 (sashtml1.htm) 文件夹中创建一个文件,其中包含我的 SAS 代码。我不想将输出保存到我​​的计算机,我只想在 SAS 中查看它。我应该如何以不同的方式编码来实现这一点?我不想打开并重新打开 SAS。

不要关闭原来的那个。告诉 SAS 不要发送任何东西。

ods html exclude all ;

当你打开第二个时,给它一个 ID。

ods html (id=ForExport) file="C:\folder\filename.xls";

那你就可以关闭新的,让旧的复活。

ods html (id=ForExport) close ;
ods html exclude none ;