Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: password protection and -import excel-

To   "" <>
Subject   RE: st: password protection and -import excel-
Date   Fri, 29 Jun 2012 10:45:23 -0500

I don't know anything about a solution within Excel, but if you're using Windows I know there's a way to open and re-save files using Python.

So, of course, the usefulness of this approach depends on your having Windows and Python. It also depends on how familiar you are with certain Python modules or how willing you are to get familiar with them. 

If that's a route you (or someone reading this) want to take, this question on StackOverflow might be useful

and you might also want to read chapter 9 of Python Programming On Win32 (I can't be certain it will be useful; I haven't read it)

Note the last link is to Safari Books Online. You might be able to access the book through a library subscription.


From: [] On Behalf Of David Kantor []
Sent: Thursday, June 28, 2012 8:04 PM
Subject: Re: st: password protection and -import excel-

At 11:08 AM 6/28/2012, Clyde Schechter wrote:
>I have been given some data to analyze in the form of several Excel
>files.  I want to bring them into Stata with -import excel- in a
>loop, but they are password protected (I have the password).  I
>can't find anything in the help file or the manual about an option
>for specifying the password.
>So then I thought I might do it in Stat Transfer (version 11), but I
>can't find any way to get that to open a password protected file either.
>For now, I'm just going through them all manually, re-saving them
>under new names without password protection, and then importing
>them.  But it's tedious.  I'm hoping somebody out there knows a way
>around this.

I've had the same problem; used the same solution -- re-saving them
under new names without password protection.

I'd be curious to know if any other solutions have been found.
I wonder if Excel can run a script -- to open and re-save a set of files. ??


*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index