This article covers how you can read any CSV file in your React app without the need for an npm package installation.
If you would prefer a video ...
For further actions, you may consider blocking this person and/or reporting abuse
hey! could you solve the extra blank item in rows bug? I'm having the same problem
0: {name: 'joey', age: '21', rank: 'senior'}
1: {name: 'amanda', age: '28', rank: 'mid'}
2: {name: 'peter', age: '24', rank: 'junior'}
3: {name: '', age: undefined, rank: undefined
It could be due to a blank row in your csv, but it can be solved by checking the final data for undefined values and removing the row
I found this really helpful - thank you!
You’re welcome
This was very helpful, thank you Nurudeen!
This was super useful, you saved me a lot of coding. Thanks!
I had problems with the breaks and the cvsArray, can you help me
TypeError: csvArray is undefined
Check for csvArray before using it, you can put everything inside an if block
if(csvArray){
// continue
}
What’s the error you’re getting?
This is exactly what I was looking for! thank you so much :)))
Heyy it was a great solution...can we get the same thing without using input type as file. Can you please help me with other ways..