logo
search
Document Editing Problems

How to Automatically Link a Word Form to Excel Data

Bushra ParveenBushra Parveen Oct 12, 2026 870 views

Question details

The user needs to create an interactive form in a document that automatically populates multiple fields based on an input value (like an equipment code) from an Excel database.

How to Link a Word Form to Excel Data Automatically
Product
Word, Excel
Device & OS
not provided
Scenario
Automating data entry in a form by linking it to an external spreadsheet to pull relevant project or equipment information instantly.
Observed behavior
Word does not natively support simple lookup formulas for forms, requiring users to either build the form in Excel, use Mail Merge, or write custom VBA scripts.
Before you start

Ensure your Excel data is formatted as a flat table with clear column headers in the first row, and close the Excel file before attempting to link it to a Word document to prevent locking errors.

Solution 1Recommended

Create the Form Directly in Excel Using XLOOKUP

Since Word lacks native lookup functions, building the interactive form directly in Excel is the most efficient and robust method for auto-populating fields.

Excel is inherently designed for data retrieval. By using formulas like XLOOKUP or VLOOKUP, you can create a dynamic form that instantly fills out project information as soon as you type an equipment code.

1
Prepare the Database Sheet

Create a worksheet in your Excel file named 'Data' and list your information (e.g., Equipment Code, Project Name, Location) in distinct columns.

2
Design the Form Layout

Create a second worksheet named 'Form'. Design your layout, leaving a blank cell (e.g., B2) for the user to type the Equipment Code.

3
Insert the XLOOKUP Formula

In the cell where you want the Project Name to appear, type =XLOOKUP(B2, Data!A:A, Data!B:B). This formula tells Excel to look for the code in B2 within column A of the Data sheet, and return the matching value from column B.

4
Protect the Worksheet

Go to the Review tab and click Protect Sheet. Ensure the input cell (B2) is unlocked before protecting, so users can only type the code and cannot accidentally break the formulas.

Create the Form Directly in Excel Using XLOOKUP
Data Management Tip: Using Excel as both the database and the form eliminates compatibility issues and avoids the need for complex VBA programming.
Efficient Document & Spreadsheet Integration

Easily Link Spreadsheets and Documents with WPS Office

WPS Office offers powerful Mail Merge features in WPS Writer and advanced lookup formulas like XLOOKUP in WPS Spreadsheet. Whether you want to build your form entirely in a spreadsheet or merge data into a text document, WPS makes it seamless and highly compatible with Microsoft formats.

  1. 1. Prepare Data in WPS Spreadsheet: Open your data file in WPS Spreadsheet and verify that all columns have clear, text-based headers.
  2. 2. Open Template in WPS Writer: Launch WPS Writer and open the document template that will serve as your form.
  3. 3. Access Mail Merge: Navigate to the 'References' tab and click on the 'Mail Merge' button to reveal the merging toolkit.
  4. 4. Open Data Source: Click 'Open Data Source', locate your saved WPS Spreadsheet file, and select the sheet containing your records.
  5. 5. Insert and View Data: Use 'Insert Merge Field' to place data placeholders into your form, then click 'View Merged Data' to see your populated fields in real-time.
Seamless Mail Merge tool to link data to documentsAdvanced lookup formulas (XLOOKUP, VLOOKUP) supported in WPS SpreadsheetHigh compatibility with Microsoft Word and Excel formatsAll-in-one tabbed interface for managing documents and spreadsheets simultaneouslyLightweight, fast, and free to download
QA img-9

Frequently Asked Questions

Can a Word document automatically update when the linked Excel file changes?

Yes. If you are using Mail Merge, simply opening the Word document again will prompt you to refresh the data connection, pulling the latest Excel data. If you used Paste Special > Paste Link (OLE), you can right-click the linked data in Word and select 'Update Link'.

Why isn't my Excel data showing up correctly in the Word Mail Merge?

This often happens if the Excel file is currently open in another program, or if the column headers contain special characters or spaces that confuse the merge tool. Ensure your Excel file is saved, closed, and formatted strictly as a flat data table.

Is there an easier way to auto-fill a form without using VBA macros?

Absolutely. Building the interactive form directly within Excel using XLOOKUP or VLOOKUP is significantly easier than writing custom VBA code for Word. Excel is specifically designed for dynamic data retrieval and interactive forms.

Can I use Microsoft Power Automate to link Excel and Word?

Yes, if you use Microsoft 365. You can create a Power Automate flow that triggers when a new row is added to an Excel Online table, mapping the data into a 'Populate a Microsoft Word template' action to generate finalized forms automatically.