BookmarkSubscribeRSS Feed
BobyGadu
Calcite | Level 5

trying to save the excel with password but the session is hungup when I tried

can someone explain me the put statement

put '[open(file)]'

put '[save.as('file',1,'password')]' 

put '[quit]'

Need to know that 1 stands for what how to tweak without creating file without Password and opening it ans saving with password 

without that can we do on singel step create password protected file directly?

5 REPLIES 5
ewgrashorn
Obsidian | Level 7

bump; I too would like to know what the options for the save.as command are (or how to find them)

data_null__
Jade | Level 19

I would not bother with DDE.

This example may be helpful. https://communities.sas.com/message/128871#128871

Tom
Super User Tom
Super User

I simple google search found this page from Microsoft.

SaveAs Method [Excel 2007 Developer Reference]

ewgrashorn
Obsidian | Level 7

Thanks Tom, that's a useful reference for the SaveAs method, but I'm more interested in the documentation of the method described in the original post, save.as  In case anyone actually cares about this (which I doubt, since further searching suggests that dde has been deprecated in favor of ODS), I was able to figure out (via trial and error, which seems to be the most useful way to figure out how to use SAS) how to get save.as to work in my situation: I was having issues opening the spreadsheet created in Excel 2007 format (.xlsx), but the spreadsheet opened just fine when created in Excel 2003 format (.xls).  If you find yourself coming to this post because of similar issues in opening a spreadsheet created via the save.as method, you might find this useful.

Oleg_L
Obsidian | Level 7

Recommend you google search for "macrofun.hlp".

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 5 replies
  • 1566 views
  • 1 like
  • 5 in conversation