Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • r(603) file tabstatout.csv could not be opened

    Issue:
    Hi there I am having some trouble with "tabstatout". I am trying to export the results into an excel sheet I have created called: tabstatout.csv. However I keep recieving an error message:
    file tabstatout.csv could not be opened
    r(603)
    The code I am running:
    tabstatout all_c1997 all_c1998 all_c1999 all_c2000 all_c2001 all_c2002 all_c2003 all_c2004 all_c2005 all_c2006 all_c2007 all_c2008 all_c2009 all_c2010 all_c2011 if miss_total==0, by(sector) stat(mean sum) tf(tabstatout) c(s) f(%9.1fc)
    Options tried, but haven't worked:
    I have tried letting Stata create the file by including " " in the tf(), this is not helping either. E.g:
    tabstatout all_c1997 all_c1998 all_c1999 all_c2000 all_c2001 all_c2002 all_c2003 all_c2004 all_c2005 all_c2006 all_c2007 all_c2008 all_c2009 all_c2010 all_c2011 if miss_total==0, by(sector) stat(mean sum) tf("tabstatout") c(s) f(%9.1fc)
    I have seen previous queries on Statalist, all of these have been in relation to command outreg2, so are not entirely applicable.

    More info:
    • My current directory is on my C drive.
    • I am using Stata/SE 12.0 and am using a Dell operating Windows 10.
    Any help would be welcomed.

  • #2
    I'm not familiar with tabstatout, so I can't give you any advice specific to this command. But the message you are getting is fairly generic to file-handling commands and it means just what it says, the file can't be opened. The common causes of this are:

    1. You don't have write permission for the file. In Windows 7, you can right-click on the file and select Properties to see what your permissions are. If you have administrator privileges on the machine you are using you can just uncheck the Read Only box if this is what's causing your problem. I imagine it works similarly in Windows 10, though I don't know.

    2. You don't have write permission for the directory the file is located in.

    3. Another application has the file open. You have to close the file in that application (or have whoever is sharing the file and running the application do so.)


    Comment

    Working...
    X