Hello everyone I have use papaparse library for read csv data it's working fine . But I have face a issue how to read multiple files.
Upload CSV files.
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Hello everyone I have use papaparse library for read csv data it's working fine . But I have face a issue how to read multiple files.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amit MohantyRank #112 · 20K reputationPosted Jan 9, 2023, 2:09 AM EST
Check the below code this may help you.
$(document).ready(function() { var files = ['file1.csv', 'file2.csv', 'file3.csv']; var results = []; function readFile(index) { if (index >= files.length) { // All files have been processed console.log(results); return; } $.ajax({ type: 'GET', url: files[index], dataType: 'text', success: function(data) { var csvData = Papa.parse(data).data; results.push(csvData); readFile(index + 1); } }); } readFile(0); });Aravind GovindarajRank #430 · 5.8K reputationPosted Jan 9, 2023, 3:52 AM EST
could you please refer this link
https://medium.com/@kishanvikani/parse-multiple-files-using-papa-parse-and-perform-some-synchronous-task-2db18e531ede
Rajesh GamiRank #30 · 41.5K reputationPosted Jan 9, 2023, 4:22 AM EST
var files = Directory.EnumerateFiles("path", "*.csv"); foreach (string file in files) { using (FileStream fs = new FileStream(file, FileMode.Open, FileAccess.Read)) { // Use the file stream to read data. } }