web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / From imported CSV just...
Power Automate
Answered

From imported CSV just keep 4 columns

(0) ShareShare
ReportReport
Posted on by 13

I want to keep only 4 columns from CSV file

rogerlopez21_0-1708209155014.png

 

Categories:
I have the same question (0)
  • Verified answer
    Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @rogerlopez21 

     

    Yes its possible 

     

    see below flow for getting the idea on how to consider the/keep the required columns from csv file 

     

    Assume i have an input csv file like this:

    Nived_Nambiar_0-1708259451725.png

     

    And i need to keep only first 3 columns - A,B,C 

     

    see below flow (Flow can be manually triggered/scheduled flow depending upon your usecase)

     

    Step 1: get file content of csv file 

    Nived_Nambiar_1-1708259558300.png

     

    Step 2: use compose action to use function  base64ToString over content property of output of Get File Content action.

    Nived_Nambiar_2-1708259648499.png

     

    Expression used:  base64ToString(outputs('Get_file_content')?['body']?['$content'])

     

    Step 3: use create csv table to create csv table with only required columns 

    Nived_Nambiar_3-1708259733022.png

     

    expression used:  skip(split(outputs('Compose'),decodeUriComponent('%0A')),1)

     

    The above expression will split the content of csv by new line and then skip the first line as it contains headers.

     

    in the below part, we will assign the required columns like below

    Nived_Nambiar_4-1708259974793.png

     

    Here the expression item() represents the item which is currently iterating through and split() function split it using , as delimiter and after splitting the first indexed element is the A column element.

     

    Simmilary for other header i have written the expression like below:

    Nived_Nambiar_5-1708260128262.png

     

    Nived_Nambiar_6-1708260150191.png

     

     

    Based on above logic you can write according to your requirement.

     

    Now use create file to create a new csv file with updated data from Create CSV Table 

    Nived_Nambiar_7-1708260234332.png

     

     

    Now see the result below after running the flow

    Nived_Nambiar_8-1708260261772.png

     

     

    Hope it helps !

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • rogerlopez21 Profile Picture
    13 on at

    It worked, 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard