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

Product Name: SAS Job Execution

Release: 2.1

SAS Viya release: V.03.04

Build Date: June 12,2018

 

Product Name: SAS Report Viewer

Release: 8.3.1

SAS Viya release: V.03.04

 

I have a report with a dial. On the dial I have a tool tip, "School_PK". It is numeric value that is passed to a JOB that is connected to this report. When I double-click on the dial, the JOB is executed, passed the current school_pk value to the JOB, and everything works great, with one exception. The JOB appears on a second tab rather than open in as a downloaded excel document that the end user can open and manipulate as needed.

 

What do I need to add to my JOB code to make it a downloaded excel file on the users computer?

 

I have added "_output_type" as a parameter under the JOB properties and then added "ods_excel" as the Default value, but this does not work. It produces and excel file :  'SASResults.xlsx'   . When I remove the quotes, the file says it is corrupted and cannot be opened.

 

If I convert my JOB to "ods tagsets.excelxp ..." in lieu of "ods excel ..." , then I can get a download, but the downloaded file exports into the download folder with single quotes around it, so I have to open the download file, delete the first and last quote and then okay the conversion to excel. There is no way I can deploy this project like that. End users will not want to, nor understand why, it is necessary to remove those quotes.

 

Any suggestions? Am I using the wrong output type for a JOB? 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
cuevasj
Quartz | Level 8
* Create the Excel XML output and associate with the job;
filename xmlfile filesrvc parenturi="&SYS_JES_JOB_URI"
name='_webout.xml'
contenttype='application/vnd.ms-excel'
contentdisp='attachment; filename="&VA_school_year." MS Promo &today..xml';

ods tagsets.excelXP file=xmlfile options(sheet_name="Overall Schoolwide Progress" frozen_headers='1');

...then proc report or whatever you would like to have in you excel file here ...

View solution in original post

2 REPLIES 2
Vince_SAS
Rhodochrosite | Level 12

Can you post the Job code that creates the Excel file?

 

Vince DelGobbo

SAS R&D

cuevasj
Quartz | Level 8
* Create the Excel XML output and associate with the job;
filename xmlfile filesrvc parenturi="&SYS_JES_JOB_URI"
name='_webout.xml'
contenttype='application/vnd.ms-excel'
contentdisp='attachment; filename="&VA_school_year." MS Promo &today..xml';

ods tagsets.excelXP file=xmlfile options(sheet_name="Overall Schoolwide Progress" frozen_headers='1');

...then proc report or whatever you would like to have in you excel file here ...

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 2560 views
  • 0 likes
  • 2 in conversation