cyber train powered by Visibility Software
Help & Support Center
Search:
Contents
:
IndexBookmarkPrint

Home > System Admin Role > Links & Integrations > Utilities > Employee Import Utility

Employee Import Utility

This utility is intended to be run by Windows Scheduler at any interval chosen to periodically import an Excel file of employees into Cyber Train.
  1. The utility mimics the import function which already exists within Cyber Train. Within Cyber Train, go to Students/Import Students in the main menu bar. On the page that appears, choose which fields will appear in the spreadsheet in the correct order. If the plan is to periodically create a new Excel file to be imported, the fields in that file must exactly match the fields set up on this page. The utility will always reference this page for information on what to expect in the Excel file it’s about to import.
  2. Download and unzip the file http://www.vspublic.com/ctupdates/tools/CyberTrainAutoImport.zip into a blank folder on any server, as long as it has access to the SQL Server where the Cyber Train database resides and has the .NET Framework 3.5 SP1 installed. In addition to storing the application, this will be the final location for the excel files to be imported in to Cyber Train.
  3. Once unzipped, double-click the file EmployeeImportInit.exe. The a form will appear. Complete this form by entering the SQL connection information to connect to the Cyber Train database and click OK.
    1. SQL Server
    2. Database
    3. User ID
    4. Password
  4. Schedule the file EmployeeImport.exe to run as often as desired using a tool like in Windows scheduler.
  5. Each time EmployeeImport.exe runs, the following occurs…
    1. It scans its own directory for any .xls files
    2. Every time it finds one, it checks to see if the filename starts with IMPORTED
    3. If it does, it skips that file, it was already imported previously
    4. For each file that does not start with IMPORTED, it opens the file and imports all of the non-blank rows in that Excel spreadsheet
    5. When it’s finished importing that file, it renames it to

      IMPORTED-<OriginalFileName>.<Month>.<Day>.<Year>.xls
       

    6. By renaming the file, the utility will know not to import it again next time because it starts with IMPORTED. This keeps the file there for historical purposes, rather than permanently deleting it. Furthermore, the current date is appended to the end of the name so you can see at a glance which files were imported on which days.