CSV import
Import from CSV on the Import/Export screen reads a SugarPaws export —
or any CSV with at least Type, Date, Time and Value columns — and
adds its glucose and insulin rows to the app. It is built for the round trip:
importing your own backup skips rows already present rather than doubling
them, creates cat profiles named in the file that do not exist yet, and asks
before merging into an existing cat other than the active one. The whole
import is all-or-nothing: rows are parsed and written in one transaction,
so a failure imports nothing.
Importing
Section titled “Importing”Tap Import from CSV, then Select CSV File (.csv or plain text) in
the file picker. The screen lists the columns above the button. While the
file is read a Importing… overlay shows. The result appears in place:
- Import Successful with a green tick, and lines such as ✓ 62 glucose readings, ✓ 60 insulin doses, ↩︎ 12 duplicates skipped, and Everything in this file was already imported. when only duplicates were found.
- Imported with Warnings with an orange triangle if any row was dropped, plus the reason — e.g. 3 rows couldn’t be read and were not imported (2 unreadable dates, 1 out-of-range value). First: data row 14. — and Check those rows in the file and import again if they matter. Row numbers count data rows (comment lines and quoted line breaks are not counted).
- ⚠️ Data merged for: Whiskers when rows went into an existing cat other than the active one.
Charts, History and the entry prefills refresh straight away.
Columns
Section titled “Columns”| Column | Required? | How it is read |
|---|---|---|
Type | Yes | Glucose or Insulin (any case). Anything else: row skipped as unrecognised row type |
Date | Yes | yyyy-MM-dd |
Time | Yes | HH:mm (24-hour). Date and time are read as local wall-clock time |
Value | Yes | A number; a comma decimal separator (6,5) is accepted. A value with both , and . is ambiguous and skipped |
Unit | No | For glucose rows only — see Units below. Ignored on insulin rows |
InsulinType | No | Stored on the dose as its type. If the column is absent and Notes is present, the first word of the note is taken as the type and the rest as the note (the very early export format) |
Notes | No | Free text |
Cat | No | Which cat the row belongs to — see Cats below. Empty or absent means the active cat |
DisplayValue, DisplayUnit | No | Ignored — they are for people, not for import |
Extra columns are ignored; column order does not matter, only the header
names. Header spellings are exact and case-sensitive (Type, not type).
Lines beginning # are skipped, an Excel UTF-8 byte-order mark is tolerated,
and UTF-8, UTF-16 and Windows-1252 files are all read.
Units and ranges
Section titled “Units and ranges”Glucose Unit cell | Treated as |
|---|---|
mmol/L, mmol, mmoll (case- and space-insensitive) | mmol/L — multiplied by 18 and stored as mg/dL |
mg/dL, mgdl, mg | mg/dL |
Anything else, or no Unit column | Read as mg/dL — but only if the value is ≥ 19; smaller values are skipped as row with an unrecognised glucose unit, because 5.5 mmol/L read as 5.5 mg/dL is silent corruption, not a rounding error |
Glucose values must be > 0 and ≤ 2000 mg/dL after conversion, insulin doses > 0 and ≤ 200 units; anything else is skipped as an out-of-range value. Doses need not sit on the app’s 0.5-unit grid.
For each row with a non-empty Cat, the name is matched to an existing
profile case-insensitively. A match is used; no match creates a new
profile with that name and the default 80–180 mg/dL range. Rows without a
Cat go to the active cat.
Before anything is written, a dry run checks whether the file names an existing cat other than the active one. If it does, an alert Cat Profile Conflicts — The following cats in the import file match existing profiles: Whiskers. Their data will be merged with existing profiles. Cancel Import to abort without changing anything. — offers Merge Data or Cancel Import. Cancelling genuinely cancels; nothing has been saved yet.
Duplicates
Section titled “Duplicates”A row is a duplicate — counted, not imported — when the app already holds an entry for the same cat, in the same minute, with the same value (to three decimals) and, for insulin, the same type. Timestamps are compared to the minute because exports carry no seconds. Duplicate rows within the file collapse the same way. This is what lets you re-import a backup, or import an export you already imported last month, without doubling anything.
Skip reasons and errors
Section titled “Skip reasons and errors”Rows dropped from an otherwise successful import are reported by reason: incomplete row(s), unreadable value(s), unreadable date(s), out-of-range value(s), unrecognised row type(s), row(s) with an unrecognised glucose unit.
Whole-file errors appear as an Import Error alert:
| Message | Cause |
|---|---|
| The CSV file is empty or cannot be read | No rows beyond a header |
| The CSV file format is invalid. Expected headers: Type, Date, Time, Value | One of the four required headers is missing |
| None of the rows in this file could be imported. N rows couldn’t be read… (reasons) | Every data row was skipped; the reasons name what to fix |
| Unable to read the CSV file. Please ensure it’s saved as UTF-8 text | The bytes are in none of the supported encodings |