Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Appending files using stat transfer


From   "Nuno Soares" <[email protected]>
To   <[email protected]>
Subject   RE: st: Appending files using stat transfer
Date   Wed, 27 Dec 2006 12:27:22 -0000

After converting the excel files to dta you can run this code:

clear
cd "c:\folder_with_dta_files"
fs *.dta
local j "0"
foreach f in `r(files)' { 
	if `j' == 0 use `f'
	else append using `f' 
	local ++j
} 
save mydata.dta,replace

Best,

Nuno

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Rajesh Tharyan
Sent: domingo, 24 de Dezembro de 2006 16:34
To: [email protected]
Subject: Re: st: Appending files using stat transfer

Hi all,

Thanks all for you response. I will email the author. I did see it someones
notes on using stst transfer have not been able to track it down since..
regards
merry christmas

rajesh

Rajesh Tharyan wrote:
> Hi,
>
> I have a number (3000) of excel files that i need to convert to dta 
> files and i need to append them together. I can use the command line 
> interface of stat transfer and convert them and then write a do file 
> in stata to append them together. However i was wondering if the same 
> can be done in one go using stat trasfer. i.e to convert the files and 
> append them togther using the stat transfer command line interface. I 
> read it someplace and had book marked the page unfortunately the 
> bookmark has disappeared!
>
> regards
> rajesh
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
>


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index