Importing Data

The program is equipped with a versatile import mechanism which can import resources, activities or an entire schedule from text files, XML files, databases or even from any web-page on the Internet. The process of importing data consists of two steps. The first is to specify the data-source and its format. The second is to let the program know what type of data is contained in each imported field. To start the import process, open a new or an existing file, and select "File", "Import" from the main menu.

File import8.png


Source Database Types

There are 4 types of sources from which data can be imported: Text File, XML File, MS Access File and a Web-page. You need to select the one you will be importing from in the "File Type" field at the top of the Import window.

Import file type8.png

Text File

A text file is the most common format to which data is exported from many applications. For example, Excel can export a spreadsheet to a comma or tab delimited text file. Such a text file has a very simple format. It is made up of lines of text, each line containing one or more fields of data. The fields are usually separated by a certain symbol, like a tab or a comma.

Student group csv.png

In some cases, however, the fields just have a predefined length, and the "leftovers" are filled up with spaces. Either way, you need to tell the program what the file's structure is so that it will know how to import it properly. The following settings allow you to do so.

Import text file turbo8.png

  • Delimiter – This is the symbol which separates between fields in a single line of text. The default is Tab. There are many other options including space, comma and more. You can also choose the option "Fixed Width", in which case you will be able to define the exact width of each field in symbols.
  • Field Beginning/Ending – In case the text fields in the file are not just separated by a certain symbol, but also enclosed in additional symbols like quotation marks, you can specify these symbols in these two fields. Note that if you don't, the enclosing symbols will be imported as part of the values.
  • No. of top lines to skip – If the file you are importing contains column headers, you can type "1" in this field in order to skip the header and not import its fields as actual values.

XML File

An XML file is also used by many applications to store and export data. The contents of an XML file vary greatly from one use-case to another, but the underlying structure is the same.

Student group xml.png

Our program knows how to parse any XML file and extract all the field values from it. What is left for you to do is to tell the program which field contains which type of data.

Import xml file turbo8.png

MS Access File

Access is a database application which stores its data in MDB files. Our program can open these files and import data from their tables. Since the data is already organized in tables, rows and columns, there is really nothing for you to configure in the first step except to specify the MDB file's path.

Web Site

Any web-page on the Internet is a source of information. An Internet browser displays and organizes that information based on an underlying markup language called HTML, which tells it which fonts to use, where to place each element, what styles to apply and more. Our program knows how to extract the different elements of a web-page and sort them by their style and visual placement. For example, suppose there is a web page with names of students. Most likely that all the student names are displayed with the same font, and if a table is used in the HTML, they will all start at the same horizontal position.

Student group html.png

The program will identify this and thus treat them all as a series of data of the same type. What will be left for you to do is tell it that these are student names and not teacher names (for example). You can type or copy/paste the address of the web-site to the "Address" field and when you press Enter, the program will process it.

Import html file turbo8.png

Selecting the Type of Data of Each Field

After you have specified the format of the file and selected the file in the "File Name" field, the program will read the entire contents of that file. At this point it only knows how to distinguish between the different fields of data, but it does not actually know which data each field holds.

What the program will do at this stage is display all the fields it could extract from the file. Each field will be shown as a separate item in a list, with the title of the item being the first value of that field that the program stumbled upon in the file you are importing. For example, if you are importing a text file, and the first column contains room names, e.g. "Room 1,…", new line, "Room 2,…", new line, "Room 3,…" – the program will display an item named "Room 1". As an extra help measure, it will also show you the next 10 values (e.g. "Room 2", "Room 3", etc.) of that field but only if you expand the original field using the plus button at its left side. The total number of items of that field is also summed up there.

Once the fields are laid out in front of you, you need to select the type of data that each field holds. This is done using a dropdown popup list at the right side of the field. That dropdown list contains all the possible properties of resources, activities and scheduled cells. The selections that you need to make in that list depend on what you are importing.

Importing Resources

