How to generate Word documents in batches based on Excel data? Supports generating one docx per row or merging into a single file


Translation:EnglishFrançaisDeutschEspañol日本語한국어
Update Time:2026-11-26 06:31:11
Content note: This article reflects the software version available when it was published. Interfaces and features may change with updates; please refer to the current software. If you find an error, please let us know.
Software featured in this articleHeSoft Doc Batch Tool
Free DownloadSoftware IntroductionUser Guide

When you need to batch-create certificates, notices, contracts, or reports based on an Excel roster, copying and modifying Word content one by one is not only time-consuming but also prone to omissions and errors. This article explains how to use HeSoft Doc Batch Tool to automatically fill each row of Excel data into specified positions in a Word template, and generate multiple separate docx files as needed, or merge all records into one Word document. Text, dates, and images can all be mapped, making it suitable for batch-producing certificates with photos, awards, personnel files, and other documents.

When creating award certificates, admission notices, employee records, client letters, contracts, quotations, or event invitations, the same requirement often arises: the Word layout remains essentially unchanged, but content such as names, awards, dates, project names, and photos needs to vary row by row according to an Excel list. If there are only a few records, manually copying the Word template and modifying each copy may still be feasible; but when the data grows to dozens or even hundreds of rows, repeated copying, pasting, renaming, and inserting images will take up a lot of time, and may also lead to problems such as mismatched names and photos, incorrect dates, and missing content.

HeSoft Doc Batch Tool is a batch file processing software designed for office scenarios. Its "Batch generate Word files from Excel" function can read each row of an Excel data sheet and fill the data from different columns into the corresponding placeholder text in a Word template. During processing, you can either generate a separate docx file for each Excel row, or merge the content generated from all data rows into a single Word file. This article will explain, with reference to the actual interface, the preparation method, field correspondence, and complete operation process for batch generating Word documents from Excel.

1. Applicable scenarios: which tasks are suitable for batch generating Word from Excel

As long as the final files have the same or basically the same layout, and the specific content comes from structured tables, you can consider batch production by combining Excel data with a Word template. Common applications include:

  • Batch production of certificates and awards: fill in names, awards, event names, award dates, and personal photos according to a list of students or employees.
  • Batch generation of notices: fill Excel fields such as recipient, number, address, time, and matters to be handled into a unified Word notice template.
  • Batch production of contracts or agreements: automatically write data such as client name, contact person, amount, and signing date into a fixed contract layout.
  • Batch generation of personnel records: in addition to text information, you can also set image-type fields to fill in avatars or other images corresponding to each person.
  • Batch output of reports, labels, and letters: generate a separate docx file for each business record, making subsequent printing, sending, or archiving easier.
  • Generate a consolidated Word file: if you do not need to keep a separate file for each record, you can merge all rows into one Word document for centralized printing or unified review.

The key to this processing method is not simply copying Excel into Word, but first creating a reusable Word template, and then letting the office software batch replace content according to field mapping. The template only needs to be adjusted once, and later it can be reused simply by changing the Excel data sheet, which helps reduce repetitive manual operations.

2. Result preview: what to prepare before processing

1. Prepare a clearly structured Excel data sheet

The sample Excel worksheet is named "Students". The first row is the header row, containing columns such as Name, Award, Event, AwardDate, and Avatar. Each subsequent row represents one award winner, storing the name, award, event, date, and avatar image respectively. The purpose of the header row is to tell the software what each column of data means, so column names should be kept clear and avoid duplication.

image-Batch generate Word from Excel,import Excel data into Word,batch generate docx,batch fill Word templates,generate one Word per Excel row,merge multiple Word files into one file

As can be seen from the example, Excel can provide not only ordinary text and dates, but also image data. In actual work, you can set Chinese or English column names according to business needs, such as "Name", "Department", "Certificate Number", "Issue Date", "Photo", and so on. It should be noted that one row of data should correspond to one complete record, and the same person's information should not be split across multiple unrelated rows.

2. Place the content to be replaced in the Word template

The Word template is responsible for determining the final document's page layout, font, font size, color, paragraph spacing, and fixed explanatory text. Positions that need to change should use easily recognizable text as markers. In the sample template, [Name], [Award], [Event], [AwardDate], and [Avatar] are set, corresponding to the five column names in Excel.

image-Batch generate Word from Excel,import Excel data into Word,batch generate docx,batch fill Word templates,generate one Word per Excel row,merge multiple Word files into one file

These square brackets are only the marker format used in the example. What really matters is that the text to be replaced in the template must be exactly the same as the content later set in the software. For example, if the mapping box contains [Name], the Word template must also contain the complete [Name], without missing brackets, adding spaces, or changing characters. Image fields also need reserved marker positions in the template, and the software will replace those positions with the corresponding images during processing.

3. Results after processing: generate multiple docx files or merge into one Word document

1. Generate a separate Word file for each Excel row

