compile a list from several workbooks, with no duplicates

Asked by Samson Muyanga

I would like to create a master list from 30 spreadsheets, containing only columns A, E and F, without duplicating common entries. The lists are found in worksheet 2 of each workbook to be compared.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu openoffice.org Edit question
Assignee:
No assignee Edit question
Solved by:
Tony Pursell
Solved:
Last query:
Last reply:
Revision history for this message
Best Tony Pursell (ajpursell) said :
#1

Hi Samson

See a previous answer of mine:

https://answers.launchpad.net/ubuntu/+source/openoffice.org/+question/128651

The second part of the answer is relevant to you, i.e a file with duplicates removed.

What you will need is to concatenate the csv files from each spreadsheet with a command like

cat file1.csv file2.csv file3.csv > allfiles.csv

then

sort allfiles.csv | uniq > nodupes.csv

Note my remark that the original order of rows can be lost.

You will,have to collect the data from columns A, E, and F onto a separate worksheet first. Then you will need to open up that worksheet of each file and Save As > Text CSV. Only the current worksheet is saved as CSV.

Hope that helps

Tony

PS If this answers your question, please mark it as Solved

Revision history for this message
Samson Muyanga (samson-sanbi) said :
#2

Hi Tony,

Your script worked perfectly. My problem is solved.
Thanks a million.

Samson