BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
JohnO1
Fluorite | Level 6

I am using SAS version 9.4 TS Level 1M3.  

 

I have a  snippet of code below that creates an Excel Spreadsheet with the fomatting I want however, as soon as I finish running the code Excel opens. I plan to run this in batch mode at night when I am not awake and then send a link to the created spreadsheet to a number of users. I know if I use PROC EXPORT or the Libname statement to create the XLSX file the spreadsheet  does not open, but the format is not "PRETTY". Is there anyway using ODS Excel to keep the spreadsheet from opening?

 

Thanks for any help/advice you can provide.

John

 

Code Snippet:

 

filename library 'C:\library.txt' ;
%include library;
options missing = '';
ods _ALL_ close ;


ods excel file="O:\Folder\Exception Extracts.xlsx"
options(
sheet_interval="Proc"
suppress_bylines="yes"
sheet_name='Sheet Name'
autofilter='all'
frozen_headers='on'
);


proc report data=work.low_bal;
columns field1 field2 field3 field4 field5 field6 field7 field8 field9;
define field1 / display;
define field2 /display format=8.2 style=[tagattr="format:#,####0.00"];
define field3 / display format=8.2 style=[tagattr="format:#,####0.00%"];
define field4 / display;
define field5 / display;
define field6 /display;
define field7 /display;
define field8 /display;
define field9 /display format=8.2 style=[tagattr="format:#,####0.00"];
run;
quit;
ods excel close;

1 ACCEPTED SOLUTION

Accepted Solutions
JohnO1
Fluorite | Level 6

Reeza thanks for the quick responce.

 

So the issue I am having will not occur when the job runs in batch mode from a scheduler. It is only happening because I am manually running the program from the enhanced editor window correct?

 

 

View solution in original post

3 REPLIES 3
Reeza
Super User

There's an option called 'View Results as they are generated' in Base and EG that you can turn off. This means that any output to an external file (PDF, DOC, XLSX) will no longer automatically open.

Find this option in Tools>Preferences>Results Tab

 

 

JohnO1
Fluorite | Level 6

Reeza thanks for the quick responce.

 

So the issue I am having will not occur when the job runs in batch mode from a scheduler. It is only happening because I am manually running the program from the enhanced editor window correct?

 

 

Reeza
Super User

@JohnO1 wrote:

Reeza thanks for the quick responce.

 

So the issue I am having will not occur when the job runs in batch mode from a scheduler. It is only happening because I am manually running the program from the enhanced editor window correct?

 

 


Sorry, I don't know the answer to that question. I don't run jobs from a scheduler.

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