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 / Is there any way to ex...
Power Automate
Unanswered

Is there any way to exclude few columns in CSV files through power automate flow and has to save it in new csv file.

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi guys, Is there any way to exclude few columns in CSV files through power automate flow and has to save it in new csv file. if we can do that means please help me on this task.... I tried using parse JSON actions also in flow but its not working as expected. Please help me on this ASAP.

 

Regards,

Roselin

Categories:
  • WillPage Profile Picture
    2,339 Super User 2026 Season 1 on at

    Converting CSV to JSON to do data transformations on it can be a real pain. If you have a premium license and a SQL server you can sink the entire CSV file as one big string into an nvarchar(MAX) column then use the SQL connector's Transform data using Power Query action to process that with PQ's native CSV processing functions and output the result as JSON.

     

    Alternatively you can process the CSV using PowerShell via an Azure function or Automation runbook by passing the whole string in as a parameter and outputting the result as JSON.

    If you don't have premium licensing, and you also have a penchant for self-punishment you can split the CSV on a new line to get an array of lines, then for each row of the resultant array you can split on the comma to get an array of columns then use the addProperty() function in an apply to each loop to add each value to an object variable (you'd have to rely on the schema of the CSV being constant and the columns always being in the correct order, and turn parallelism off) then add that object to an array variable in the outer loop. It's hideous and prone to failure though (escaped commas in the data etc).

    Once you have a JSON representation of the CSV data you can easily drop the columns with a Select action and finally convert back to CSV with the native CSV table function in the data operations section.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 263

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard