Announcement

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

  • Append all excel files

    Dear all,

    I have a series of excel files with the same structure that I would love to append. This is how they look like:

    Click image for larger version

Name:	Prova.jpg
Views:	1
Size:	167.1 KB
ID:	1660820


    There are two things that I'm trying to do:
    1.The files are denominanted by and identifier and I would love to append all the files and adding a column (id) with the name of the file.
    2. The files name have identifier + "_1" "_2" "_3". I only need to append all those files that have _1

    Thank you in advance for your assistance.

  • #2
    I am not sure how far you will get with appending files with this setup. Anyway, look at xls2dta (from SSC). I have not used it in a while but it should be something along the lines

    Code:
    cd working_directory
    xls2dta , clear generate(id) : append using "*_1.xlsx"

    Comment

    Working...
    X