If you choose "Generate one file for each row of Excel data", each record in the table will form an independent Word document. After the sample processing is completed, Amelia Scott.docx, Benjamin Clark.docx, Chloe Anderson.docx, Daniel Cooper.docx, and other files appear in the output directory. Each file can be opened, sent, printed, or archived separately.

image-Batch generate Word from Excel,import Excel data into Word,batch generate docx,batch fill Word templates,generate one Word per Excel row,merge multiple Word files into one file

This method is suitable for scenarios such as certificates, personal notices, independent contracts, and one record per person. The output files use the docx format and can continue to be edited in common Word office software. If business materials use the older doc format, it is recommended to first confirm whether the template can be opened and processed normally; judging from the interface and results in this example, the actual template and output files used are both docx.

2. Template fields are replaced by actual data and images

After opening the generated Word document, you can see that [Name] in the template has been replaced with Ella Robinson, [Award] has been replaced with Outstanding Performance, [Event] and [AwardDate] have also changed to the corresponding activity and date, and the original [Avatar] position now shows the avatar corresponding to that record. The title, explanatory text, font size, and overall layout in the template that do not need to change are retained.

image-Batch generate Word from Excel,import Excel data into Word,batch generate docx,batch fill Word templates,generate one Word per Excel row,merge multiple Word files into one file

If you choose "Merge all rows into one file", the software will batch fill the same template according to the Excel data rows and save the generated content into one Word file. This method is more suitable for producing unified printed materials, continuous rosters, or summary documents. The two modes use the same data source and field mapping, and the main difference lies in the number of final output files.

4. Operation steps: batch generate Word files from Excel

Step 1: Enter the Word tool and select the corresponding function

Open HeSoft Doc Batch Tool , and enter "Word Tools" on the left side. The main interface will display multiple Word batch processing functions. Find and click "Batch generate Word files from Excel". The interface description shows that this function is used to fill a Word template with each row of Excel data and batch generate files.

image-Batch generate Word from Excel,import Excel data into Word,batch generate docx,batch fill Word templates,generate one Word per Excel row,merge multiple Word files into one file

The purpose of this step is to enter the correct task workflow. It is different from ordinary Word find-and-replace: ordinary replacement usually performs a unified modification to fixed content in existing documents, while this function reads different data according to different Excel rows and then repeatedly applies the same Word template.

Step 2: Add the Word template to be filled

After entering the function page, the top of the workflow shows four stages: "Select records to process", "Set processing options", "Set save location", and "Start processing". First click "Add files" and select the Word template in which placeholder text has already been placed; if the template is located in a folder, you can also add it through the "Import files from folder" entry provided in the interface.

image-Batch generate Word from Excel,import Excel data into Word,batch generate docx,batch fill Word templates,generate one Word per Excel row,merge multiple Word files into one file

In the example, template.docx has been added, and the list displays the file name, path, extension, time, and other information. After confirming that the template has been added correctly, click "Next". If the wrong file is selected, you can use the delete icon in that row's operation area to remove it, or use "Clear" at the top of the page to select again.

The template determines the basic format of all output documents, so it is recommended to open and check it in Word before adding: whether the fixed text is correct, whether the placeholder text is complete, whether the reserved image positions are appropriate, and whether the page margins and page breaks meet the requirements. If there is a problem in the template, every file generated in the batch will inherit that problem, so checking in advance is often more time-saving than reworking each file after generation.

Step 3: Select the Excel file, worksheet, and header row

After entering "Set processing options", add the data source in the "Select Excel data sheet file" area. After adding it, select the worksheet that actually contains the data from the "Worksheet" drop-down list. In this example, Students is selected.

Next, fill in "Header row number (the row closest to the data body)". The first row of the sample Excel contains Name, Award, Event, AwardDate, and Avatar, so the header row number is set to 1. The software will identify the column names based on the header row and list the fields that can be mapped below.

The page also provides a "Process only visible data rows" switch. If there are hidden rows in Excel, or if after filtering you only want to process the currently visible records, you can decide whether to enable it according to the actual task. If you need to process all valid data rows in the table, you should confirm that the state of this option meets your expectations.

Step 4: Establish the correspondence between Excel columns and Word template text

After the software recognizes the Excel headers, it lists each column in the "Set correspondence between template and data sheet" area. The sample correspondence is as follows:

  • Name column corresponds to [Name] in the Word template;
  • Award column corresponds to [Award] in the Word template;
  • Event column corresponds to [Event] in the Word template;
  • AwardDate column corresponds to [AwardDate] in the Word template;
  • Avatar column corresponds to [Avatar] in the Word template.

image-Batch generate Word from Excel,import Excel data into Word,batch generate docx,batch fill Word templates,generate one Word per Excel row,merge multiple Word files into one file

For content such as names, awards, events, and dates, select "Default" as the data sheet column type; for the avatar field, select "Image". This allows the software to distinguish between ordinary text replacement and image filling. The interface also provides operations such as "Clear all inputs" and "Find and replace", which can be used to assist in setting the mapping content.

