Document template placeholder syntax and variables
A placeholder is a marker in your document template that tells ManyDocs where to insert data from your spreadsheet. When you generate a batch of documents, the software looks for these markers and replaces them with the corresponding text, numbers, or dates from each spreadsheet row.
To make this work reliably, the text inside the placeholder must exactly match the column header in your spreadsheet. If the spreadsheet column is named InvoiceNumber, the placeholder in the document must be written to match that name precisely.
Supported placeholder styles
ManyDocs supports three different bracket styles for placeholders. You can use whichever style you find easiest to read on the screen.
| Style | Example |
|---|---|
| Double parentheses | ((InvoiceNumber)) |
| Double curly braces | {{InvoiceNumber}} |
| Double square brackets | [[InvoiceNumber]] |
All three formats behave identically during document generation. However, you should pick one style and stick to it throughout a single template.
Mixing different styles in the same document invites mistakes. If you use {{Name}} in one paragraph and [[Name]] in another, you increase the risk of a typo. Sticking to a single style makes it much easier to visually scan your template and confirm that every variable field is correctly enclosed.
Naming rules and exact matches
The text inside your placeholder must be a perfect, character-for-character match with the column header in your spreadsheet. If the match fails, the placeholder remains in the final document untouched.
Use letters and numbers for your placeholder names. Spaces are technically permitted, but they are a frequent source of invisible errors. A spreadsheet column named First Name works perfectly well with a placeholder written as ((First Name)).
However, trailing spaces are the most common reason a placeholder fails to replace. If your spreadsheet header accidentally has a space at the end, like Name , but your placeholder is written as {{Name}}, the generator will not recognize them as a match. Keeping your column headers to a single, unbroken word (like FirstName or First_Name) eliminates this risk entirely.
Capitalization must also match exactly. ((department)) is not the same as ((Department)). Pick a capitalization strategy for your spreadsheet headers and apply it consistently to the template.
Where placeholders can appear
Placeholders are not restricted to standard body paragraphs. You can place them almost anywhere text normally goes in a Word or LibreOffice document.
They work inside tables, which is useful for displaying client details or pricing breakdowns. You can place them inside document headers and footers, which is commonly required for inserting invoice numbers, dates, or page-specific client names. They also function correctly inside formatted headings.
Here is an example of a template using placeholders in various positions:
[Header] Date: ((IssueDate)) Reference: ((RefNumber))
[Body] Dear ((ClientName)),
This letter confirms the renewal of your service agreement for the ((PropertyAddress)) location. The new term begins on ((StartDate)).
[Table]
| Service Level | Monthly Fee |
|---|---|
| ((PlanType)) | ((MonthlyCost)) |
The split-placeholder problem
Microsoft Word sometimes splits a single word into multiple internal formatting runs behind the scenes. This happens if you stop halfway through typing a placeholder to change the font, if Word's spellchecker flags part of the word, or if an autocorrect rule triggers mid-typing.
When this happens, a placeholder like {{ClientName}} might look perfectly normal on your screen. Inside the DOCX file, however, Word has chopped it into pieces (for example, {{Client and Name}}). Traditional document generators often fail here because they cannot read the broken text as a single placeholder.
ManyDocs automatically detects and reassembles these split placeholders before processing your file. This ensures your documents generate correctly even if Word has fragmented the text internally.
To avoid creating split placeholders entirely, type the opening brackets, the field name, and the closing brackets in one continuous pass. If you need to make the placeholder bold or italic, type the whole placeholder first, highlight the entire text, and apply the formatting to all of it at once.
Using the same placeholder multiple times
You can use the same placeholder as many times as you need within a single template.
If your spreadsheet has a column for CompanyName, you can place ((CompanyName)) in the header, three times in the main text, and once in the footer. ManyDocs will replace every instance of that placeholder with the value from the current spreadsheet row. You do not need to duplicate the data in your spreadsheet.
The visual template editor
If you are working with DOCX files, ManyDocs includes a built-in visual editor to simplify template creation.
Instead of typing placeholders manually, you can upload a finished, typical document (like a completed invoice for a past client). The editor opens the document in your browser and lets you highlight the specific values—like the client's name or the total amount. You can then convert those highlighted values into placeholders with a single click.
This process modifies the text nodes directly without requiring you to hand-edit Word field codes. It guarantees that the formatting remains intact. Note that this visual editor feature is strictly for DOCX files.
LibreOffice and ODT templates
ManyDocs natively supports OpenDocument Text (.odt) templates. The placeholder syntax rules are exactly the same as for Word documents: use double brackets, braces, or parentheses, and ensure exact matches with your spreadsheet headers.
The visual editor does not support ODT files. When using LibreOffice Writer to create your templates, you must type the placeholders directly into the document yourself. Since ManyDocs processes the template directly in your browser, ODT files are handled entirely on your device without needing conversion to Word format first.
Frequently asked questions
Which placeholder styles are supported?
You can use double parentheses ((field)), double curly braces {{field}}, or double square brackets [[field]]. They all work exactly the same way. Pick one style and use it consistently throughout your template.
Why did some placeholders stay exactly as I typed them?
The most common cause is a mismatch between the placeholder text and the spreadsheet column header. Check for differences in capitalization, or accidental spaces at the end of the header name in your spreadsheet. The names must match character for character.
Can I put a placeholder inside a Word table?
Yes. Placeholders work seamlessly inside tables, as well as in document headers, footers, headings, and standard body text. Formatting applied to the placeholder in the table will apply to the generated text.
Can I use the same placeholder more than once?
Yes. You can insert the same placeholder as many times as you need in a single template. The generator will replace every instance of it using the single value from your spreadsheet row.