Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Import excel issues stata12


From   kcrow@stata.com (Kevin Crow, StataCorp LP)
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Import excel issues stata12
Date   Thu, 07 Jun 2012 07:09:15 -0500

Katherine Sawyer <ks2560@caa.columbia.edu> inquired about
using -import excel- to import online files:

>Hello, has anyone been able to import an online excel file directly
>into stata 12 without saving first?  I need to write a loop to pull
>multiple datasets from online, so I am trying to bypass manually
>opening and saving them first.  When I try the following code:
>
>import excel http://www.pcr.uu.se/digitalAssets/64/64466_UCDP_DyadicDataset_v12
>011.xls, sheet("UCDP DyadicDataset") firstrow clear
>
>I get this error:  file
>http://www.pcr.uu.se/digitalAssets/64/64466_UCDP_DyadicDataset_v12011.xls
>could not be loaded
>r(603);
...

-import excel- can not open online Excel files.  We'll make this functionality
available in a future update.  Katherine can use the -copy- command to copy the
file to her local computer and then use the -import excel- command to read in
her data.  Note that there is no performance penalty to first using -copy- to
bring down a file from a URL and then using -import excel- to import it.  When
we add this feature to -import excel- we will use the -copy- command to bring
down the file to a temporary file which would then be imported.


-Kevin Crow
 kcrow@stata.com
*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index