Search Over 30,000 FREE Plugins from the Official WordPress Plugin Directory Repository

CSV to html

Display a (html)table from one or more csv files from server or external files. Multiple csv files- /Visualizer plugin support.

CSV to html makes it easy to fetch content from a csv-file and put content from that file and display the html(table) on a page with a single shortcode.

If you created files to use with the Visualizer Plugin, those are formatted in a specific way and if you have saved the csv-file(s) from excel, the csv looks different. CSV to html handles both these types and it's fairly easy to extend the plugin to use other mechanisms to identify a specific type of format of the csv-file(s).

If using more then one file, content from both files are mixed into one single table - rather then creating two tables. It's possible to fetch information from csv files from webservers upload folder (or a subfolder to the uploadsfolder) or from an external source (domain).

If you like the plugin, please consider donating.

Author Wibergs Web
Contributors wibergsweb
Tags convert, csv, csv into html, csv into table, CSV to HTML, csv to html table, csv-to-table, excel, html, html table generator, import, multiple, table, visualizer
  1. csv-to-html screenshot 1

    Screenshot - using format of visualizer pluginfiles

  2. csv-to-html screenshot 2

    Screenshot - why does not iceland show?

  3. csv-to-html screenshot 3

    Screenshot - iceland.csv file didn't exist, now it does

  4. csv-to-html screenshot 4

    Screenshot - show title in top left corner

  5. csv-to-html screenshot 5

    Screenshot - Some css applied.

  6. csv-to-html screenshot 6

    Screenshot - fetch only three last headers

This section describes how to install the plugin and get it working.

  1. Upload the plugin folder csvtohtml to the `/wp-content/plugins/' directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the 'Plugins' screen in WordPress
  3. Put shortcode on the Wordpress post or page you want to display it on and add css to change layout for those.


  • [csvtohtml_create] - Create the html table from specified csv-file(s)

[csvtohtml_create] attributes

  • title - set title that is shown as text in top left corner of html table (else nothing is shown there)
  • html_id - set id of this table
  • html_class - set class of this table (besides default csvtohtml - class)
  • path - relative path to uploads-folder of the wordpress - installation ( eg. /wp-content/uploads/{path} )
  • source_type - what type to use for identifying content in csv-files (valid types are guess and visualizer_plugin).
  • fetch_lastheaders - Number of specific headers to retrieve (from end)
  • source_files - file(s) to include. If using more than one file - separate them with a semicolon (;). It 's (from v1.0.2) possible to include a full url instead of a filename to fetch external csv files.
  • exclude_cols - What columns to exclude in final html table (1,2,3,10-15 would exclude columns 1,2,3,10,11,12,13,14 and 15)
  • include_cols - What columns to include in final html table (1,2,3,10-15 would display column 1,2,3,10,11,12,13,14 and 15). If include_cols is given, then exclude_cols is ignored.
  • debug_mode - if set to yes then header-values and row-values would be output to screen and files like "file not found" will be displayed (otherwise it would be "silent errors")

Default values

  • [csvtohtml_create title="{none}" html_id="{none}" html_class="{none}" source_type="guess" path="{none}" fetch_lastheaders="0" source_files="{none}" exclude_cols="{none} include_cols="{none}" debug_mode="no"]


  • Now it's possible to specify an extra class for the table. Example: If used together with the tablesorter plugin ( you can add a class called tablesorter and combine these two plugins to create a "tablesorted" html table generated from csv file(s) in realtime.


  • Now it's possible to include or exclude columns in format 1,2,3 or 1-3. It's also possible to combine these two eg. 1,2,3,7-9,13,14,15.


  • Semantic bugfix. When not defining a path an extra slash was included in the path. Now there are no extra slashes.
  • Now it's possible to include a full url to fetch csv-files from external sources. CURL are used to fetch csv files from external sources, but if CURL is not installed, then php's file() function is used but that requires that the server
    has allow url fopen enabled.


  • Plugin released

Why don't you include any css for the plugin?

The goal is to make the plugin work as fast as possible as expected even with the design. By not supplying any css the developer has full control over the design.

Example of usage

shortcodes in post(s)/page(s)

  • [csvtohtml_create source_type="visualizer_plugin" path="lan" source_files="skane.csv;smaland.csv;lappland.csv"]
  • [csvtohtml_create source_type="guess" path="excelfolder" source_files="excel1.csv;excel2.csv"]
  • [csvtohtml_create source_type="guess" path="excelfolder" source_files="excel1;excel2" debug_mode="yes"]
  • [csvtohtml_create source_type="guess" path="excelfolder" source_files="excel1.csv;excel2.csv" debug_mode="yes" fetch_lastheaders="3"]
  • [csvtohtml_create source_type="guess" path="excelfolder" source_files="excel1;excel2;" debug_mode="yes"]
  • [csvtohtml_create source_type="guess" path="excelfolder" source_files="excel1;excel2;" include_cols="5,6,7,12-14" debug_mode="yes"]
  • [csvtohtml_create source_type="guess" path="excelfolder" source_files="excel1;excel2;" exclude_cols="3" debug_mode="yes"]
  • [csvtohtml_create html_class="tablesorter" source_type="guess" path="excelfolder" source_files="excel1;excel2;" exclude_cols="3,7,9,11-13"]

Example css

  • .csvtohtml th.colset-1 {background:#ff0000 !important;}
  • .csvtohtml .even{background:#ddd;}

You can find demos at:

Version 1.0.5

Requires WordPress version: 3.0.1 or higher

Compatible up to: 4.7.2

Last Updated 05 Feb 2017

Date Added: 16 Apr 2016

Plugin Homepage


5 stars
3 ratings


Not Enough Data

Works: 0
Broken: 0