Home › Blog › General ledger, FEC and AI

Anonymize a general ledger or FEC before analyzing it with AI

Yes, and it's what the French accounting profession's governing body recommends: before giving a general ledger, a trial balance or an FEC (France's standard accounting entries file) to an online AI, replace the names of third parties (customers, suppliers, employees, shareholders) with placeholders, keep the amounts that analytical review needs, and work on a copy in the same spreadsheet format. In an FEC, names mostly sit in the CompAuxLib and EcritureLib columns, but also in CompteLib, CompAuxNum and sometimes PieceRef. For a French chartered accountant (expert-comptable), professional secrecy under Article 21 of the 1945 ordinance leaves no other route with an online AI.

Published · 11 min read

Why anonymize a general ledger before AI?

Because a general ledger tells a company's story with the names of everyone involved: every customer and supplier in the subsidiary accounts, every employee in payroll and expense entries, every shareholder in their current account. For a French chartered accountant, this information is covered by professional secrecy: Article 21 of Ordinance No. 45-2138 of September 19, 1945 binds chartered accountants, their employees and trainees to secrecy under the conditions and penalties of Article 226-13 of the French Criminal Code. And the client's individual customers, employees and shareholders are natural persons: the GDPR applies, with its data minimization principle (Article 5).

The profession draws the same conclusion. The national council's note “Comment utiliser ChatGPT?” (2024) lists among its precautions: don't upload personal, sensitive or confidential data, “pas de mails clients, de FEC, de DSN… non anonymisés dans des sites non maîtrisés” (no client emails, FECs or DSN files that haven't been anonymized, on sites you don't control), and it cites analyzing anonymous data among possible uses. The Ordre's booklet “IA et IA générative adaptées à la profession du chiffre” (August 2025) makes it the first of its five good practices: don't upload confidential or sensitive information, and “pseudonymisez ou anonymisez les données fournies à l'IA”. For the wider picture: ChatGPT and chartered accountants.

Which FEC columns should you mask?

Article A. 47 A-1 of the French Tax Procedures Code (livre des procédures fiscales) sets the 18 fields of the fichier des écritures comptables, in this order. Column by column, here is what can identify a person or the client.

FieldContentMask it?
JournalCode, JournalLibJournal code and label (sales, purchases, bank…)Usually not; check a bank journal labeled with an account number
EcritureNum, EcritureDateEntry number and dateNo: essential for journal entry testing
CompteNumChart of accounts numberNo
CompteLibAccount labelYes for named accounts: shareholder current account, staff account, bank account
CompAuxNumSubsidiary account numberOften: many software packages build it from the third party's name (411DUPONT)
CompAuxLibSubsidiary account label, blank if unusedYes: it's the customer's, supplier's or employee's name
PieceRef, PieceDateSupporting document reference and dateNot the date; the reference only if it contains a name
EcritureLibEntry descriptionYes, for the names it contains (“Fact. Martin SARL”, “Vir. salaire J. Durand”)
Debit, CreditAmountsNo, unless an amount is enough to recognize the client (see below)
EcritureLet, DateLet, ValidDateMatching code, matching date, validation dateNo: useful for payment times and late entries
Montantdevise, IdeviseForeign currency amount and currency codeNo

Then there's the file name: Article A. 47 A-1 builds it from the company's SIREN number, “FEC” and the year-end date. An FEC sent under its original name gives away the company's registration number. AnonymFiles exports files under neutral names (piece-0001…), never their original names.

What about the trial balance, the ledger and the review file?

For a single spreadsheet, the step-by-step guide: anonymize an Excel file.

Should you keep or mask the amounts?

Analytical review without amounts makes no sense: keep them in the vast majority of cases. An amount is not personal data, and AnonymFiles doesn't detect it: it stays readable until you mask it. Three exceptions justify masking, with one click during review.

A masked cell becomes text (for instance [CONFIDENTIEL_1]) and drops out of totals. If you need to hide the order of magnitude of a whole column, another route is to transform amounts in a working copy before processing, for example as a percentage of revenue: ratios stay correct.

How do you prepare the file, step by step?

  1. Turn the FEC into a spreadsheet. The FEC is a flat file whose fields are separated by a tab or a “|” character. AnonymFiles reads a .csv separated by commas, semicolons or tabs, but treats a .txt as plain text. The safest route: open the FEC in Excel or LibreOffice and save it as .xlsx, so amounts become numbers.
  2. Split it if needed. A spreadsheet is limited to 10 MB of text to analyze. Beyond that, split it by period or by journal.
  3. Prepare the third-party list. Extract the unique values of CompAuxLib (a filter or a pivot table will do) and add them to the “always mask” list, which can be imported as .txt or .csv. They will be masked everywhere, including in EcritureLib and in the other documents of the folder, even where automatic detection would miss them.
  4. Process the folder. Trial balance, ledger, FEC, working papers and supporting documents together: the same company or person gets the same placeholder everywhere. Columns headed Nom, Prénom, Client, Salarié or Matricule (or Name, Customer) are masked entirely.
  5. Review side by side. Focus on EcritureLib, CompAuxNum and named account labels; mask a missed name or a sensitive amount with one click.
  6. Export. You get two copies: a spreadsheet redacted in its own format (.xlsx for an .xlsx or .xls, .csv with the same separator for a .csv) and a text copy for the AI. The workbook is rebuilt from the reviewed cells: numbers and dates stay typed, Excel's built-in number formats (thousands separator, decimals, percentages) are kept, and the first row is set in bold and frozen.
  7. Query the AI, then re-inject. The summary memo written with [ORGANISATION_4] gets its real names back on your computer. The encrypted mapping table never leaves the machine.
What the redacted workbook doesn't carry over: formulas (only the displayed value is kept), custom number formats (the value stays exact, in General format), comments, charts, images, defined names and external links. Hidden sheets and rows in the original become visible, because everything that leaves has been reviewed.

Which prompts work for analytical review?

Always state that third parties are pseudonymized, and ask for formulas or code rather than mental arithmetic: it's the best safeguard against a wrong sum.

Trial balance movements

Here are the general trial balances for years N and N-1 of a small [sector] company, with pseudonymized third parties: bracketed placeholders replace real names; don't try to guess them. For each account, compute the change in value and in percent, and list those above [threshold in euros] and [threshold in %]. For each, suggest possible explanations and the checks to perform. Give the Excel formulas used.

Journal entry tests on the FEC

On this pseudonymized FEC (18 columns in the format of Article A47 A-1 of the French Tax Procedures Code), write the formulas or code to isolate: entries posted on a Saturday, Sunday or public holiday; entries whose ValidDate is after the [date] year-end; round amounts above [amount]; vague descriptions (“divers”, “régul”, “OD”); manual entries on cash accounts; duplicate PieceRef values. For each test, explain the risk it addresses.

Third parties and matching

From accounts 401 and 411, list suppliers with debit balances and customers with credit balances at year-end, the top ten customers by revenue (by placeholder) and their share of the total, and the average time between EcritureDate and DateLet for matched invoices. Flag uncleared suspense accounts (471 to 475).

Cut-off

Find entries posted in [month N+1] whose PieceDate falls in year N, and the reverse, on expense and income accounts. Present them by account with the total amount at stake.

Summary memo

Based on the previous analyses, draft a summary memo for the year-end file: points of attention by cycle (sales, purchases, cash, payroll, fixed assets), additional checks proposed and questions for the client. Keep the placeholders exactly as they are.

The Ordre's August 2025 booklet includes further profession-specific prompt examples.

What should you check?

What are the limits?

To choose the AI tool itself: Claude, ChatGPT, Mistral or Copilot for a client file and Copilot and professional secrecy.

Frequently asked questions

Can you put an FEC into ChatGPT?

Not as is. An FEC contains the names of the company's customers, suppliers, employees and shareholders, covered by the chartered accountant's professional secrecy and by the GDPR. The national council of the Ordre des experts-comptables advises against uploading FECs that haven't been anonymized to sites you don't control. Send a copy where names are replaced with placeholders.

Which FEC columns contain personal data?

Mainly CompAuxLib (the subsidiary account label, i.e. the third party's name) and EcritureLib (the entry description). Also check CompteLib for shareholder and staff accounts, CompAuxNum when it is built from the name, and PieceRef. Amounts, dates and chart of accounts numbers are not personal data.

Should you mask amounts before analytical review?

Usually not: analytical review needs them, and an amount is not personal data. Mask only those that would be enough to recognize the client or a person, such as published revenue or an executive's pay.

Does the redacted spreadsheet keep formulas and formats?

It keeps values, typed numbers and dates, and Excel's built-in number formats such as the thousands separator, decimals or percentages. Formulas are replaced by their displayed value, and custom formats revert to General.

Is an FEC in .txt format supported?

A .txt file is read as plain text, without a table structure. Save the FEC as .xlsx from Excel or LibreOffice, or as a .csv separated by tabs or semicolons, to get a spreadsheet redacted in place.

What does the French Ordre des experts-comptables recommend on AI?

Its booklet “IA et IA générative adaptées à la profession du chiffre” (August 2025) asks members not to upload confidential or sensitive information and to pseudonymize or anonymize the data given to AI. Its 2024 note on ChatGPT explicitly lists FECs and DSN files that haven't been anonymized among what not to upload.

Does AI calculate correctly on a general ledger?

Not always. Over thousands of rows, an AI can get a sum or a copy wrong. Ask it for Excel formulas or code, and reconcile its totals with the trial balance before using them.