Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: RE: How do I import a macro-enabled Excel worksheet into Stata 12?
From
William Buchanan <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: RE: How do I import a macro-enabled Excel worksheet into Stata 12?
Date
Fri, 28 Jun 2013 14:37:29 -0700
A colleague of mine mistakenly saved a data entry template as a macro enabled file (the file contained no macros however) on a few occasions. In each case I had to alter the file name in order to read it into Stata (running on both Windows and OSX). If the macros don't affect the data you need from the file I would suggest trying to change the file name and test things that way. I never had an issue with that, but it may have been due to the files not containing macros in the first place.
Sent from my iPhone
On Jun 28, 2013, at 14:19, "Radwin, David" <[email protected]> wrote:
> John,
>
> The manual specifically mentions only .XLS and .XLSX files:
>
> import excel loads an Excel file, also known as a workbook, into
> Stata. import
> excel filename, describe lists available sheets and ranges of an
> Excel file.
> export excel saves data in memory to an Excel file. Excel 1997/2003
> (.xls) files
> and Excel 2007/2010 (.xlsx) files can be imported, exported, and
> described using
> import excel, export excel, and import excel, describe.
>
> So it appears Stata does not support importing .XLSM files. I tried it
> in Stata 12.1 for Windows just to see and it didn't work for me, either.
>
> David
> --
> David Radwin
> Senior Research Associate
> Education Studies Division
> RTI International
> 2150 Shattuck Ave., Suite 800
> Berkeley, CA 94704
> Phone: 510-665-8274
>
> www.rti.org
>
>
>> -----Original Message-----
>> From: [email protected] [mailto:owner-
>> [email protected]] On Behalf Of John Bensin
>> Sent: Friday, June 28, 2013 1:25 PM
>> To: [email protected]
>> Subject: st: How do I import a macro-enabled Excel worksheet into
> Stata
>> 12?
>>
>> I have an Excel 2010 worksheet that's saved as a macro-enabled
>> worksheet (.xlsm). When I attempt to import it into Stata 12 with this
>> command:
>>
>> import excel "finances.xlsm", sheet("Budget") firstrow clear
>>
>> it returns an r(603) error of "file finances.xlsm could not be
>> loaded". The documentation describes the error with:
>>
>> "This file, although found, failed to open properly. This
>> error is unlikely to occur. You will have to review your
>> operating system's manual to determine why it occurred."
>>
>> Does Stata 12 not support .xlsm files, or is there another problem at
>> work here? I use a fully updated Stata 12 on Windows 7 64-bit, with
>> Excel 2010.
>>
>> John
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/