- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I would like to generate an excel output with password protected it. Is there a way to do that in SAS step?
My code:
proc export data=final
outfile="C:\Users\ai\Desktop\test.xls"
dbms=xlsx replace;
run;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Setting a password has to be done in Excel or other spreadsheet software that can do it.
How you get the external software to do it (if possible at all) depends on your environment (is SAS installed on Windows or UNIX, is XCMD enabled).
DDE is deprecated by Microsoft and should no longer be used (the note referred to by @SAS_Cares is from 2008!)
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Setting a password has to be done in Excel or other spreadsheet software that can do it.
How you get the external software to do it (if possible at all) depends on your environment (is SAS installed on Windows or UNIX, is XCMD enabled).
DDE is deprecated by Microsoft and should no longer be used (the note referred to by @SAS_Cares is from 2008!)
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Noted! You are absolutely right, removing! And this is why we rely on our Super Users 😉 thanks for spotting it!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
An alternative is to have SAS run a command line using the X command. While there are much better ways, look at using PowerShell:
https://github.com/dfinke/ImportExcel
https://github.com/dfinke/ImportExcel/issues/1482
This unzips the xlsx file and then manipulates the XML. The library used here, EPPlus, is used by a lot of people.