Skip to main content

Notifications

Community site session details

Community site session details

Session Id : V6AVtFDMx6qiSyjJgr9MAL
Power Automate - Building Flows
Unanswered

Remove first 6 rows in csv file

Like (0) ShareShare
ReportReport
Posted on 14 Mar 2024 12:52:03 by 2

Hi,

 

I get sent a csv file daily in my inbox and I would like to find a way to automate the removal of the first 6 lines of that csv file (see attached). So that the first row is the columns: Day, Ad Exchange etc.

Nuems_1-1710420521500.png

 

Is there a way to do this?

 

p.s. Had to save the attachment as .xlsx due to limitations of attaching .csv files in the forums

 

 

  • Andrew_J Profile Picture
    1,962 Super User 2025 Season 1 on 14 Mar 2024 at 15:54:14
    Re: Remove first 6 rows in csv file

    @Nuems 

     

    I know what you want to do and that is to get the header row you need from row 7 throught to whatever.

     

    You need a column header which is a key value in Excel. In Power Automate you need an Excel table which will have a column header. Without table and columns you can't process the excel sheet in Power Automate.  Therefore rows I do not think you can delete rows one through six.

     

    However look at the below:

     

    http://johnliu.net/blog/2019/5/workarounds-needed-to-use-the-excel-connector-in-microsoft-flow

     

    If I am reading the Extra Tips 2 correctly then it could be possible but I have not tried any of this out. So do not know if it will work. 

     

    If this does not work and the file is in a standard format then could you not look at training AI to delete the frist six lines.

     

    Or what about scripts

     

    https://powerusers.microsoft.com/t5/Building-Flows/How-to-remove-top-few-lines-of-an-excel-file-that-does-not-have/td-p/2252124

     

    Maybe you have seen the above already.

     

    Regards,

     

    Andrew

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

#1
WarrenBelz Profile Picture

WarrenBelz 146,771 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started