Join two spreadsheets on a common column in Excel or OpenOffice

后端 未结 3 1189
不思量自难忘°
不思量自难忘° 2020-12-08 10:33

I have two CSV files with a common column and I want to \"Join\" the tables together on the common column.

For example: Join \'A\' with \'B\' equals \'Result\'. If

3条回答
  •  一向
    一向 (楼主)
    2020-12-08 10:51

    If you can use Excel, there is a Query from Excel Files function:

    • Define name for primary table - Table A (Formulas tab -> Define name)
    • Define name for secondary table - Table B
    • Go to Data tab, select "From Other Sources", and from the dropdown, select "From Microsoft Query"
    • Select your CSV file and confirm that you want to merge the columns manually
    • In the following window "Query from Excel Files", drag&drop the Name column of Table A into the Name column of Table B - a link between these columns will be created
    • Go to File menu, click "Return Data to MS Office Excel", an Import Data dialog will pop up
    • Select the sheet into which you would like the matched data to be imported
    • Click OK - you should see matched data with columns from both tables

    Or if you don't mind uploading your CSV files to an online service, you can use for example http://www.gridoc.com/join-tables and join the spreadsheets using drag&drop (Disclaimer: I am author of the tool).

    Hope this helps.

提交回复
热议问题