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: Cannot open dta file in Stata 12


From   G P <[email protected]>
To   [email protected]
Subject   Re: st: Cannot open dta file in Stata 12
Date   Tue, 3 Sep 2013 11:09:35 -0600

Hi Ruchira, maybe you can try by command like this:

import excel "yourpath\yourfile.xls", sheet("sheetname") firstrow clear
or
import excel "yourpath\yourfile.xls", sheet("sheetname") cellrange(A3:S11)
firstrow clear


firstrow mean variable names, cellrange is where you want to import data
and doesn't matter if your excel is xls or xlsx.

Regards,

Jilmer

2013/9/3 RUCHIRA RAY <[email protected]>:
> Hi,
>
> I am currently trying to open a .dta file, which was created by exporting the data from excel, using a stata software. The .dta file was created on my supervisor's computer and opened fine in Stata on his computer but I have not been able to open it on
> other computers. I keep getting a error r(610) that the file is not in stata format.
>
> Furthermore, I've tried importing directly from excel but I am unable to check the button for using the first row as variable names.
>
> Could anyone please advise me on why the original data file is not recognised as a stata file and how I could overcome the problem? Also, how could I overcome the second issue of being able to read the first row of the excel file into stata as variable
>  names?
>
> Many thanks,
>
> Ruchira.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *
> *   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/


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