Announcement

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

  • (very new to STATA) Issue trying to load data using "use" when data is stored in OneDrive

    Hello,

    I am new to using STATA. I've completed some intro modules including loading example data but struggling now to load my own data into STATA to put the learning in to practice..

    Issue: My data is stored in One Drive (which is where I keep all my work stuff incase of laptop issues). When trying to load my excel file in to STATA, because the location includes spaces as seen below, I keep getting an error (invalid ' - ') but I cannot work out how to get around / fix this issue?

    use C:/Users/Username/OneDrive - Company Name\file_name.file_type

    I know I can just download a local copy as a quick fix but I am wondering if anyone has had this issue and has a better workaround/resolution for accessing future work?

    Thanks in advance for support,

    Aidan

  • #2
    Welcome to Statalist.

    You have to put double quote marks around the entire file name if there are spaces in the name.
    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    StataNow Version: 18.5 MP (2 processor)

    EMAIL: [email protected]
    WWW: https://www3.nd.edu/~rwilliam

    Comment


    • #3
      Have you tried the following?
      Code:
      use "C:/Users/Username/OneDrive - Company Name\file_name.file_type"
      Welcome to Statalist! You'll find it valuable to have a look at the Forum FAQ (access via black bar at top of page), and note the tips about how to post most effectively, and how (and why) it's a good idea to use CODE delimiters, as above.

      Good luck

      Comment


      • #4
        Hi Richard,

        Thank for the quick reply, I now have the data in STATA.

        Much appreciated

        Comment

        Working...
        X