0

When I need to export to Excel in SAS 9.4, I typically run a code like this:

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*/

However, when I run the last ODS HTML to try to send to Results Viewer, the log displays the following message:

"Writing HTML Body file: sashtml1.htm."

This makes the results show up in the Results Viewer but also creates a file on my computer (sashtml1.htm) in the folder with my SAS code. I don't want the output to save to my computer, I only want to view it in SAS. How should I code differently to accomplish this? I do not want to open and re-open SAS.

4

1 回答 1

2

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

ods html exclude all ;

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

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

然后你可以关闭新的并重新激活旧的。

ods html (id=ForExport) close ;
ods html exclude none ;
于 2017-07-14T16:47:28.593 回答