Data file formats
smallCharts can read data from CSV or Excel files which follow these rules:
- Each row defines one data point
- Empty rows are ignored
- Fields are separated by semicolon (;), tab or comma (,)
- The first column(s) must have a time (date or timestamp)
- The remaining columns have numbers
- Rows at the beginning without a time are headers
- Rows at the end without a time are ignored
- Rows with a time but no numbers are ignored
- A row with the same time as the previous overwrites the previous
Possible forms of a time
Format | Input | Result | ||
date with 3 numbers for day, month and year | 12.8.2012 | 12.8.2012 00:00 | ||
A starting 0 is allowed | 12.08.2012 | 12.8.2012 00:00 | ||
The separator can be anything | 12/08/2012 | 12.8.2012 00:00 | ||
or | 12-08-2012 | 12.8.2012 00:00 | ||
The number must be in the order DD.MM.YYYY | 31.12.2012 | 31.12.2012 00:00 | ||
The american order MM.DD.YYYY cannot be used | 12.31.2012 | – | ||
The year may have 2 digits | 12.8.12 | 12.8.2012 00:00 | ||
A 2-digit year is in the last century, if more than [today + 10] | 12.8.23 | 12.8.1923 00:00 | ||
date with month name | 12-Aug-2012 | 12.8.2012 00:00 | ||
timestamp (date + time) | 12-Aug-2012 18:37 | 12.8.2012 18:37 | ||
year | 2012 | 31.12.2012 00:00 | ||
2-digit year | 12 | 31.12.2012 00:00 | ||
year and a month in the first 2 columns | 2012;8 | 31.8.2012 00:00 | ||
quarter | 2012Q3 | 30.9.2012 00:00 |
Dates without a specific day are used as the last day of the period (month, quarter or year).
Quoting
Fields can be quoted with “ when they contain the seperator a quote or a newline.
'2012,8,“2,5”' is read as |31.8.2012|2,5|
Examples
The basic format of a smallCharts data file
... as CSV