Skip to main content

Importing CSVs

mXrap primarily collects the data it uses from .csv files. These are plain text files which contain Comma-Separated Values which represent data tables.

CSVs are a simple, lightweight, portable and open data format which makes them ideal for moving data between software packages without the complexities of connecting to a database.

Excel compatibility

For most people, opening a CSV will summon Microsoft Excel to do so. This is a sensible default for most purposes, as Excel excels at displaying tabulated data in a human-readable way. Unfortunately for mXrap, Excel has its own way of interpreting and saving Date values. This means that opening and saving a CSV used by mXrap in Excel will break any Date data, which will give you this error:

Problem

When you open the 'Blasts.csv' in MS Excel, it automatically changes the date format and mXrap is no longer able to read the blast information

Excel spreadsheet showing date format automatically changed from yyyy-mm-dd hh:mm.0 to Excel's default date format
Excel spreadsheet showing date format automatically changed from yyyy-mm-dd hh:mm.0 to Excel's default date format

Solution

Prior to saving the new file, format the Date column to match the input required for your root:


yyyy-mm-dd hh:mm:ss.0

This is the typical input format, but you may have to modify slightly in order to match the format for your specific root.

This can be done by selecting the Date column, right clicking, and opening 'Format Cells'. Choose the 'Custom' category, and manually enter the input format for your root

Excel Format Cells dialog showing Custom category with yyyy-mm-dd hh:mm.0 format entered
Excel Format Cells dialog showing Custom category with yyyy-mm-dd hh:mm.0 format entered

To see your changes, save the file and 'Reload Data' in mXrap.

mXrap interface showing the Reload Data button in the top-left corner
mXrap interface showing the Reload Data button in the top-left corner