csvlibreoffice-calc

delete alternate lines in a csv file libreoffice calc


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?


Solution

  • For example, if the data is in column A, then enter this formula in B1 and fill down.

    =INDIRECT(ADDRESS(ROW()*2-1;1))
    

    odd rows only