All articles
• 6 min read•By InOneShot Team

Merge CSV Data Into PDF Files Without Broken Accents or Lost Zeros

Fill one PDF per CSV row without damaging the data: encoding, delimiter, leading zeros, multi-line cells. What we tested, and the cases that do not work.

To create one PDF per row of a CSV file, link the CSV directly to your PDF template, without opening and saving it in Excel on the way. That is where data most often gets lost: leading zeros vanish, long numbers are truncated, dates change shape. Then check three things: the encoding (for accented characters), the delimiter (comma or semicolon) and the first row, which must hold the column names.

CSV is the format everything can produce: payroll software, online shops, CRMs, sign-up forms, membership tools. It is also fragile, because it holds nothing but text: no cell formats, no language, no sheets. We ran a series of deliberately awkward CSV files through InOneShot's data reader (desktop version 2.0.2); here is what works, what does not, and what to do in each case.

Should you open the CSV in Excel before the mail merge?

No, unless you have something to fix in it. Microsoft explains it in its help page 'Keeping leading zeros and large numbers': by default, Excel removes zeros placed in front of a number and converts large numbers to scientific notation, keeping only 15 digits of precision. When a CSV is opened, a postcode 01000 becomes 1000, a phone number loses its first zero, a 16-digit reference loses its last digit. Save the file afterwards and the loss is permanent.

InOneShot reads a CSV as text and interprets nothing. In our test, 01000 stayed 01000, the reference 000123 stayed 000123, the phone number 0612345678 kept its zero and a 16-digit number came out intact. The trade-off is logical: a date written 2026-11-24 in the file prints as 2026-11-24, and an amount of 1234.5 prints as 1234.5. The software does not guess the presentation you want.

To look at a CSV safely, open it with Notepad: you see exactly what it contains, delimiters included. If you have to go through Excel, import it with Data, then From Text/CSV, and set the Text type on the columns to protect. Recent Excel versions also let you turn these automatic conversions off.

Why do accented characters come out garbled?

Because the file was written in one encoding and read in another. 'Élodie' then becomes 'Élodie'. InOneShot tries the common encodings in order: UTF-8 (with or without the invisible mark Excel adds at the start of the file), then the Western European Windows encoding. In our test, 'Élodie Ségur, Besançon' and 'Zoé Œuvrard, Nîmes' came out right in all three cases.

  • UTF-8, with or without the starting mark: read correctly. Choose this when your software lets you choose.
  • Windows encoding (what Excel often produces with its classic CSV option): read correctly.
  • Excel's 'Unicode Text' (a .txt file in UTF-16): not supported, and renaming it to .csv is not enough, reading fails with an error message. Export again as 'CSV UTF-8'.
  • Old Macintosh encoding: the file is read, but accented characters are wrong. This is the sneakiest case, because nothing warns you: check the preview.

The right habit: before running the batch, preview a row that contains an accent and, if possible, a curly apostrophe.

Comma, semicolon or tab: which delimiter should you choose?

It does not matter, as long as it is the same throughout. In our test, InOneShot recognised the comma, the semicolon and the tab on its own, even when the text itself contains commas ('12, rue X' in a semicolon file) or amounts with a decimal comma (1,50). The vertical bar is not recognised: everything ends up in a single column. On Android, only the comma and the semicolon are detected.

When a value contains the delimiter, it must be wrapped in straight double quotes: a properly protected 'Dubois, Marie' in a comma-separated file stayed a single value. Software that exports cleanly does this by itself; hand-made files, far less often.

One Excel trap: some files start with a 'sep=;' line, a trick meant for Excel alone. InOneShot takes it for the header row. Delete it in Notepad before loading the file.

How should the file be organised?

  • Column names on the very first row. A title such as 'Members list 2026' placed above would be taken for the headers: remove it.
  • Column names that are all different. With two columns named 'Date', only the second is kept: rename them 'Start date' and 'End date'.
  • One row per document. Empty rows are ignored, so they do not produce blank PDFs.
  • A multi-line address is accepted if it is wrapped in quotes: the street and the city stay in the same cell and print one below the other.
  • Stray spaces around values and column names are removed automatically.

If your template is a fillable PDF, you can go the other way round: our free PDF field inspector reads the field names and gives you a CSV file whose first row is ready. For the rules shared by CSV and Excel, see how to create one filled PDF per Excel row offline.

How do you generate the PDFs, step by step?

  • Open the PDF template, then load the .csv file with the same button as for Excel, or drag it into the window.
  • Check the number of rows announced: it must match what you expect. A gap almost always points to a problem with quotes or header rows.
  • Place each column where it belongs on the template.
  • Check the preview on three rows: one with accents, one with a postcode starting with zero, one with the longest value.
  • Choose the column used to name the files, then generate the batch: one PDF per row, or a single merged PDF for printing.

Volume is not an issue for reading: a CSV of 5,000 rows and 3 columns was read in a few hundredths of a second on our machine. Generating the PDFs is what takes time, not the file. The free version produces 5 PDFs per batch, enough to validate your template; the Pro version, a one-time €39, removes that limit. The file is not sent anywhere, which matters when it holds names, addresses or salaries: see why local processing beats online mail-merge tools.

When is an Excel file the better choice?

When presentation matters. In an .xlsx file, InOneShot reads each cell as Excel displays it: a date as 'November 24, 2026', an amount with its currency symbol and thousands separator. A CSV does not carry those formats. If your dates and amounts must be formatted, or if you need formulas to build a sentence, import the CSV into Excel while protecting the sensitive columns, format it, and save as .xlsx.

In short: CSV for data that is already clean, exported from other software and printed as is; Excel as soon as you need to present or compute it. To choose the right tool for the merge itself, see Word mail merge or a dedicated PDF tool.

Frequently asked questions

Can you mail merge a CSV into PDFs without Excel installed?

Yes. InOneShot reads .csv files directly on Windows, Linux and Android: neither Excel, Word nor Acrobat is needed.

Why do my postcodes lose their leading zero?

Because the file went through Excel, which turns 01000 into the number 1000. Go back to the original export and load it directly, or import it into Excel with the column declared as text.

Which format should you pick in Excel's 'Save as'?

'CSV UTF-8'. The classic CSV also works. Avoid 'Unicode Text', which cannot be read.

Can a CSV hold a multi-line address?

Yes, if the address is wrapped in straight double quotes in the file. The lines then print one below the other in the PDF.

How do you control the date format from a CSV?

Write the date in the form you want in the file itself, since a CSV is printed as is. Otherwise, use an .xlsx file with the date format you need.

Going further

A CSV left untouched, a clean first row and a preview on three rows prevent almost every bad surprise. Related reading: generate hundreds of personalized PDFs from an Excel file; generate bulk PDF invoices; organize your mail merge template library.

Ready to automate your PDFs?

Try InOneShot for free and generate your documents in one click.

Discover InOneShot