Skip to main content
Community site session details

Community site session details

Session Id :

Get Rows(Parse) from CSV file using Power Automate and bulk generate documents

CFernandes Profile Picture Posted by CFernandes 8,295 Most Valuable Professional

This is my solution to the feature request - "Text (CSV) file - get rows" - which has 500+ upvotes.

 

In my solution, I used the Excel Run Script action(with little Typescript - yes you read it right – we are going to invoke code without a third-party action in Power Automate) to convert CSV to JSON.

 

 

I have backed by solution with a real-life scenario in which I bulk generate documents from the CSV file - have a look at my blog - https://clavinfernandes.wordpress.com/2021/04/26/get-rowsparse-from-csv-file-using-power-automate-and-bulk-generate-documents/ 

 

Categories:

Comments

  • MohammadYusuf Profile Picture MohammadYusuf
    Posted at
    Get Rows(Parse) from CSV file using Power Automate and bulk generate documents

    Thanks for the solution. I am getting an error in the Excel code snippet with error for the variable 'result'. It says, iffice script cannot infer data type of this variable. Appreciate your support please. Thanks!

  • odin1 Profile Picture odin1
    Posted at
    Get Rows(Parse) from CSV file using Power Automate and bulk generate documents

    Thank you so much for your answer, I used the function : 

     

    replace(SourceString, StringToReplace, ReplacementSting)

     

    And replaced '\r' with '' and now it is working  

  • CFernandes Profile Picture CFernandes 8,295 Most Valuable Professional
    Posted at
    Get Rows(Parse) from CSV file using Power Automate and bulk generate documents

    @odin1 You can either try to manage it the Script or use Power Automate functions(expression) to clean your string... For example Replace  “\r” with '' empty string.

  • odin1 Profile Picture odin1
    Posted at
    Get Rows(Parse) from CSV file using Power Automate and bulk generate documents

    Hello,
    Thank you so much for the solution. I’m getting “\r” on the last value of my parsed data. It seems like some component of the script is causing it. Do you know why it’s happening/how to fix it?