User Tools

Site Tools


wiki:csvtables

===== CSV Plugin Description ===== This is a simple that will display CSV data in table form. The data can either be inline between ''%%<csv>%%'' and ''%%</csv>%%'' or be read from a file in the media area using ''%%<csv namespace:test.csv></csv>%%''. You can also give an HTTP URL to a CSV file instead of an uploaded media file. The ''%%<csv>%%'' tag allows for additional options to be specified as well as a file reference. ^ Option ^ Description ^ | ''file=<filename>'' | where <filename> can be any <namespace:file.csv> or <http url> Default: ''''| | ''hdr_rows=//<n>//'' | Format the first //<n>// rows of data from the CSV as column headers. Default: ''1'' | | ''hdr_cols=//<n>//'' | Format the first //<n>// 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=//<char>//'' | The delimiter used between cells. Specify ''tab'' for a tab separated file. Default: '','' | Other options of the form <key>=<value> are possible but not used for displaying csv data yet. ===== Process ===== 1. Create the page you want to add the table to 2. Upload the .csv file by clicking the icon for the media manager (This icon: {{http://www.dokuwiki.org/lib/images/toolbar/image.png?nolink}}) 3. Include the .csv file in the wiki page as follows (//Using test.csv uploaded via the mediamanager//) <csv {namespace}:{filename.csv}></csv> <csv test.csv></csv> __Example__ <csv test.csv></csv> ===== Admin notice for installations of this plugin ===== 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.local.conf** so you can upload .csv files. Something like this should get you started: csv text/csv Plugin from: http://www.dokuwiki.org/plugin:csv

wiki/csvtables.txt · Last modified: 2010/08/07 00:35 by Bretton Vine