Discussion:
How to protect excel worksheet using SAS
(too old to reply)
T.K. Chia
2005-01-19 03:46:17 UTC
Permalink
Raw Message
SAS guru out there,

I'm suppose to export data from SAS dataset(SAS8.2) to Excel (Excel2000).
Due to data privacy, the excel worksheet must be protected to avoid data
manipulation (protect worksheet function in Excel). How can I use SAS
program to acheive this?

Thanks in advance.

T.K.
Richard A. DeVenezia
2005-01-19 06:38:07 UTC
Permalink
Raw Message
Post by T.K. Chia
SAS guru out there,
I'm suppose to export data from SAS dataset(SAS8.2) to Excel
(Excel2000). Due to data privacy, the excel worksheet must be
protected to avoid data manipulation (protect worksheet function in
Excel). How can I use SAS program to acheive this?
You can make the exported file read-only.

X "ATTRIB +R myProtectedData.xls";
--
Richard A. DeVenezia
http://www.devenezia.com/
k***@gmail.com
2017-10-13 06:44:31 UTC
Permalink
Raw Message
Thank you for ur option it's really work..

T.K. Chia
2005-01-19 07:08:01 UTC
Permalink
Raw Message
Thanks, Richard.

I tested this method before, however, the attribute can be reset by
others. that's why I use the excel function "protect worksheet", which
cannot be override without password.
any idea? or any alternative to acheive this?
many thanks.
Richard A. DeVenezia
2005-01-19 08:22:50 UTC
Permalink
Raw Message
Post by T.K. Chia
Thanks, Richard.
I tested this method before, however, the attribute can be reset by
others. that's why I use the excel function "protect worksheet",
which cannot be override without password.
any idea? or any alternative to acheive this?
many thanks.
Get trustworthy clients :).

You can open your xls with DDE and issue the command(s) that protect
cells/sheets/things.
Read the archives and Koen Vyverman's and others papers
(http://www.lexjansen.com/sugi/index.htm) regarding using DDE to control XL.

This VBA statement would protect everything in a sheet
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True,
Password:=mySecretCode

Good luck!
--
Richard A. DeVenezia
http://www.devenezia.com/
DB01
2005-01-19 14:45:53 UTC
Permalink
Raw Message
One other method is to export to an Access database and use Excel to
read the access table (via "data -> import external data -> ..."). The
user won't be able to modify the access table in Excel.

DB
Pardee, Roy
2005-01-19 17:24:30 UTC
Permalink
Raw Message
And still another would be to use network share permissions to
discriminate between users who should be able to change the data & those
who should just be able to view it.

-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-***@LISTSERV.UGA.EDU] On Behalf Of
DB01
Sent: Wednesday, January 19, 2005 6:46 AM
To: SAS-***@LISTSERV.UGA.EDU
Subject: Re: How to protect excel worksheet using SAS


One other method is to export to an Access database and use Excel to
read the access table (via "data -> import external data -> ..."). The
user won't be able to modify the access table in Excel.

DB
Jack Hamilton
2005-01-19 17:56:24 UTC
Permalink
Raw Message
You won't be able to obtain data privacy with a protected worksheet.
Google "excel password" to see how easy it is to break Excel password
protection.

<http://www.lostpassword.com/excel.htm> says 'Excel Key does not work
with documents created with restricted permission using the "Information
Rights Service for Microsoft Office".' Sounds like you'll have to go to
Excel 2003 to get what you want.



--
***@FirstHealth.com
Manager, Technical Development
Metrics Department, First Health
West Sacramento, California USA

Coelum, non animum mutant, qui trans mare currunt.
SAS guru out there,

I'm suppose to export data from SAS dataset(SAS8.2) to Excel
(Excel2000).
Due to data privacy, the excel worksheet must be protected to avoid
data
manipulation (protect worksheet function in Excel). How can I use SAS
program to acheive this?

Thanks in advance.

T.K.


"MMS <firsthealth.com>" made the following annotations.
------------------------------------------------------------------------------
This message, including any attachments, is intended solely for the use
of the named recipient(s) and may contain confidential and/or
privileged information. Any unauthorized review, use, disclosure or
distribution of this communication(s) is expressly prohibited.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy any and all copies of the original message.
Thank you.
==============================================================================
Greg
2005-01-19 18:28:22 UTC
Permalink
Raw Message
excels poor protection notwithstanding, here is a way to do it:

filename cmds1 dde 'Excel|system';
options noxsync;

data _null_;
file cmds1;
set data;
put '[select("sheet1!c1:c20")]'; /* select first 20 columns */
put '[CELL.PROTECTION(true, false)]'; /* lock cells */
put '[protect.document(true,true,"testpwd",true,true)]'; /* password
protect document with password of testpwd */
RUN;
Post by T.K. Chia
SAS guru out there,
I'm suppose to export data from SAS dataset(SAS8.2) to Excel
(Excel2000).
Post by T.K. Chia
Due to data privacy, the excel worksheet must be protected to avoid data
manipulation (protect worksheet function in Excel). How can I use SAS
program to acheive this?
Thanks in advance.
T.K.
David L. Cassell
2005-01-19 19:48:02 UTC
Permalink
Raw Message
[assorted DDE stuff elided]
Hey! Wild Bill is back! Long time no see.

You going to start top-posting to really long messages again,
to get your line-count back up? :-) :-) :-)

David
--
David Cassell, CSC
***@epa.gov
Senior computing specialist
mathematical statistician
William W. Viergever
2005-01-19 20:40:51 UTC
Permalink
Raw Message
Post by David L. Cassell
[assorted DDE stuff elided]
Hey! Wild Bill is back! Long time no see.
You going to start top-posting to really long messages again,
to get your line-count back up? :-) :-) :-)
David
--
David Cassell, CSC
Senior computing specialist
mathematical statistician
mebbe

btw - always wondered, isn't Senior computing specialist and mathematical
statistician an oxymoron?

<vbseg>

sage reagrds,






---------------------------------------------------
William W. Viergever
Viergever & Associates
Health Data Analysis / Systems Design & Development
Sacramento, CA 95825
www.viergever.net
***@viergever.net
V: (916) 483-8398
F: (916) 486-1488
---------------------------------------------------
T.K. Chia
2005-01-26 10:50:37 UTC
Permalink
Raw Message
All, thank you very much for the info.. the infor are very helpful.. thanks
again..

T.K.
Loading...