Blog

Data Redaction

Anonymise an Excel or CSV file: column by column

Redactic · 17 November 2026

Anonymise an Excel or CSV file: column by column

To anonymise an Excel or CSV file, decide column by column what the recipient needs, delete or mask the columns that identify people, generalise the ones that single someone out, and clean the hidden parts of the workbook. A spreadsheet is easier than a letter because the header tells you what each column holds.

What makes a spreadsheet personal data

The GDPR defines personal data as any information relating to a person who can be identified, directly or indirectly, by a name, an identification number, location data or factors specific to that person (Article 4(1)). In a table that covers more than the name column. An employee number, a tax code, an email address and an IBAN identify a person on their own. A date of birth, a postcode, a job title and a start date do not, but together they can point to one row and one person.

Recital 26 says the test is whether a person can be identified by means reasonably likely to be used, and that pseudonymised data, which could be attributed to a person with additional information, is still information about an identifiable person. Article 4(5) defines pseudonymisation as processing data so that it can no longer be attributed to a person without additional information kept separately. Replacing every name with EMPLOYEE_1, EMPLOYEE_2 and so on is pseudonymisation. The file becomes anonymous only when nobody can single out, link or infer a person from what is left, which is the three-part test the Article 29 Working Party set out in its Opinion 05/2014 and the EDPB repeats in its draft Guidelines 02/2026.

A table of columns and the usual treatment

The treatment depends on who receives the file and what they will do with it. This table is a starting point for a payroll export, a staff list or a customer list.

Column type Examples Usual treatment Why
Direct identifiers Name, email, phone, address Delete, or mask with placeholders They identify a person on their own
Identification numbers Tax code, social security number, employee number, IBAN Delete, or mask with placeholders One number, one person
Quasi-identifiers Date of birth, postcode, job title, start date, nationality Generalise (year of birth, region, job family) or delete Combined, they can single out a row
Free text Notes, comments, reasons for absence Read and mask, or delete Names and health details hide in sentences
Measures Gross pay, hours, amounts, counts Keep This is usually what the recipient needs
Codes the recipient uses to join files Department code, contract type Keep, or replace consistently Needed to group and compare

The GDPR asks that personal data be limited to what is necessary for the purpose (Article 5(1)(c)): start from the question the recipient has to answer, and keep only the columns that answer it.

How to anonymise a spreadsheet step by step

  1. Work on a copy. Keep the original where it is and give the copy a neutral file name.
  2. Write down the recipient and the question they have to answer, for example average pay by department or absences by month.
  3. Go through the header and mark each column as keep, delete, mask or generalise, using the table above.
  4. Delete the columns the recipient does not need. A deleted column cannot be reversed, which is what you want for a file leaving the organisation.
  5. Mask the identifier columns the recipient needs for counting or joining, so that the same person keeps the same placeholder in every row and every sheet.
  6. Generalise the quasi-identifiers: a year or an age band in place of a date of birth, a region in place of a postcode, a job family in place of a job title.
  7. Read the free text columns cell by cell, or delete them. A comment such as "off sick after surgery, see Maria" carries a name and health data.
  8. Look for rare rows. A department with one person, or the only employee over 60, is identifiable from the counts alone, so group or remove those rows.
  9. Clean the workbook: unhide every row, column and sheet, clear filters, remove pivot tables built on the original data, comments, cell notes, links to other files and the document properties.
  10. Save a copy as CSV and search it for a few names and numbers you know are in the original.

What goes wrong when a spreadsheet is cleaned

The usual mistake is to hide data that should have been deleted. The ICO guidance on spreadsheets says hiding rows, columns or worksheets is an ineffective way to protect data, because the information stays in the file and a recipient can reveal it with a few clicks. It adds that an active filter can conceal rows a recipient can clear, and that pivot tables and charts can stay linked to their source data even after the source sheet is deleted or the table is copied to a new workbook.

