Hello
I'm having problems adding local CSV (from my PC) to my flow in order to parse it
Currently I'm using the OneDrive connection and it's working fine:
But I don't like this option and I was trying to get the same result after uploading a local csv:
But the problem is that after uploading the file I see just a line of symbols in contentBytes and don't understand what is wrong
Can you please tell me what am I missing and if this can be done in the first place?
Thanks
Solved! Go to Solution.
Try changing your splitNewLine action to use this code:
split(base64ToString(outputs('Get_file_content_using_path')?['body']?['$content']), decodeUriComponent('%0D%0A'))
This will decode the content back to a string and then you should get your array of lines.
Blog: tachytelic.net
YouTube: https://www.youtube.com/c/PaulieM/videos
If I answered your question, please accept it as a solution 😘
What is the file extension of your file? Try changing it to .txt. What you are seeing is the base 64 representation of your file where the Content Type has not been automatically determined. You can decode it, but renaming the file should give you the expected result.
thank you for your answer
I'm trying to import the .csv file
changing .csv to .txt gives me the same result
when I'm importing this .csv file from OneDrive, I have no problems with it at all
Try changing your splitNewLine action to use this code:
split(base64ToString(outputs('Get_file_content_using_path')?['body']?['$content']), decodeUriComponent('%0D%0A'))
This will decode the content back to a string and then you should get your array of lines.
Blog: tachytelic.net
YouTube: https://www.youtube.com/c/PaulieM/videos
If I answered your question, please accept it as a solution 😘
thank you
after you've said "You can decode it" in your previous message I did it exactly like this and it's working great