Delete cell content in Libre (Open) Office based on the cell value
Posted
by
take2
on Super User
See other posts from Super User
or by take2
Published on 2012-08-28T17:45:39Z
Indexed on
2012/08/29
9:41 UTC
Read the original article
Hit count: 257
I have a huge csv file (tens of thousands of rows) that I need to filter based on different criteria. After trying to find a proper CSV editor, I decided to use LibreOffice Calc. CSVed is great, but it doesn't support neither UTF-8 nor macros for advanced filtering.
So, there are 4 columns, 3 of which contain numbers (with decimal numbers) and 1 of which contains text.
I'm trying to find a way to delete rows with a macro code. I can achieve the desired behavior with filters too, but it's annoying to type all of the filtering values over and over again and there doesn't seem to be a way to export the filter and us it repeatedly.
These rows should be deleted:
The ones that don't contain certain words in textual column (column A). There are a few thousand different words used in that column and I want to keep only the rows that contain one of about 30 words in that column.
Additionally, the number is the other columns should be bigger than 3.8 (column B), 4.5 (column C) and smaller than 20 (column C).
The row-deletion type is "Shift up".
Hopefully I have explained it well. Thanks a lot in advance for your help!
© Super User or respective owner