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;



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!

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
  • 1 reply
  • 1589 views
  • 0 likes
  • 2 in conversation