====== CSV Plugin ====== ---- plugin ---- description: Display CSV as table author : Andreas Gohr email : gohr@cosmocode.de type : syntax lastupdate : 2009-11-03 compatible : depends : conflicts : similar : tags : csv, tables, file downloadurl: http://github.com/cosmocode/csv/zipball/master sourcerepo : http://github.com/cosmocode/csv/ bugtracker : http://github.com/cosmocode/csv/issues ---- This plugin was originally written by [[steven-danz@kc.rr.com|Steven Danz]]. The current version fixes security bugs and incorporates several patches by other contributors. ===== Description ===== This is a simple [[plugins|plugin]] that will display CSV data in table form. The data can either be inline between ''%%%%'' and ''%%%%'' or be read from a file in the media area using ''%%%%''. You can also give an HTTP URL to a CSV file instead of an uploaded media file. If you are planning to use csv files in the media area, you will most likely need to include the .csv file extension in [[:mime|mime.local.conf]] so you can upload .csv files. Something like this should get you started: csv text/csv The ''%%%%'' tag allows for additional options to be specified as well as a file reference. ^ Option ^ Description ^ | ''file='' | where can be any or Default: ''''| | ''hdr_rows=////'' | Format the first //// rows of data from the CSV as column headers. Default: ''1'' | | ''hdr_cols=////'' | Format the first //// columns of each row as column headers. Default: ''0'' | | ''span_empty_cols=//[01]//'' | Create colspans for each empty (two adjacent commas) cell following a cell with content. Default: ''0'' | | ''delim=////'' | The delimiter used between cells. Specify ''tab'' for a tab separated file. Default: '','' | Other options of the form = are possible but not used for displaying csv data yet. Cells that include a comma as part of the data are expected to be contained between double quotes, which is the typical behaviour of most systems when exporting .csv files. Empty lines in the csv file or data are displayed as horizontal separators in the table. ===== Download ===== To install this plugin manually or through the [[plugin]] manager use the following URL: * http://github.com/cosmocode/csv/zipball/master ==== Changes ==== {{rss>http://github.com/feeds/cosmocode/commits/csv/master}} ==== Enhancement Considerations ==== * might be nice to be able to have gridlines