The ExcelImport function allows to import a CSV text file with dancer data.

File format:

Last name;First name;X;Club;Barcode;Level;...

X=Gender, M or G for boy, else girl; empty is undefined

Possible separation characters are Semicolon or Tab or (new in v2.6a) Comma.

The barcode is optional; if set it must already exist in the database (New in v2.5d: But observe option ''Unknown codes''.)

(New in v2.2b) If a barcode was given, first and last name as well as the gender flag can be empty (New in v2.5d: But observe option ''Unknown codes''.)
(New in v2.2b) The club name can be empty for existing dancers.

Note: The file should use a charecter set of ISO-8859-1, else you might get strange results. If suspicious characters are detected, the import might be imported with an error message.


Depending on the operation mode, either the "special", the "active" or (new in v2.5c) the "class" flag is cleared for all dancers in the database.

During import, dancers from the import file are looked up in the database. If a barcode was given in the file, this has to exist in the database and is used for dancer matching (the dancer name is ignored), else first and last names are matched against the database and a new dancer record is created if necessary.

If a dancer already existed, the "special", "active" or "class" flag is set for this dancer and in this case the gender flag will be ignored.

Dancers missing in the database will be created (with "special", "active" or "class" flag set) and are filled in with the data given in the input file. For gender "M", "beau" position is assumed and "belle" for gender "F".

If "Level" is set to something parseable (e.g. A2), the appropriate dance programs will be set for this dancer (for newly created dancers as well as for existing dancers).
Note: Only additional level flags will be added, existing program flags will never be cleared.

The club name will be updated for all imported dancers (also for existing dancers). If the new club name differs from the old one, a warning will be issued.
(New in v2.2b) If the club name for an existing dancer is missing in the excel list, the club name of this dancer will remain unchanged.

The field Barcodes from will be taken into account when new dancers are created (or when dancers from the import file that already exist in the database do not yet have a barcode). The field is pre-set with the [last used barcode of your barcode range] + 1. Please note that this will only work properly when a) you have set your barcode range in your config.php properly and b) you allocate your barcodes in ascending order. Before allocating a barcode, the program will check if a barcode is already in use and will then try the next one instead.

(New in v2.5d) The option Unknown codes, if set to "create dancer", modifies the behaviour as follows: In this case, if a barcode is present in the imported file that does not yet exist, the dancer will be created, provided that all fields are filled properly. But note that this will only work if the barcode belongs to your own number range as defined in your configuration.

Possible error messages: (List incomplete)

  • Error: Member of xxx for type==special not found!?
    (where xxx is the name of your own club as defined in config.php)
    The program assumes that it should know all dancers of that club. Therefore it is an error that this dancer is not in the database during a "special" import. This is to recognize typos on the import lists. So please add your club members with an "active" ExcelImport first...

  • Error: Duplicate import for barcode xxxxxx
    Your list contains an inconsistency. You either list a barcode twice, or you list a barcode and also the alternative barcode of a dancer. Please check your list.

  • Error: Imported barcode xxxxxx not found!?
    If a barcode is specified, this has to exist in the dancer database. If you want to create new dancers during the import, the barcode field has to be empty.

  • Error: Last and/or first name missing
    For newly created dancer, neither the first nor the last name can be empty.

  • Error: Gender missing!
    For newly created dancer, the gender flag must not be empty.

  • Error: Could not determine separation character
    There must be at least six fields in each line of the file (especially in the first line), separated by semicolon, tabulator or comma.

  • Warning: Club was 'xxxx', Club now 'yyyy'
    The club name for this dancer was changed.

  • updated + new code: xxxxxx
    The dancer was found in the database but did not have a barcode. He was assigned the new barcode xxxxxx and his active resp. special flag was set.

  • status updated: xxxxxx
    Not an error: The dancer was found in the database with barcode xxxxxx and his active resp. special flag was set.

  • inserted with code xxxxxx
    Not an error: The dancer did not yet exist and therefore created with barcode xxxxxx.

Back to Program functions

Back to main index