Filter by Repetitions
Example
Part of the data in Excel file Book1.xlsx is as follows:
June |
April |
March |
August |
December |
September |
February |
September |
December |
December |
… |
The task is to find the months that appear less than 4 times, and the results are as follows:
April |
January |
May |
November |
October |
September |
Write SPL script:
A |
|
1 |
=file("Book1.xlsx").xlsimport() |
2 |
=A1.group(#1).select(~.len()<4).(~(1)) |
3 |
=file("result.xlsx").xlsexport(A2) |
A1 Read the excel file
A2 Group the data, filter out the results with less than 4 in the group and take one value in each group
A3 Export results to result.xlsx
SPL Official Website 👉 https://www.scudata.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProc_Desktop/
SPL Learning Material 👉 https://c.scudata.com
Discord 👉 https://discord.gg/cFTcUNs7
Youtube 👉 https://www.youtube.com/@esProcDesktop
Linkedin Group 👉 https://www.linkedin.com/groups/14419406/