How to Read CSV file and Display its content using JavaScript - Makitweb

PHOTO EMBED

Tue Jun 20 2023 22:32:23 GMT+0000 (Coordinated Universal Time)

Saved by @jaez

<!-- CSS -->
<style type="text/css">
    table th, table td{
    padding: 5px;
}
</style>

<div>

    <div>
         <input type="file" name="file" id="file" accept=".csv" > <br><br>
         <input type="button" id="btnsubmit" value="Submit" onclick="readCSVFile();" >
    </div>

    <br><br>
    <!-- List CSV file data -->
    <table id="tblcsvdata" border="1" style="border-collapse: collapse;">
         <thead>
              <tr>
                  <th>S.no</th>
                  <th>Username</th>
                  <th>Name</th>
                  <th>Email</th>
              </tr>
         </thead>
         <tbody>

         </tbody>

    </table>
</div>
content_copyCOPY

https://makitweb.com/how-to-read-csv-file-and-display-its-content-using-javascript/