Parse CSV to String Array
See original GitHub issueWe have a use case where we are dynamically generating csv columns and don’t know what columns are available until runtime. Therefore, we can’t define a CSVMapping object in order to instantiate a CSVParser object.
I would like the ability to define and CSVParser without a mapping object and parse a file/string into a String Array. Something like…
String[] sArray = new CsvParser(csvParserOptions).ParseToStringArray(filePath);
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:12
Top Results From Across the Web
How to parse CSV to Array in JavaScript? [SOLVED]
Method-3: Use csv-parse method ... If we want to convert CSV to an array locally, we can use a Node.js package called csv-parse...
Read more >Convert a Python csv string to array
In this article, we are going to find out how to convert a CSV string into an array. The first approach is by...
Read more >JavaScript - Parse CSV data into an array
To convert or parse CSV data into an array , you need to use JavaScript's FileReader class, which contains a method called readAsText()...
Read more >How can I convert a comma-separated string to an array?
The easiest solution (and more secure I bet) was to use PapaParse which has a "no-header" option that transform the CSV file into...
Read more >JavaScript - CSV to array
Converts a comma-separated values (CSV) string to a 2D array. Use Array.prototype.indexOf() to find the first newline character ( \n ).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@alexb5dh @hthroweriii I have released a Version, which now allows to parse to String Arrays and use the existing infrastructure. Many, many thanks to you two for the input! And sorry to @hthroweriii, I didn’t really understand your initial request and closed the issue too early.
You can now use it like this:
Thanks @bytefish, looks great!