This plugin allows you to import data from a spreadsheet (.csv file format) and display it in a sortable table using a simple shortcode.
Necessity is the mother of invention. In addition to building websites, I run a weekly game night at a local pub near Boston. One of the biggest draws is the popular music game 'RockBand', and I have ~1,200 songs for folks to choose from. I have a spreadsheet with all of my songs sorted by artist, but people have been asking me to put it online so they can request new songs from home. The solution was this plugin!
CSV to SortTable is great for anyone who keeps track of important information using a spreadsheet. It could be used for product catalogs, inventory lists, or even leaderboards in a competition.
How To Use
Add the contents of a .csv file by placing this shortcode into your post or page.
[csv2table source="http://mydomain.com/mydatafile.csv"]
Additional Shortcode Parameters
Use a comma-separated list of column numbers to indicate which columns should be treated as unsortable.
[csv2table source="http://mydomain.com/mydatafile.csv" unsortable="1,6,7"]
Use a comma-separated list of column numbers to indicate which columns should be treated as numbers or dates for sorting purposes.
[csv2table source="http://mydomain.com/mydatafile.csv" number="2,3,4" date="5,6"]
As of version 2.0 if you specify a group column, the plugin will automatically assign a common CSS class to all adjacent rows that contain the same data in the specified column.
[csv2table source="http://mydomain.com/mydatafile.csv" group="1"]
You can only assign one group column and your .csv file should already be sorted by that column in advance.
[csv2table source="http://mydomain.com/mydatafile.csv" icons="true"]
NEW (since v3.1): You can automatically replace certain file urls with special file-type icons.
About This Plugin
For more information about this plugin, visit: http://mynewsitepreview.com/csv2sorttable/
To see a live demo, visit: http://mynewsitepreview.com/csv2sorttable-wordpress-plugin-live-demo/
Credit
The sortable table portion of this plugin is made possible by Stuart Langridge's awesome Javascript library.
Documentation for sorttable.js can be found at: http://www.kryogenix.org/code/browser/sorttable/