Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Fiedler, James (JSC-SK)[UNIVERSITIES SPACE RESEARCH ASSOC-DIV OF SPACE LIFE SCIENCES]" <james.fiedler-1@nasa.gov> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
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 http://stackoverflow.com/questions/3783980/how-to-read-password-protected-excel-in-python 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) http://my.safaribooksonline.com/1565926218 Note the last link is to Safari Books Online. You might be able to access the book through a library subscription. James ________________________________________ From: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu] On Behalf Of David Kantor [kantor.d@att.net] Sent: Thursday, June 28, 2012 8:04 PM To: statalist@hsphsun2.harvard.edu 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. ?? --David * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/