Importing 1C timesheets for employee absence into iBatyr Monitor calendar events

Now you can import data on sick leave, vacations and time off of employees from the 1C time sheet into the iBatyr Monitor calendar.

Steps

  1. Export data from 1C to Excel in XLSX format.

  2. Complete the data in the correct format.

  3. Run the import command.

As a result, the script will check the file and add sick leave, vacation and other calendar events to iBatyr Monitor using the working time code.

Import command

ibatyr update_calendar_from_file --format=10 --strict --no-dry-run /path/to/file.xlsx

Note

Works only with files in XLSX format.

Based on the results of the script execution, the terminal will display a list of operations:

Illustration 1 — Importing 1C timesheets for employee absence into iBatyr Monitor calendar events

If the data transfer is successful, the Updates field will change to the number of calendar events.

Description of the flags

Flag

Description

--format

Must be equal to 10

--strict

Allows you to make sure that all users are in the database.
If there is no user, the import will stop.
The user is verified by the full name from the Account.full_name field

--data-offset

Allows you to force the location of data.
The sheet number cannot be specified: the second sheet is always used, but you can specify
row number (2) or cell (A2)

--ignore-worktime-codes

Ignores unknown working time codes in --strict mode.
Avoids exiting with an error

--errors-limit

Sets a limit on the number of errors with unknown full names.
When the limit is reached, the import will stop.

When using --strict the parameter does not work

--just-inserts

Does not allow you to update or delete data in the calendar.

Use if you manually changed your full name within a given period,
so as not to lose the changes. Instead of changes, there will be output to the logs.
New calendar entries will be saved

--no-dry-run

Without this flag, changes will not be made to the database

Import File Data Format

Note

You can get a ready-made import file template from Technical support.

Only the first two sheets are used.

First sheet

Indicate on Sheet 1 the date range for the reporting period:

Illustration 2 — Importing 1C timesheets for employee absence into iBatyr Monitor calendar events
  • dates must be in the format dd.mm.yyyy: for example, 05/12/2025;

  • the day and month can be one or two digits, but the year is always full;

  • The date format must be Text and the date must be preceded by a quote ` ;

    • To set the format, go to Home → Number Format and select Text.

  • dates are searched using the key phrase Reporting period, currently the first 20 lines are checked.

    Note

    The phrase Reporting period must contain the letter E, otherwise the script will display a parsing error and stop.

Second sheet

On Sheet 2, enter employee details.

Illustration 3 — Importing 1C timesheets for employee absence into iBatyr Monitor calendar events

Headings:

  • headings should be located in the first row, starting from the first column (cell A1);

  • Correct header format: № | Employee | Total | 01 | 02 | ….

Illustration 4 — Importing 1C timesheets for employee absence into iBatyr Monitor calendar events

Employee details:

  • the first column of the first line indicates numbers, and the order does not matter;

  • cells in the first three columns can be merged vertically;

  • The employee data should occupy two lines:

  • in the Employee column in the first line, enter the Full Name of the user, which is indicated in the iBatyr Monitor database:

Illustration 5 — Importing 1C timesheets for employee absence into iBatyr Monitor calendar events
  • in the second line of the Employee column and in the Total column there should be ignore;

  • the remaining columns of the second row must contain data: real numbers (ignored) or working time code. Each column corresponds to one day.

Acceptable working time codes

  • B - sick leave,

  • FROM - vacation,

  • OD - time off,

  • OJ — waiting,

  • R - work,

  • KD - business trip,

  • BEFORE - day of rest,

  • NV - no-show.

Other codes will result in an error or, when using the --ignore-worktime-codes flag, will be ignored.

Ignored codes

Valid but not reflected in the database:

  • B — day off,

  • K - business trip,

  • HH – no-show.