Working with CSV Files

Accelerus Icon
 

Most of the import and export processes in Accelerus are based on a standard comma separated value, or CSV, file format, a common format for transferring data between systems. These files are also referred to as comma delimited files.

Schools need to be familiar with CSV files and the processes for extracting data from the different administration and timetabling programs that they use in order that they may easily populate their Accelerus database each year or academic cycle. Most database packages have the facility to convert data into CSV file format, or at least to be able to export data into other files, eg into .txt files or Microsoft Excel files, from where the data can be manipulated and converted into CSV format.

Fields in CSV files are each separated by a comma, with one record per line. For example, a CSV file containing student records to be imported into Accelerus could appear as shown here if you viewed it in a text editor, such as Notepad or Wordpad. Each line, other than the header row, is one record and the data fields are separated by a comma, in the order that corresponds with the order of fields in the header row.

CSV NotepadFile

The same file opened in Excel would appear as shown here, with each value appearing in a separate column, without commas. Data may be changed and worked on in Excel, but must be saved back into a CSV file when completed.

CSV ExcelFile

In fact, if your school does not have all or any of the data required by Accelerus in other databases, rather than manually enter data in Accelerus, it is often easier to set it up in Excel.

 

minusCSV file requirements

Features and requirements of CSV files that are to be imported into Accelerus to populate the database include:

Each different type of entity being imported has its own format - the fields that may be imported, which are mandatory, etc. The table of CSV file formats is an important reference tool for Accelerus administrators.
Each different type of CSV data file being imported must have a header row that contains the correct column heading for each of the fields being imported.
The order of the columns in the CSV file is not important, as the column heading determines where the data is to be stored in the database.
Each record being imported must have its own row, with the exception of the enrolment and result import files.
Each record must include data for all mandatory fields where this data is not already in the database.

For example, when first importing the teachers into your database, the teacher code, family name and given name fields must appear for each teacher. However, you may thereafter import a file that only contains some of this data as a means of updating existing data in bulk. In this case, only the columns listed will be updated and other fields will not be changed.

The data therein must conform to the field specifications required for each field in each type of entity being imported, eg maximum length, type of data, etc.

 

minusImporting fields with multiple lines

When importing CSV files, some of the Accelerus fields allow multiple lines of text, eg the description fields when importing subjects or classes, the calculation field if importing assessment items, or comment results.

In order to import line feeds and blank lines, you must enter special characters in the field in the CSV file.

 

Characters to insert

When used

Example text required

How it needs to appear in the CSV file

\n

To insert a new paragraph or line, ie an <Enter> or carriage return.

Science covered the study of water acids and electricity.

In Astronomy students studied the planets and galaxies.

Science covered the study of water acids and electricity.\nIn Astronomy students studied the planets and galaxies.

\n\n

To insert a blank line, ie two new paragraphs or lines, ie pressing <Enter> twice.

Science covered the study of water acids and electricity.

 

In Astronomy students studied the planets and galaxies.

Science covered the study of water acids and electricity.\n\nIn Astronomy students studied the planets and galaxies.

 

When data is exported out of Accelerus and it contains line feeds, Accelerus will insert the appropriate \n characters where required.