Generation Settings
Sheet to Doc is a powerful tool that automatically writes Excel, CSV, JSON, JSONL data into docx format Word templates, converting them into Word documents in batches.
Building on the basis of mail merge, this tool has developed more features, such as custom file names, custom file paths, embedding images, and so on.
Note
This page is quite long, we recommend that you browse this page with the Table of Contents on the left side of the page to help you understand the page structure.
Generation Modes
Mode 1: Generate Separate Word Documents for Each Row (Recommended for New Users)
Each data row will generate a separate Word document.
This mode may generate multiple files
If you use web version, the browser will pop up a reminder to download multiple files, which requires your permission.
If you use desktop version, it is recommended to set the file download directory in advance by right-clicking on the page to avoid download errors.
This mode is recommended for all new users.
Mode 2: Generate One Word Document for All Data
All Excel data will be written into the Word template in a loop, inside the Word document, the data will be repeatedly generated according to the placeholder design of the template, and finally a single Word document will be generated.
In this mode, you must use the loop placeholder 1
{#data}..{/data}in the template, otherwise it will cause an error. Learn how to use loop placeholder 1 in Template Preparation.
Filename Settings
Sheet-to-Doc provides flexible filename customization functionality, allowing you to set the filenames of the generated documents according to your needs.
Filename Generation Methods
You can choose from two filename generation methods:
Default Filename: The system automatically generates filenames in the following format:
Mode 1: sheet_to_doc_R_{row_number}_{timestamp+random_number}.docx
Mode 2: sheet_to_doc_All_{timestamp+random_number}.docx
Custom Filename: You can customize the filename format according to your needs, including prefix, middle content (from titles in Excel data), and suffix.
Custom Filename Settings
When selecting the custom filename method, you can set the following options:
Prefix: The beginning part of the filename, which can be any text or empty.
Middle (from Excel data titles): Select a column from the Excel data as the middle part of the filename. If it is a complex data structure, the middle dropdown menu will be disabled, and only simple data structures are supported.
Suffix: The ending part of the filename, which can be any text or empty.
The final filename format is: [Prefix][Middle][Suffix].docx
Custom filenames have the following limitations:
The total length of prefix, middle, and suffix cannot exceed 200 characters.
Special characters such as
/,\,*,?,<,>,|are not allowed in filenames. They will be automatically replaced with underscores_.Spaces in filenames are not allowed. They will be automatically replaced with underscores
_.
Filename Preview
The system will use the first row of data to generate a real-time filename preview, helping you confirm whether the filename format meets your expectations. The preview format is: [Prefix][Value from corresponding column in first row data][Suffix].docx
Custom Filename Examples
Here are several actual examples of custom filenames to help you better understand how to use this feature:
Example 1: Using Name as Filename
Prefix:
Employee_Middle (from data): Select the column containing employee names (e.g., the value in the “Name” column is “Zhang San”)
Suffix:
_ProfileGenerated filename:
Employee_Zhang San_Profile.docx
Example 2: Using ID as Filename
Prefix:
Contract_Middle (from data): Select the column containing contract IDs (e.g., the value in the “Contract ID” column is “CON2024001”)
Suffix: Empty
Generated filename:
Contract_CON2024001.docx
Example 3: Using Date and Name Combination
Prefix:
Report_Middle (from data): Select the column containing report dates (e.g., the value in the “Date” column is “2024-05-20”)
Suffix:
_Zhang SanGenerated filename:
Report_2024-05-20_Zhang San.docx
Example 4: Using Product Name and Version Number
Prefix: Empty
Middle (from data): Select the column containing product names (e.g., the value in the “Product Name” column is “SheetToDoc”)
Suffix:
_v1.2.0Generated filename:
SheetToDoc_v1.2.0.docx
“Last modified by” Settings
Sheet-to-Doc provides a “Last modified by” feature that allows you to customize the author information displayed in the generated Word documents.
Options
Use default value: “Sheet-to-Doc Batch Generated, https://s.wtsolutions.cn/sheet-to-doc.html”
Pro Feature Same as “Last Modified By” in template file
Pro Feature Custom value: Enter a custom author name or identifier.
Examples
Example 1: Using Company Name
Last modified by:
ABC CompanyResult: All generated documents will show “ABC Company” as the last modifier.
Example 2: Using Department Name
Last modified by:
Human Resources DepartmentResult: All generated documents will show “Human Resources Department” as the last modifier.