After completion, check three pieces of information row by row: whether the Excel column name is correct, whether the column type is correct, and whether the template text filled in on the right is exactly the same as the marker in Word. Particular attention should be paid to English capitalization, full-width and half-width symbols, square brackets, and spaces. If even one character is different, the replacement may fail to match the intended position.

Step 5: Choose whether to generate multiple files or merge them into one file

In the "Set number of generated files" area, choose the output method. The interface provides two options:

  • Generate one file for each row of Excel data: each row of records generates a separate Word file, suitable for tasks such as one certificate per person, one contract per client, or one report per record.
  • Merge all rows into one file: consolidate the content generated from all records into the same Word document, suitable for continuous printing or unified submission.

The choice should be based on the intended later use of the files. If files need to be named separately, sent individually, or archived independently, prioritize one file per row; if they only need to be printed together or reviewed uniformly, merging into one file can reduce the number of files.

Step 6: Set the save location and start batch processing

After confirming that the mapping and generation method are correct, click "Next", set the output file save location on the subsequent page, and enter the "Start processing" stage. Because a batch task may generate many docx documents, it is recommended to choose a separate empty folder to save the results, so as to avoid mixing them with the original template, Excel data source, or other historical files.

After processing is complete, open the output directory to check the number of files, and then open a few Word documents at random to verify that the names, awards, dates, activities, and images match the same Excel row. After confirming that the results are correct, proceed with batch printing, sending, or archiving.

5. Common problems and precautions

1. Why were some placeholder texts not replaced?

The most common reason is that the text in the mapping box is not exactly the same as that in the Word template. For example, the template contains [Name], but during setup you entered Name, [name], or [Name ]. It is recommended to directly copy the complete marker from the template for setup, and check for any hard-to-notice spaces or different symbols.

2. Why were the Excel columns not recognized correctly?

Check whether the worksheet is selected correctly, and whether the "header row number" points to the header row closest to the data body. If the header row is incorrect, the software cannot recognize Name, Award, and similar content as column names. You should also avoid empty header cells or multiple fields using exactly the same name.

3. Why does the image position still show text?

Fields such as avatars, signatures, or product images need the data sheet column type to be set to "Image". If it is still set to "Default", the software may treat it as ordinary content. You should also ensure that the corresponding image data in Excel is valid, and that the image in each row really belongs to the same record as the other information in that row.

4. How should I choose between generating multiple files and merging into one file?

When you need to send, rename, print, or archive files one by one, choose to generate one file per row; when you only need to produce one continuous document, choose to merge all rows into one file. Before formal processing, you can first run a test with a small amount of data and use the actual results to judge which structure better meets your work requirements.

5. What should I do if dates or numbers do not display as expected?

Before batch processing, check the data format and actual content of the corresponding columns in Excel, especially dates, amounts, numbers, and numbers with leading zeros. Do not judge only by how the cells appear on the surface. If necessary, first organize the data uniformly in Excel, and then import it into the software to generate the Word files.

6. Why is it recommended to test with a small amount of data first?

When there are many fields, the template layout is complex, or images are included, testing with two or three rows of data first can quickly reveal mapping errors, image type setting errors, and layout problems. After confirming the test results, proceed with the complete table. This can avoid generating a large number of incorrect files at once, and can also reduce the time spent deleting and regenerating them.

7. How should the original files be retained?

It is recommended to keep the unmodified Excel data sheet and Word template, and save the output results to a new folder. Do not directly overwrite the only template or data source. That way, even if you later need to adjust fields, modify the layout, or regenerate the documents, you can quickly restore and repeat the process.

6. Summary

With HeSoft Doc Batch Tool , you can turn the task of repeatedly copying Word documents, modifying content item by item, and manually inserting photos into a standard workflow of "organizing Excel data, creating a template once, establishing field mapping, and batch output." Each row in Excel can generate a separate docx file, or be combined with other rows into one Word document. Text, date, and image fields can all be filled into the template according to the corresponding relationships.

If you are batch producing certificates, notices, personnel records, contracts, or other Word materials with a fixed format, it is recommended to first organize an Excel sheet with clearly defined fields, and then prepare a Word template containing unique placeholder text. After completing a test with a small number of records, run the full batch task. This can not only reduce repetitive work, but also lower the risk of data misalignment caused by copying and pasting, making the production, checking, and archiving of large numbers of Word files more efficient.

Keyword:Batch generate Word from Excel , import Excel data into Word , batch generate docx , batch fill Word templates , generate one Word per Excel row , merge multiple Word files into one file
Creation Time:2026-11-26 06:30:53
Software featured in this articleHeSoft Doc Batch Tool
Free DownloadSoftware IntroductionUser Guide
Content note: This article reflects the software version available when it was published. Interfaces and features may change with updates; please refer to the current software. If you find an error, please let us know.