This case is when you are importing a list of resources so that each item in the imported data source (e.g. line of text in a text file) contains the details of a single resource. If you are importing activities (so that each item contains multiple resources) follow the steps of the next section instead, but please keep reading this section because the information here will serve you as well.

At this stage you have the columns of the imported data listed in the Import window. Near each column you will see an editable field which initially says "Click to choose...". If you click it, you will see a popup list which contains all the types of resources. Find the resource type that you are importing and expand it using the small plus button. You will then see a list of properties. Choose the property which matches the data in the imported column by clicking inside the check box to the left of it.

Import students turbo8.png

You can repeat this process for the rest of the columns. Finally, click on the "Import" button at the bottom of the window.

Importing Custom Resources' Properties

At this point we would like to remind you about the concept of custom resources' properties because it may come in handy now. As you remember, the kind of "in-built" properties that the program has by default are only the ones that are relevant for scheduling. However, as a user, you are free to add many other properties which we call "custom properties". For example, by default, the program does not have an "Address" property for teachers, but you can add it as a custom property. You can then have it displayed in a separate column in the list of teachers, in reports and even in the timetable itself. And most important, you can import custom properties' data. You see, all the custom properties will be listed in the above popup list near each column just like the program's in-built properties.

Import custom properties turbo8.png

The only thing to pay attention to is that you need to enter the custom properties in advance – before importing. This is done in the Institution pane, as explained in the beginning of the user's guide.

Import custom properties entry turbo8.png

Importing Activities

To be able to import activities, each row of the imported file needs to be composed of several fields. Each field corresponds to a different type of resource, all of which are combined into a single activity. Note that it is not necessary to import the resources separately – when you import the activities, the resources will be imported as well.

The popup list at the right side of each column contains the item "Activity". Under that item you will find all the available types of resources which form an activity. Select one of them for each column that you are importing – but make sure you do this only for columns which contain a resource's name. For example, if you are importing an activity "Teacher X, Subject Y, Room Z" select "Activity:Teacher" as the data type of the first column, "Activity:Subject" for the second column and "Activity:Room" for the third column.

Import activities turbo8.png

If the imported file contains additional properties of resources and not only names, you can import them as well as part of the same import operation. For example, suppose the above imported file contains not only three columns like "Teacher X, Subject Y, Room Z", but five: "Teacher, Subject, Group, Student, Room, Room's Building". In such case, select the data type "Activity:Room" for the fifth column and "Room:Building" for the sixth column.

To conclude, generally when importing activities, the columns which contain the names of the participating resources should be associated with the "Activity:[Property]" data type, and the rest of the resources' properties with the "[Resource]:[Property]" data type. When the import mechanism stumbles upon a new resource's name as part of an activity, it first searches for all that resource's complimentary properties, then imports the resource together with all the properties it could find for that resource, and finally imports the activity as a whole.

Importing an Entire Timetable

This is the case when you are importing a file which contains not only activities but also the times they are scheduled at, and each row specifies a separate scheduled occurrence. For example, one line is "Teacher X, Subject Y, Monday, Period 1" and another line is "Teacher X, Subject Y, Tuesday, Period 2". These are two specific occurrences of the same activity.

Import timetable turbo.png

In this case, the activity's resources should be selected as explained in the previous section, but the time fields should be chosen from the "Cell" item in the popup list. The "Cell" item has the following time properties: "Day", "Date", "Period", "Start Time", "Length" and "End Time". Note that you don't have to select all these time properties. You need to select either a "Day" or a "Date". And you need to select either a "Period"; or a "Start Time" and "End Time"; or a "Start Time" and "Length".

Import timetable fields turbo8.png

After importing the cells like this, you will immediately see all the cells appear in the timetable.

An important note: before importing a timetable, make sure the days and the periods' times are already entered in your database. That is because the program needs to know the names of the days and also the start and end time of each period when it imports the timetable.

 HAVE A QUESTION? EMAIL US: CONTACT@LANTIV.COM