concatenate .XLS files

1

I have many xls in a folder, and I want to concatenate them all vertically, that is, put them together in the same xls, but I can only concatenate two, I do not understand why. I'm using this command:

cat Rot * .xls > consol_Rot.xls

So I should take all the files that start with Rot and with extension xls, and concatenate them in a file called consol_Rot.xls, but only do so with the first two.

Can someone help me? Do you know how I can do it? They are more than two hundred. I would also need to pass them to plain text, but this I think with command line I'm not sure it can be done.

Thanks !!!!

    
asked by Juan M 08.04.2017 в 07:25
source

1 answer

1

You are using > , which overwrites old content; that is, every 2 file, removes old content from consol_Rot.xls .

Test

cat Rot*.xls >> consol_Rot.xls

Notice that I use >> ( add ).

Keep in mind that >> always adds to the previous content ; if you use the same command more than once , the result will be a file with duplicate contents. If you have done it several times (due to an error or something), delete the result file ( consol_Rot.xls ) first.

    
answered by 08.04.2017 в 09:06