ExpressionEngine addons

NB CSV to table

Description

Creates a simple table from a CSV file uploaded from an entry.

Usage

{ exp:nb_csv_to_table file="./files/example.csv" table_border="1" table_class="standard" header_rows="1|30" header_class="resultColumnOne" row_class="resultColumnTwo" show_row_count="no" delimiter="|"}

Parameters

file="./files/example.csv"

CSV file to parse

table_border="1"

Table border, in pixels

table_class="standard"

The class given to the <table> tag.

header_rows="1|30"

Rows whose cells will be given a header <th> tag.

header_class="resultColumnOne"

The class given to the <th> header cells.

row_class="resultColumnTwo"

The class given to regular, <td> cells.

show_row_count="no"

If set to "yes" or "on" or "enable", the first column of the table will display a simple cell showing the row count.

delimiter="|"

Field delimiter. Default is comma (,).

enclosure='"'

Field enclosure character. Default is the double quotation mark (").

Installation

Copy pi.csv_to_table.php to your system/plugins folder

For ExpressionEngine 2:

Copy the csv_to_table folder to your /system/expressionengine/third_party folder

Changelog

0.1 (EE 1.6.x)

  • First release

2.0 (EE 2.x)

  • Converted for ExpressionEngine 2
Creative Commons License