An action to get rows from a text file (CSV) would be handy.
I appreciate things have moved on a lot since 2018 but here is my relatively simple method (and appreciate it handles basic CSV's) but it's a good starting concept for some.
The select turns the array of lines split by a return into key/value pairs:
If you combine this method with my create a new excel file video it is possible to quickly convert CSV to an Excel Table too. I am also an excel office script fan.
In a bit more detail, I have covered how to accept CSVs from various inputs, SharePoint, OneDrive and Email, as well as dealing with the different encodings. I would appreciate any feedback on this method too and I hope it helps some that are looking to understand and develop new ideas.
I appreciate that everyone is being helpful and providing their ways to "work around" this limitation, but IMO....... it's utterly ridiculous that MS did not include a native action to easily handle CSV data. Before we had JSON, and/or XML, it was the main method for data exchange, AND there are still scads of systems where csv is the only easily available export format.
In PowerShell this takes 2 lines of code. The process in Power-Automate should be just as easy/simple.
Hi all,I believe Microsoft have come up with the solution now, in the form of excel office scripts. https://docs.microsoft.com/en-us/office/dev/scripts/resources/samples/convert-csv This enables you to easily convert a windows encoded csv to excel file. I have a video demo, https://youtu.be/9J6ThPWGaG0, showing you how you can handle different file encodings for the return line and insert a table into the new excel file via the script, so that you can then select rows based on the existing excel actions. Hope this is of use to everyone.
Again @DamoBird365 , Appreciate you being helpful. ( Yes I REALLY DO 🙂 ) I have created a nifty Flow that can be passed a CSV string and return it as JSON, and your solution may function, but again I feel both my solution and yours are way more complex for something that takes just a couple lines of code in most programming languages than they should need to be. CSV is not a complex structure. It's a table, or an associative 2-dimensional array. There should just be an action "Parse-CSV" that will return ANY CSV string as JSON.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.