Import CSV File to HTML Table

Posted on 2014-08-27
Last Modified: 2014-09-02

 Our warehouse team would like displayed on a big telly mounted on the wall the packing stats for each individual packer.

 We can export as a CSV or tab delimited text file the packer's username, full name and number of parcels despatched from our ERP system every minute so that the file has up-to-date data in it.  What I need to do is figure out a way of presenting this data on the big screen ideally in a nicely formatted table.

 Does anyone know of a simple way of doing this (I have no experience of writing any sort of code)?  Or a third party software solution than can do such a thing?

I have attached an example output file from our system.

Many thanks
Question by:admincbf
    LVL 32

    Expert Comment

    by:Big Monty
    Your best bet is to use some kind of server side language to do this, although there are straight JavaScript solutions out there, which, IMO, are not as straightforward to follow. There are a lot of examples on the net for php, .net,, classic asp, etc. Once you decide on a technology, I can better help you.
    LVL 3

    Expert Comment

    Is your ERP database accessible via ODBC?  If it is, the best way may be to interface directly into the tables using SQL to extract the data directly to a JSP page and just refresh the page automatically every minute or so.  Much more efficient than parsing and displaying CSV data all the time.
    What software/database hosts the ERP system?  Is it Oracle, MS SQL Server or something similar?
    LVL 42

    Accepted Solution

    Given this is internal, export the csv to an web accessible folder so that your html page can access it.

    Then just use the <meta> tag with the refresh attribute to reload the page every N second.

    The demo below using jQuery and a plugin called Papa Parse for parsing csv files (

    I modified your pick.csv to comma separated as it was space separated.

    <!DOCTYPE html>
    	<script src=""></script>
    	<script src=""></script>
    	<script src="main.js"></script>
    	<link rel="stylesheet" href="main.css">
      <meta charset="utf-8">
    <meta http-equiv="refresh" content="120"><!-- REFRESH EVERY 2 minutes -->
      <title>JS Bin</title>
    	<table id="results">

    Open in new window

    $(function() {
    	Papa.parse("pick.csv", {
    		download: true,
    		complete: function(results) {
    			console.log("Remote file parsed!",;
    			$.each(, function(i, el) {
    				var row = $("<tr/>");
    				$.each(el, function(j, cell) {
    					if (cell !== "")
    				$("#results tbody").append(row);

    Open in new window

    #results {
    	width: 100%;
    	border-collapse: collapse;
    table, th, td {
    	border: 1px solid black;

    Open in new window

    LVL 52

    Expert Comment

    by:Scott Fell, EE MVE
    You might want to look into any hooks the ERP system may have.  Sometimes there area API's and you can use javascript to hit that ERP and send some data to your screen.   Otherwise, Rob's solution is the way to go and will probably be the easiest in the end.
    LVL 1

    Author Closing Comment

    Thanks very much for the thorough solution

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit ( and similar technologies have enjoyed wide adoption, making it possib…
    Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
    In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
    The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now