The best documented case is the Police Service of Northern Ireland. On 8 August 2023, in answer to a freedom of information request, it published a spreadsheet whose visible tabs had been deleted, while the original worksheet with the personal details remained in the file unnoticed. The ICO fined the PSNI £750,000 on 3 October 2024 and said the fine would have been £5.6 million without its approach to the public sector. The worksheet held the surname, initials, rank and role of all 9,483 officers and staff.

A second mistake is treating a pseudonymised file as anonymous. A sheet with placeholders in the name column and an exact date of birth, postcode and job title in the next columns still lets anyone who knows the workplace find a colleague. The EDPB draft asks controllers not to call data anonymous when people remain identifiable, and to document how they reached the conclusion.

Good practice for recurring exports

A monthly export from payroll or a CRM deserves a fixed recipe, so the same columns are treated the same way every time.

  • Keep a written list of columns per recipient, with the treatment of each, and review it when the export template changes.
  • Keep placeholders consistent across files that the recipient will join, and keep the mapping in a separate place, with access limited to the people who may reverse it.
  • Prefer generalising to deleting when the recipient needs the distribution, and deleting to masking when nobody needs the values back.
  • Check the file you send, never the one you prepared. The CSV copy and a search for a known surname take a minute.
  • Treat any file with placeholders as personal data: send it only to the recipient who needs it, under the same contract and security you use for the original.

How Redactic redacts an Excel or CSV file

Upload an Excel or CSV file and Redactic proposes a treatment for each column from its header, in 14 languages, which you can change before the run: keep the column, mask the whole column as a type such as name, email or IBAN, mask it with a generic placeholder, or let the detection read each cell. The same value gets the same placeholder in every row and every sheet, the file comes back as Excel or CSV with the same sheets and columns, and hidden sheets, cell notes and document properties are cleaned in the same pass. Masked data is pseudonymised and stays personal data under the GDPR, so generalising dates of birth and postcodes is still your step. The payroll and accounting page shows a sample payroll export, the free trial takes your own document, and files are never stored and never used to train AI models. Related guides: hidden metadata in Word, PDF and Excel and how to redact a payslip before you send it.

Frequently asked questions

Is a spreadsheet with the name column deleted anonymous?

Usually it is not. The GDPR counts information as personal data when a person can be identified directly or indirectly, and a row that keeps a date of birth, a postcode and a job title can still point to one person. Treat the file as pseudonymised, and therefore as personal data, unless you have also generalised or removed the columns that single people out.

Should I delete a column or replace its values?

Delete it when the recipient never needs it. Replace its values with consistent placeholders when the recipient has to count, join or compare rows, because the same person keeps the same label on every row and in every sheet. A replaced column is pseudonymised data, so the file stays personal data for you and for anyone working on your behalf.

Does hiding a column or a sheet remove the data?

No. The ICO guidance on spreadsheets says hiding is an ineffective way to protect data, because the information stays in the file and a recipient can unhide it. Filters, pivot tables and links can also keep a copy of rows you no longer see. Delete what the recipient must not have, then check the saved file.

How do I test the file before I send it?

Open the copy you will send, unhide every row, column and sheet, clear all filters and look for pivot tables, comments and links. Then save a copy as CSV, which shows every value a cell can display, and search it for a few surnames and ID numbers you know are in the original. If one turns up, the column was not fully cleaned.

Sources

  1. Regulation (EU) 2016/679 (GDPR), Articles 4(1), 4(5) and 5(1)(c), Recital 26, accessed 2026-11-12.
  2. Article 29 Working Party, Opinion 05/2014 on Anonymisation Techniques, WP216, 10 April 2014, accessed 2026-11-12.
  3. EDPB, Guidelines 02/2026 on Anonymisation, version 1.0 for public consultation, adopted 7 July 2026, accessed 2026-11-12.
  4. ICO, How do we avoid an accidental breach when personal information is hidden in spreadsheets?, 31 July 2025, accessed 2026-11-12.
  5. ICO, What price privacy? Poor PSNI procedures culminate in £750k fine, 3 October 2024, accessed 2026-11-12.

Keep reading