BookmarkSubscribeRSS Feed
JT8
Calcite | Level 5 JT8
Calcite | Level 5

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;
1 REPLY 1
Reeza
Super User

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;



hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1965 views
  • 0 likes
  • 2 in conversation