Import and Export

SpotLog can import and export data in various formats.

Export:

  • XML  (more technical file format, carries more detailed data.  XML format is used for data sync and backup)
  • CSV (general file format, suitable for opening and editing using Excel etc)
  • HTML  (formatted report that can be opened and viewed with a browser)

Import:

Exporting data from SpotLog

  • Select the "Settings" tab and tap the "Export" button. 

Android
If you have not granted the SpotLog app permission to access storage, a permission request will be shown:

You must "Allow SpotLog to access photos and media on you device" if you want to export files.

  • The Export form opens:

Enter a name for your export file, and select the format:

  • XML is designed for exporting and importing data between systems (SpotLog Sync Service and Backup use XML format. XML is not particularly easy to read or edit. XML exports can contain all SpotLog user data, including records, Marked Locos and Custom Book data.  Use XML if you are making a backup of your SpotLog data and want to ensure everything is saved.
  • HTML is the most readable of the export format, and will produce a nicely formatted report that is easy to read.  The HTML format can include records, Marked Locos and Custom Book data. 

  • CSV is useful for exporting to other systems, including MS Excel. It is more readable than the XML but not formatted like the HTML report.  CSV is also a good format for importing data from other systems or manual logs. A CSV export can contain records -or- custom book data, but not both.

If you want to export a subset of records (by date), untick "Export All Data" and select the date range you want to export: this only applies to record exports, not custom book exports.

See Reports for more information on the report types.

  On an Android device you can choose to save the export/report as a file, or share it to other apps on the device

You export the data/report as a file, or can share it another app.

  • Tap "Save to App Folder" to save the report/file in the Apps folder. See App Files for details of how to find the app files on your device.
     
  • Tap "Share Export" to use Android file sharing: Spotlog will generate the file/report and then open Android file sharing:

  • the options you see for file Sharing will depend on the apps installed on your Android device:
    • Gmail (or other email client) will allow you to email the file
    • Drive will allow you to save the file to Google Drive
    • Other apps (eg "File Manager Plus") - if installed - can be used to save the file elsewhere on the device, eg using File Manager Plus, I can save the file to downloads/documents etc:

?]#]

 

Importing Files

  • Select the "Settings" tab and tap the "Import" button. 

Android
If you have not granted the SpotLog app permission to access storage, a permission request will be shown:

You must "Allow SpotLog to access photos and media on you device" if you want to import files.

  • The Import form opens:

  on an Android device, SpotLog file import will open the system dialog to allow you to choose a file to import:

  • Select Android "Files" to import  file from common locations (eg Images or Download).  

other apps,  (eg "File Manager Plus") will only be available if installed on your device.

  • File Manager Plus (if installed) will allow you to import a file from any accessible folder on your device.

  • Select the file to import.
  • Provided the file extension is one of the supported file types (CSV, XML, TSS) SpotLog will import the data.

XML file format

XML file format is a more technical file and contains all the SpotLog database columns for records and some other data.  XML format is used for SpotLog database backup and sync files.

TSS file format

See Upgrading from TrainSpotter

CSV file format

CSV file format should be used for most imports other than SpotLog backups and sync data.

  • File must have column headings in first row of file
  • Order of column headings does not matter (except ID as stated below)
  • Column names may be given in upper of lower case.
  • Columns may be omitted if not required.
  • Columns recognised are as follows:
    • ID: special column used when re-importing a SpotLog export (see below). If used, the ID column must be the first column.
    • Date: date of the record in "yyyy-mm-dd HH:MM:SS" format, eg "2019-07-17 12:32:00"
    • Number: Number recorded
    • Location: Location of the record
    • Note: Note for the record
    • Photo: if the item was photographed.  Values of "1", "Yes" or "True" (all case-insensitive) are accepted for true, all other values interpreted as false.
    • Haul:  if the record is marked for haulage.  Values of "1", "Yes" or "True" (all case-insensitive) are accepted for true, all other values interpreted as false.
    • Hold:  if the record if marked for Hold on notepad.  Values of "1", "Yes" or "True" (all case-insensitive) are accepted for true, all other values interpreted as false.
    • WebID:  id of the loco record in the SpotLog database. Omit if importing new records.  Records on the NotePad will have blank or 0 values, records in the log will have a positive webID value
    • Lat/Long: latitude and longitude if GPS used.
    • ClassCode: the set and class code of the recorded loco
    • LocoNumber: the actual number of the loco or unit (which may be different to the recorded number) eg if you enter "77899" will recognise this as part of unit 320301 and the record will have "77899" in the Number field, and "320301" in the LocoNumber field.

Importing data from a non SpotLog source

To import numbers from a non-SpotLog source:

  • Prepare a CSV file using the editor of your choice
  • Include columns:
    • Date
    • Number
    • Location (optional)
    • Note (optional)
    • Photo/Haul/Hold (optional)
    • Lat/Long (optional)
  • Do not include columns:
    • Id
    • WebID
    • ClassCode
    • LocoNumber
    • Mod

Import the file into SpotLog, SpotLog will put the numbers in the NotePad: tap the "Proc" button to have SpotLog process the numbers and match them with the book entries.

Importing data from a SpotLog source

This is intended for use where you want to export records from SpotLog, edit them in an external editor and then re-import them into SpotLog so that they update the records in SpotLog.

  • Export records from SpotLog - optionally using a date filter to limit the range of records exported.
  • Open the exported CSV file in editor of choice (eg Excel)
  • Important: do not change the ID or WebID fields or the re-import may fail and/or overwrite other records.
  • It is safe to edit the following columns
    • Date
    • Number (although not advisable, see below)
    • Location
    • Note
    • Photo /Haul
    • Lat/long
  • You can remove the following columns before re-importing (optional, will re-import fine either way)
    • ClassCode
    • LocoNumber
    • WebID
    • Mod

Notes

  • When re-importing data, the ID column is used to identify the record to update.  If you change these ID values, you may overwrite the wrong rows when re-importing
  • If you overwrite WebID with 0 value, on re-import the record will be moved back to the NotePad.
  • If you change the number and do not change the webID the record will be updated, but the class counts and "Seen" flag in the book will be incorrect.  If you need to change the number, this is best done by editing the record in SpotLog.  Alternately, if you do change the number in the import, set WebID to 0, this will move the record back to the Notepad and allow SpotLog to re-process it (which will set the correct counts etc)
  • IF you omit mod from the import, the records mod date will be set to the time of the import: this is usually fine.  The mod date is used to select records for syncing.

 

see also Importing Historic paper records


About
About page
Alternate Numbers
App Files
Backup
Book
Book Search
Consist
Custom Book
Custom Set Example
Deduplication
Depot View
Disambiguation
Download Datasets
Edit Record
Entering Numbers
Entry mode
EVN and UIC Numbers
Formation Numbers
Getting Started with V5
Glossary
GPS location
Import and Export
Importing Historic paper records
Loco Records
Log
Marked Locos
Matching
Merge locos
NotePad
Number range
Prefixes
Preservation sites
Quick Tour
Realtime Trains
Rebuilt Locos
Recording
Release Notes
Remote SQL Support
Reports
Restoring SpotLog from a device backup
Sets
Sets and Subsets
Settings
Single Loco view
SpotLog Sync Service
SpotLogV5
Statistics
SubClasses
Sync
Synckey
Themes
Undated Records
Updates
Upgrading from TrainSpotter
Upgrading to V5
V5 FAQs
v5.1.10
v5.1.16
v5.1.18
What's New