In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article introduces the knowledge of "how to remove duplicate lines in a file by EXCEL". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
In the EXCEL data file, if several rows with equal values are called duplicate rows, how do you delete the redundant duplicate rows and leave only one row?
If there is little data, only a few dozen rows of data, then manual deletion is also possible. If the amount of data is very large, manual processing will be very troublesome, and it will often get stuck with the VBA that comes with Excel.
Write your own program to achieve it? It is also feasible, but first you have to read the contents of the EXCEL file into a dataset object, then compare whether it is a duplicate row line by line with a double loop, delete the duplicate row and then output it to a new EXCEL file, which is a lot of work to write code. And because the format of the EXCEL file is different and the fields to be compared are different, the program written is not universal, so you need to rewrite the program next time.
If you use the aggregator SPL to remove duplicate lines, it's easy, with only three lines of code.
For example, the following EXCEL file:
If you press Col1, Col2, Col3 to remove duplicate lines, write the SPL script as follows:
A1=file ("test.xlsx") .xlsimport@t () 2=A1.group@1 (Col1,Col2,Col3) 3=file ("test1.xlsx") .xlsexport @ t (A2)
SPL can also easily handle the following EXCEL requirements:
1. Read EXCEL files in free format, crosstab, master and child tables, etc.
2. Export and append the data to the EXCEL file, and output the EXCEL file in a preset exquisite format.
3. Read and write EXCEL files with a large amount of data
4. Merge and split EXCEL files
This is the end of the content of "how to remove duplicate lines in a file by EXCEL". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.