Bookmark and Share

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: Reading a variable from a spreadsheet and saving it as a macro


From   Sergiy Radyakin <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Reading a variable from a spreadsheet and saving it as a macro
Date   Tue, 6 Aug 2013 11:42:02 -0400

On Tue, Aug 6, 2013 at 11:17 AM, Miles Grogger <[email protected]> wrote:
> Hi all,
>

> but when I cleared the dataset to make room for the next workbook, the
> macros were cleared too.

This should not be happening as the following script demonstrates, the
locals survive clearing the dataset:

version 12.0
sysuse auto, clear
local a="test"
clear all
assert `"`a'"'=="test"

Perhaps something else is going on?

Also note that in Stata 13 there are new commands to interact with
Excel. If you have Stata 13, this is what you probably need:
http://www.stata.com/manuals13/m-5xl.pdf

With that you should be able to have multiple Excel spreadsheets open
simultaneously and have random access to individual cells.

Best, Sergiy Radyakin
*
*   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/


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