Skip to main content

Notifications

Community site session details

Community site session details

Session Id : hXDPyrEzVieU6plCeDTMBE
Power Automate - General Discussion
Unanswered

Delete the first 2 rows of a .csv file

Like (0) ShareShare
ReportReport
Posted on 8 May 2024 08:37:53 by 170

Hello, i have in sharepoint a .csv file which have two empty Rows in first, i want to delete this Rows with Power Automate, how can i do that?

 

Thank you

  • ThomasH Profile Picture
    170 on 29 May 2024 at 12:55:01
    Re: Delete the first 2 rows of a .csv file

    @AlexEncodian  Ok, thank you, i think this is what i search for

  • ThomasH Profile Picture
    170 on 29 May 2024 at 11:59:08
    Re: Delete the first 2 rows of a .csv file

    @AlexEncodian  The .csv that I now get is comma (,) separated and the question is whether tab separator also works.

    It look like this

    Kalender-·Tag ID,Text HAHGI_O_MA_NR,(VA)·Text HGBF_MA_NR,(VA)·Text KURZDESC,Metriken,Anz. Text,Anz. Text VJ,Anz. Daten,Anz. Daten VJ
    20240527,44 44 4545,44 44 4545,Text Text Text  Text,,"2,656 ",0 ,"2,702 ",

     

     

  • ThomasH Profile Picture
    170 on 29 May 2024 at 11:15:29
    Re: Delete the first 2 rows of a .csv file

    Hallo @AlexEncodian Thanks for your help, this works almost perfectly for me, but can I specifically specify that the .xlsx to .csv conversion is tabstop separate?
    Thank you

    ThomasH_0-1716981322411.png

     

  • AlexEncodian Profile Picture
    4,409 Super User 2025 Season 1 on 24 May 2024 at 09:45:47
    Re: Delete the first 2 rows of a .csv file

    @ThomasH 

     

    In the Convert excel action, looks like you are using a file path. You need to use the filename with the extension only.

  • ThomasH Profile Picture
    170 on 24 May 2024 at 05:54:23
    Re: Delete the first 2 rows of a .csv file

    @AlexEncodian  Hi, you mean this so?

    ThomasH_1-1716530046622.png

     

  • DryMouse555 Profile Picture
    31 on 23 May 2024 at 23:15:38
    Re: Delete the first 2 rows of a .csv file

    Hi, that solution worked for me. But, in my case, I am getting one empty row at the end of csv file. The row count can be increased in the future and everytime, when I export the csv from the sources, I get this empty line. So, I can't mention the row numbers as they may change in the future.

    Is there a way to remove empty row at the bottom by default?

  • ThomasH Profile Picture
    170 on 23 May 2024 at 15:23:09
    Re: Delete the first 2 rows of a .csv file

    @AlexEncodian  

    Hello, sorry for the confusion. I tried a lot to solve the problem, including using the source file as .txt or .xlsx. If I have an .xlsx as the source file where I want to delete the first two lines, it now works if I solve it like in the screenshot.

    ThomasH_0-1716475908355.png

     

    However, it is then an .xlsx file and I need it as a .csv, which I then tried to achieve with the Encodian Excel Converter by attaching it to the flow as shown in the picture, but it works Flow then runs infinitely and doesn't stop with an error.

     

    ThomasH_1-1716477014823.png

    ThomasH_2-1716477254331.png

    The current request is the .xlsx which I am now attaching here to clean up the top two lines and convert them to .csv, but somehow I can't get it solved. Thanks for the help

     

     The Excel in the appendix is ​​shortened; the original has around 160,000 lines

  • ThomasH Profile Picture
    170 on 21 May 2024 at 05:57:20
    Re: Delete the first 2 rows of a .csv file

    @AlexEncodian Hi, my Problem is, i wan't to have the Data in Columns, when i use a .txt as export and convert this with encodian to a .csv in the last Columns i put me la lot of commas.

     

    ThomasH_0-1716270938147.png

     

    Whe i import a .csv an delete the first t rows and save it as. csv, then i have no Columns, the content is only in the firts column.

     

    ThomasH_1-1716271034119.png

     

  • AlexEncodian Profile Picture
    4,409 Super User 2025 Season 1 on 14 May 2024 at 12:59:06
    Re: Delete the first 2 rows of a .csv file

    @ThomasH 

     

    Which action is failing and what is the error message

  • ThomasH Profile Picture
    170 on 13 May 2024 at 07:47:56
    Re: Delete the first 2 rows of a .csv file

    Hi @AlexEncodian , how i have to "create File" after "Delete Rows"?

    ThomasH_0-1715586219526.png

     

    I tried this way

     

    ThomasH_1-1715586377468.png

     

    ThomasH_2-1715586396583.png

     

    ThomasH_3-1715586454426.png

    So it dosn't work.

     

    Thank you

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - General Discussion

#1
rpersad Profile Picture

rpersad 16

#2
David_MA Profile Picture

David_MA 10 Super User 2025 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 8 Super User 2025 Season 1

Overall leaderboard