An uncertain number of sets to find intersection, union, and difference

Example

There are multiple Excel files Book1.xlsx, Book2.xlsx, Book3.xlsx,…, the naming rule of these files is Book[N].xlsx, N is a number starting from 1, the data in the file is as follows:

Book1.xlsx

Book2.xlsx

Book3.xlsx

Book4.xlsx

Find the intersection, union, and difference of all the data in Book[N].xlsx.

Write SPL script:

A1 List all Book[N].xlsx file names in order of file name

A2 Read the data in each Excel file in turn, and multiple copies of data form a set

A3 Multiple pieces of data, according to the team column to find the union, the results are as follows:

A4 Multiple pieces of data, calculate the intersection according to the team column, the result is empty.

A5 Multiple copies of data, calculate the difference set according to the team column, the results are as follows:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store