Hello
I have a SAS job that creates XLSX file and saves to network drive. I've built an HTML page and put a link to this file for others to view. I need the file to open in Read Only mode. I've used ODS EXCEL Protect Sheet option however this still displays a message to user on how to unprotect the sheet and the Autofilters are not active unless you do a save a copy of file
Any ideas on how to make file Read Only where user can use the autofilters and make changes, however must do Save As to keep any changes.
ODS EXCEL FILE= '/test/reports_monthly/a+b_expirationtest.xlsx' style = pearl options(protect_worksheet='on' frozen_headers='on' autofilter='all' sheet_interval = "none" sheet_name="A+B Exp");
ods escapechar='~';
ods text="EXPIRING A+B AND BXP PRICES IN THE NEXT 90 DAYS, AS OF 03/16/2018";
proc print data=ab_expiration NOOBS;
run;
ods excel close;
Do you have XCMD enabled? Perhaps change the file to read only via permissions and then a user will be forced to Save As.
Or would that disable the filters as well? If it would, you could lock the cells but I think that would require VBA/VBS.
@JT8 wrote:
Hello
I have a SAS job that creates XLSX file and saves to network drive. I've built an HTML page and put a link to this file for others to view. I need the file to open in Read Only mode. I've used ODS EXCEL Protect Sheet option however this still displays a message to user on how to unprotect the sheet and the Autofilters are not active unless you do a save a copy of file
Any ideas on how to make file Read Only where user can use the autofilters and make changes, however must do Save As to keep any changes.
ODS EXCEL FILE= '/test/reports_monthly/a+b_expirationtest.xlsx' style = pearl options(protect_worksheet='on' frozen_headers='on' autofilter='all' sheet_interval = "none" sheet_name="A+B Exp"); ods escapechar='~'; ods text="EXPIRING A+B AND BXP PRICES IN THE NEXT 90 DAYS, AS OF 03/16/2018"; proc print data=ab_expiration NOOBS; run; ods excel close;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.