11-01-2022 08:16 AM
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-an...
watch?v=fI9S5781P3o
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!
Thank you so much for your answer, I used the function :
replace(SourceString, StringToReplace, ReplacementSting)
And replaced '\r' with '' and now it is working
@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.
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?