Reputation: 127
I have a csv file and I need to delete all even lines (example: line 2, line 4, line 6, etc.). There are over 7000. Is it possible to do this with a single command or function in LibreOffice Calc?
Upvotes: 4
Views: 3526
Reputation: 59485
Excellent A (as usual) from @JimK but might not adapt too well if the rows to be deleted contain data in many columns. So though not a single command or function (more a process that should at least achieve the result, if not in the preferred way):
Fill as much of a (spare) column as required with:
=ISODD(ROW())
then filter to select FALSE
s and delete these rows. The helper column may then also be deleted.
Upvotes: 1
Reputation: 13819
For example, if the data is in column A, then enter this formula in B1 and fill down.
=INDIRECT(ADDRESS(ROW()*2-1;1))
Upvotes: 4