New SAS User

Completely new to SAS or trying something new with SAS? Post here for help getting started.
BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
miss2223
Fluorite | Level 6

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;

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

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!)

View solution in original post

3 REPLIES 3
Kurt_Bremser
Super User

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!)

SAS_Cares
SAS Employee

Noted! You are absolutely right, removing! And this is why we rely on our Super Users 😉 thanks for spotting it!

AlanC
Barite | Level 11

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. 

 

https://github.com/savian-net

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 4164 views
  • 2 likes
  • 4 in conversation