Start in January. Get ready now. Set up TimeOff before the Christmas rush. Get in touch and we’ll extend your free trial until 1 January. Get in touch

Import leaves from a spreadsheet

11 min read By TimeOff Support

To add many leaves at once, paste the rows from your spreadsheet or choose a CSV file. The import matches your columns, checks every row, and adds the leaves whose rows are ready, as approved.

It is for leave that was taken or agreed elsewhere:

  • when you move from another system or a spreadsheet
  • past leave
  • future leave already agreed

It takes three steps:

  1. Paste your rows, or choose a CSV file.
  2. Match your columns.
  3. Check the rows in a table, where every row is checked before anything is added, then add the leaves.

As the page itself says: “Nothing is added until you press Add.”

Before you start

Who can import leaves

Only administrators can import leaves. The way in is Settings → Import and export, a tile under Account.

The Import and export tile on the Settings page, for bringing employees and leaves in from a spreadsheet and downloading a backup

In its Import leaves section, the button Import leaves opens the Import leaves page. The same page holds Import employees and Company backup.

The Import and export page with its three sections, Import employees, Import leaves and Company backup, each with a line on what it does and a button

What must exist first

  • Employees. Each row names a current employee by their email. An employee who has left is not found: “No current employee has this email.” Add new employees first, with Import employees from a spreadsheet or one by one. Check each employee’s Start of employment first: a row whose leave starts before it is marked Needs fixing.
  • Leave types. Each row names one of your company’s leave types by its name. An archived leave type counts as one your company does not have. Create leave types first: see How do I create a new leave type?

What each row needs

Each row of your spreadsheet is one leave. The import reads seven columns, and three of them are needed on every row: Email, Leave type and Start.

The others are End, Start part, End part and Comment.

The card on the first step lists them too, in your own language, with the needed ones marked.

Step 1: paste your rows or choose a CSV file

Copy the rows from your spreadsheet and paste them into the box Paste your rows here: rows copied straight from any spreadsheet will do. Or select Choose a CSV file, under the box. Then select Continue.

While the box is empty, it shows three example rows. They go as soon as the box holds anything.

The first step of Import leaves: the empty Paste your rows here box showing three example rows, with Choose a CSV file and Continue under it, and the What to paste card beside it

The What to paste card

The What to paste card sits beside the box on a wide screen, and above it on a narrow one. It holds:

  • two numbered steps
  • the columns the import reads, with the needed ones marked
  • how to write dates (see Dates and parts of a day)
  • five short notes, on parts of a day, on how the leaves are added, and on what is checked (see What is checked, and what is not)
  • Download an example file

The card is open at first. You can fold it away, and it stays folded in that browser.

The What to paste card: the columns the import reads with the needed ones marked, the line on how to write dates, its notes, and the Download an example file button

What the page does not read

  • An Excel workbook. The page asks you to copy the rows or save the sheet as CSV: “This is an Excel workbook. Open it, copy the rows and paste them here, or save it as CSV.”
  • A CSV file in another encoding. The page asks you to save it as “CSV UTF-8”: “This file is not saved as UTF-8. Save it as “CSV UTF-8”, or copy the rows and paste them here.”
  • A file or a sheet that is too large. The page says so, and asks you to split it: “This file is larger than …” or “An import takes up to … leaves at a time, …”

The example file

Download an example file saves a CSV file. Its first row holds the import’s column names in your language. Then come three example leaves for one invented employee, the rows the empty box shows:

  • a whole day with a comment
  • a leave of several days that starts after lunch and ends at lunch
  • a single morning

As the card says: “A file with these columns and three example leaves.”

To use it, replace them with your own rows. Then copy them and paste them into the box, or save the file as CSV UTF-8 and choose it.

The example file open in a spreadsheet: a first row of column names, then three example leaves

Step 2: match your columns

Match your columns lists each column of your sheet under Your column, with a Sample value from it and where it Goes to. Each Goes to starts with the page’s best guess. Check them, and change any that is wrong.

  • First row is a header says whether the first row of your sheet names the columns.
  • Don’t import leaves a column out.
  • Each field goes to one column. Picking a field for a second column takes it from the first.

Continue needs the email, leave type and start columns matched. Until they are, the page says: “Match the email, leave type and start columns to continue.”

Match your columns with First row is a header ticked: each column of the sheet with a sample value and the field it goes to, and the Approved by column set to Don't import

Step 3: check the rows

