The SAS Output Delivery System and reporting techniques

EXCEL Read Only

Reply
Regular Learner JT8
Regular Learner
Posts: 1

EXCEL Read Only

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;
Super User
Posts: 23,997

Re: EXCEL Read Only

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;



Ask a Question
Discussion stats
  • 1 reply
  • 174 views
  • 0 likes
  • 2 in conversation