# Import data and make adjustments

Import spreadsheets, attendance files or another payroll's columns into a run, undo imports, and correct approved pay with adjustments.

Source: https://support.rework.com/article/payroll-import-adjustments

When numbers come from outside Payroll, such as a bonus sheet, an attendance file or last month's balances, you don't have to type them in one by one. This article shows you how to import them into a run, undo an import, and record corrections for a payroll that's already approved.

## Before you start

- You need permission to operate the payroll run.
- The run must be **Pending** or **Running**. Requested, approved and rejected runs are frozen, so reopen the run first.
- Imports only fill **input** columns (values people provide). Calculated columns are left to their formulas unless you deliberately choose to overwrite them.

## What you can import

| Import type | What it does |
| --- | --- |
| **Spreadsheet** | Loads column values from an .xlsx, .xls or .csv file (up to 20 MB and 5,000 rows). |
| **Check-in file** | Loads attendance figures from fixed headers: `working_days`, `total_leaves`, `paid_leaves` and `late_minutes`. Other columns in the file are ignored. |
| **From another payroll** | Copies chosen input columns from another run of the same policy, for example carrying last month's balances forward. No file needed. |
| **By period** | Same as above, but Payroll finds the source run for you from a date range. |

## Import a spreadsheet

1. Open the run's workspace and click **Import**.
   
   \[IMAGE: people-ops/payroll/images/payroll-import-adjustments-01.png | Payroll run workspace toolbar with the Import button marked\]
   
2. Download the template file if you need one. It already has an `employee_code` column plus every column you're allowed to import.
3. Fill in your file. Each row must identify the person by `employee_code` or user ID, and the header row must match the column names.
4. Upload the file. Payroll shows a preview before anything changes: which rows matched an employee, which didn't, any errors, and how many cells will change.
   
   \[IMAGE: people-ops/payroll/images/payroll-import-adjustments-02.png | Import dialog preview: mark (1) matched rows with old and new values, (2) unmatched rows, (3) errors, (4) the Apply button\]
   
5. Check the preview, then apply the import. Payroll recalculates the affected records in the background.

A few rules keep your data clean:

- Text in a number column (like "N/A" or "3 days") is rejected for that cell. Payroll logs the employee code, not the value.
- Empty cells leave the existing value alone.
- Imported values are **pinned**, so the next recalculation won't overwrite them.
- If nothing in the file matches a record, the import is marked as failed rather than applied.

> **Overwriting calculated columns:** the import dialog has an advanced option, "Allow overwriting calculated columns". It replaces formula results with your values and freezes those cells. Use it sparingly, because those cells stop recalculating. 😅

## Undo an import

Every import is logged with a snapshot of what it changed, so you can revert it.

- Revert imports **newest first**. If a later import changed the same cells, revert that one first. Payroll blocks out-of-order reverts so values don't end up wrong.
- Reverting also rolls back any manual edits you made to those cells after the import.
- After a revert, Payroll recalculates the affected records again.

\[IMAGE: people-ops/payroll/images/payroll-import-adjustments-03.png | Import history list: mark (1) an applied import with its row and error counts, (2) its Revert action, (3) the recalculation status\]

## Correct an approved payroll with adjustments

Once a run is approved, its numbers can't change. If you spot a mistake afterwards, record an **adjustment** instead and carry it forward into a later payroll.

- An adjustment belongs to one employee's record in the approved run. It has a signed amount (positive adds money, negative takes it away) and a reason, which is required.
- Adjustments can't be edited. To reverse one, create another with the opposite amount.
- When you apply an adjustment to a target payroll, it's added to that employee's take-home pay there.
- You can delete an adjustment only until it's been applied.
- The employee gets a notification when an adjustment is created for them.

\[IMAGE: people-ops/payroll/images/payroll-import-adjustments-04.png | Adjustment form on an approved record: mark (1) amount, (2) reason, (3) target payroll\]

## Related articles

- [Work in the payroll records grid](https://support.rework.com/article/payroll-records-grid)
- [Payroll runs and records](https://support.rework.com/article/payroll-runs-records)
- [Connect data sources](https://support.rework.com/article/payroll-data-sources)