The table shows each leave on a row, with its Email, Leave type, Start and End, plus its Start part, End part and Comment when your sheet has them. Each row shows its row number in your sheet (#) and a status:

  • Checking: the row is being checked.
  • Ready: the row can be added.
  • Needs fixing: the row has a problem to fix first.

Every row is checked before anything is added: against the employee’s start of employment and allowance, the leave type’s limits and the leave they already have. See What is checked, and what is not.

A problem is said under the cell it is about, or under the status when it is about the whole row. For example:

  • “No current employee has this email.”
  • “The end is before the start.”
  • “Leave cannot be booked before the employee start date, ….”: the leave starts before the employee’s Start of employment. Correct the row, or correct that date on the employee’s card and press Check again.
  • “Write Morning or Afternoon, or leave it empty for the whole day.”
  • “Row 2 already covers these dates.”: two rows of your sheet cover the same dates for the same employee.

When the employee’s allowance, a leave type’s limit or the leave they already have stands in the way, the row says so under its status, in the words of the Add leave form. For example: “This overlaps leave already booked from … to ….” or “This is … days more than the allowance left to book (…).”

A row that could not be checked says so: “This row could not be checked. Press Check again.”

Check again reads your company’s employees and leave types again, then checks every row not yet added, a refused one included.

The table step straight after checking: the button that adds the Ready rows, the notice about a leave type the company does not have, and rows marked Ready or Needs fixing with each problem under its cell or its status

Fixing a row in the table

A cell shows Click to edit when the pointer rests on it.

  1. Click the cell.
  2. Type your change.
  3. Press Enter, or click away, to keep it. Escape leaves the cell as it was.
A Start part cell in the import table open for editing, outlined, with its text in place and the problem under it

Every cell is edited as text. A changed row is checked again by itself. To drop a row from the import, select its bin (Remove row).

Dates and parts of a day

Dates. Write dates the way the What to paste card shows: as your company writes dates, or as year-month-day. The card gives an example: “Write dates like [date] or [date].” When the two are the same, it gives one date.

A date the page cannot read is marked under its cell: “This date could not be read. Write it like …” The table shows each date as your company writes it.

Parts of a day. A part is a half day, and the import has no hours. As the card says: “A row with no End is one day. A part is Morning or Afternoon; empty means the whole day.”

A leave of several days. The card says: “On a leave of several days, Start part is the half of the first day the leave takes, and End part the half of the last day. A leave from Monday after lunch to Friday at lunch has Start part Afternoon and End part Morning; leave a part empty to take that whole day.”

That leave’s row reads:

StartEndStart partEnd part
Monday’s dateFriday’s dateAfternoonMorning

A leave of one day. A one-day leave has one part, in Start part. The page says: “A one-day leave has one part. Write it in Start part and leave End part empty.”

Leave types your company does not have

When your sheet names a leave type your company does not have, its cell is marked, and a notice above the table names each one once, with how many rows name it. Use another picks one of your company’s leave types for all those rows.

Leave types are not created here. Create them before you import, or create one in another browser tab and press Check again, which finds it.

The notice above the import table: a leave type the company does not have, with how many rows name it, and Use another

What is checked, and what is not

As the card says: “Each row is checked against the employee’s start of employment and allowance, the leave type’s limits and the leave they already have. Advance notice, blackouts, leave overlap restrictions and leave increments are not checked: a leave that breaks one is added without a warning.”

These rules govern the leave employees request, so check your sheet against them before adding it:

The card also says: “Each row is checked against what is already booked, so a sheet that takes more than an employee has left shows it when Add reaches that row.”

Add the leaves

Add [number] leaves adds the Ready rows only, one after another, and shows its progress. Each row shows Adding, then Added or Not added.

Stop stops after the leave being added. An added row cannot be changed.

At the end, a summary says how many were added and, when any were not, that each row not added says why.

The import table after adding: rows marked Added, the summary, and the rows that still need fixing

What the leaves are

As the card says: “Leaves are added as approved and count against the employee’s allowance. Nobody is emailed.” What a leave does to the allowance depends on its leave type: see Leave types.

They show on the employee’s calendar, on the Team View and in reports, as any approved leave of their type does. A row’s Comment becomes the leave’s comment.

A row not added

A row not added says why under its status. Fix what it says: the changed row is checked again, and once it is Ready, Add [number] leaves adds it.

If the server does not confirm an add, the row says the leave may have been added: “The server did not confirm this one. The leave may have been added: look at the employee’s calendar before adding it again.”

Good to know

Nothing is saved for later

The table lives in the open page, and nothing is saved for later.

Once you have changed the table or added anything, Back asks first, because going back discards the table: “Going back discards this table. Leaves already added stay added.” The choices are Stay and Go back.

The browser warns you before you close the tab while rows are still waiting.

After the import

Look at a few employees’ calendars and allowances, and run a report to compare the leaves with your sheet. See Reports.

The audit trail

Each leave the import adds is recorded in the Audit trail as Leaves imported, with the employee and the leave type. The leave’s own History shows it too.

Help from TimeOff Support

Prefer us to do it? Send your file to info@timeoff.management with your company name, and TimeOff Support imports it for you, free.