Multiple spreadsheet into a single spreadseet
Discussion
cat with a hat said:
How many rows are we talking? And any reason you don't want to use a database?
I would love to use a proper database, but this is 400 spreadsheet I've inherited, and I need to identify some particular data. The spreadsheets are essentially forms (header section with a table below)If I can get them into one big sheet as I can order the rows to highlight the data. Then return it to its original order which will maintain the form
Merging (not consolidatiing) two spreadsheets seems to be what you want to do. A quick Google turns up this add-on but it might cost you £21.95 to try it:
https://www.ablebits.com/office-addins-blog/2015/0...
https://www.ablebits.com/consolidate-worksheets-ex...
There's a 30-day money back guarantee though.
https://www.ablebits.com/office-addins-blog/2015/0...
https://www.ablebits.com/consolidate-worksheets-ex...
There's a 30-day money back guarantee though.
WinstonWolf said:
Quick and dirty, this might do the trick from the command line...
copy sheet1.xls + sheet2.xls newsheet.xls
I doubt that would work because you'd need to strip the headers from the respective files.copy sheet1.xls + sheet2.xls newsheet.xls
BTW, it also needs to be 'copy /B' (for a binary file).
Solutions 4 & 5 posted here look like a possibility?
TonyRPH said:
WinstonWolf said:
Quick and dirty, this might do the trick from the command line...
copy sheet1.xls + sheet2.xls newsheet.xls
I doubt that would work because you'd need to strip the headers from the respective files.copy sheet1.xls + sheet2.xls newsheet.xls
BTW, it also needs to be 'copy /B' (for a binary file).
Solutions 4 & 5 posted here look like a possibility?
Have a look at powershell.
You would need to something like
$sheets = Get-childitem c:\path\tofile\csv
Foreach $sheet in $sheets {
Import-csv $sheet | export-csv -notypeinformation -append -path c:\newfile.csv
}
obviously they'd need to be csv files.
and there will be some errors in the above, check it first please.
You would need to something like
$sheets = Get-childitem c:\path\tofile\csv
Foreach $sheet in $sheets {
Import-csv $sheet | export-csv -notypeinformation -append -path c:\newfile.csv
}
obviously they'd need to be csv files.
and there will be some errors in the above, check it first please.
You want to use VBA for this, it's fairly easy to use a Do Loop to work through every file in a selected folder and copy a range to the bottom of a new table. I have some code at work that does exactly this, but for tables that contain varying numbers of records, so uses a map, some variables and a series of nested loops to copy the records. I couldn't find any code to terminate the idiot that setup the original spreadsheets so badly.
If I remember I'll find the code tomorrow, but I pulled it together with Google, and so it can't be difficult.....
If I remember I'll find the code tomorrow, but I pulled it together with Google, and so it can't be difficult.....
Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff


