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

Community site session details

Session Id :
Power Automate - Power Automate Desktop
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
Categories:
I have the same question (0)
  • Verified answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    read csv file in dictionary format using power automate desktop
     
    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

Coming soon: forum hierarchy changes

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
Tomac Profile Picture

Tomac 532 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 461 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 256

Last 30 days Overall leaderboard