{% extends "datasources_base.html" %} {% block content %}
{% csrf_token %} {{ form.non_field_errors }}

Edit meta and format data of the CSV table

Name or notes

Not necessary, only for managing purpose

{{ form.subject.errors }} {{ form.title }}

Notes

{{ form.description.errors }} {{ form.description }}

Datasource (CSV file)

Set an URI (Reference) or upload a csv file

Reference

Reference to existing file or external web resource:

{{ form.uri.errors }} {{ form.uri }} For example file:///dirname/filename.csv for local files or http://www.data.domain/data.csv for a web resource
OR

Upload

Upload a csv file

{{ form.file.errors }} {{ form.file }}

Format

Leave empty for default settings (Excel dialect)
Or enable autodetection (which often will not detect the right options)
And / or set and overwrite (some) options manually

Charset

{{ form.sniff_encoding.errors }} {{ form.sniff_encoding }}

Or set other charset manually:

{{ form.codec.errors }} {{ form.codec }}

Leave empty and disable autodetection for modern, universal and international default (UTF-8) or if needet (because autodetection or this default UTF-8 results to corrupted data espacially on special chars) try with older charsets:

For example iso8859-15 for former western european or german standard or cp1252 for western european standard encoded with windows)

CSV dialect

{{ form.sniff_dialect.errors }} {{ form.sniff_dialect }}

Most CSV are standard format and the sniffer often does not autodetect quoted content with multiple lines, so try without autodetection first.

All following settings will overwrite standard settings or automatically detected or guessed values:

Delimiter

{{ form.delimiter.errors }} {{ form.delimiter }}

Leave empty for default , (comma) or set to ; (semikolon) or another char used as delimiter

{{ form.delimiter_is_tab.errors }} {{ form.delimiter_is_tab }}

If this CSV (comma seperated values) is a TSV (tab seperated values)

Quotechar

{{ form.quotechar.errors }} {{ form.quotechar }}

Leave empty for default " or set to another char used as quotechar (i.e. if a field contains a text with more than one line the next line shound not be considered as new row if in quote chars)

{{ form.escapechar.errors }} {{ form.escapechar }}

Leave empty for none or set to another char like \ used as escapeechar)

{{ form.doublequote.errors }} {{ form.doublequote }}

Quote chars inside quotes are masked by doubling the quote char

Column titles and field mapping

If you dont want the columns named "Column 1", "Column 2" ... map custom titles:

Extract titles from row in CSV

{{ form.title_row.errors }} {{ form.title_row }}

Leave 0 if no title row. Or set to the line number where to find titles (1 if titles are in the first line, 2 if titles stored in the second line...)

Header offset

{{ form.start_row.errors }} {{ form.start_row }}

First line of data. Leave empty or set to 1 if no titles (only data and beginning at first line), or set to 2 for data beginning at the second line (if first line titles) or to a higher value, if there is a longer header

Include or exclude parts

Settings to import only parts of the CSV spreadsheet.

Leave empty to import all columns of all lines (default).

Rows (Lines or data sets)

{{ form.rows_include.errors }} {{ form.rows_include }} {{ form.rows.errors }} {{ form.rows }}

List (delimited by comma or new lines) of row / line numbers (content parts)

Columns / Fields (single data fields of each dataset, line or row)

{{ form.cols_include.errors }} {{ form.cols_include }} {{ form.cols.errors }} {{ form.cols }}

List (delimited by comma or new lines) of column numbers (concerning all lines)


Save changes

{% if csvmanager.id %} Cancel {% else %} Cancel {% endif %}
{% endblock content %}