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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / read csv file in dicti...
Power Automate
Answered

read csv file in dictionary format using power automate desktop

(1) ShareShare
ReportReport
Posted on by 6
I have a CSV file with 6 columns, but I only need to work with two specific columns: 'Field' and 'Value'. The 'Field' column contains keys (e.g., 'Name'), and the 'Value' column contains corresponding values (e.g., 'ABC'). I want to extract these key-value pairs and store them in a dictionary using Power Automate Desktop. How can I achieve this?"
Uploaded image
I have the same question (0)
  • Verified answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
     
    Try like below
     
    Pass the filepath in CSVFilePath variable
     
    You can try by pasting below code to PAD
    SET CSVFilePath TO $'''%''%'''
    File.ReadFromCSVFile.ReadCSV CSVFile: CSVFilePath Encoding: File.CSVEncoding.UTF8 TrimFields: True FirstLineContainsColumnNames: True ColumnsSeparator: File.CSVColumnsSeparator.SystemDefault CSVTable=> CSVTable
    SET Config TO {{ }}
    LOOP FOREACH row IN CSVTable
        SET Config[row['Name']] TO row['Value']
    END
    
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard