How to batch extract Word content to Excel

This article introduces the general process of summarizing the contents of multiple Word files into one Excel sheet, including file preparation, macro or script reading, file-by-file record generation and result verification. Manual methods are also given when the files are small.

Key points of this article

  • When there are many files with a unified structure, using a macro or script to read them all at once is more stable than copying them one by one.
  • Before starting, unify the files into .docx format and take a look at the structure of two or three samples.
  • Each file generates one line of records, with the file name written in the first column to facilitate checking the corresponding relationship.
  • Test run with two or three files first, confirm that the number of lines and fields are correct before processing all files
  • After completion, check the number of lines, spot-check the correspondence, and check the format of numbers and dates.

Many jobs will encounter situations like this: dozens of contracts need to be compiled into a table with party A and party B, amount and signing date, or a batch of meeting minutes need to list the issues item by item. Manual copying and pasting one by one will easily lead to missing lines and serialization when there are too many files, and it will also be time-consuming to check.

This article talks about the general batch extraction process: first unify the files and fields, then use a macro or script to read the content at once, write it into Excel, and finally check the results randomly. After reading, you will be able to decide whether to process it manually, use macros, or scripts, and know how to check each step to avoid discovering that a file has been missed after finishing the process.

How to batch extract Word content to Excel? One sentence conclusion

When there are only a few files and little content, manual copying is the way to go; when there are many files, the structure is uniform, or values need to be determined according to rules, it is more stable to use macros or scripts to read them all at once.

your situationRecommended practicesreason
There are only a few documents, each with only a few paragraphs of textOpen them one by one, copy the content and paste it into the corresponding row in ExcelNo environment preparation is required, and the results can be verified directly
There are many files and the content structure is unified (such as the title position is the same)Batch reading with Excel macroNo need to write a separate program, it can be run directly in the table
To obtain values according to rules, such as finding the amount from each documentUse Python to write scripts with libraries for reading and writing Word and ExcelRules can be modified and results can be rerun repeatedly
The file is .doc old format, or PDFFirst save as .docx; PDF can be exported to Excel using PDF editorMost reading methods only recognize .docx format
There are many tables in the fileRead individually by table, each table corresponds to a worksheetThe row and column structure of the table will not be compressed into a paragraph of text

Before you start: Confirm these points first

  • File Format: Confirm that all files are .docx. Most of the old .doc formats need to be saved as .docx first, otherwise errors will easily be reported when reading, or only part of the content will be read.
  • Content structure: Open two or three samples to see if the titles, paragraphs, and tables are in the same position. When the structure is not uniform, the rules must be written according to the situation, otherwise the fields will be misaligned.
  • Output format: Determine whether a file occupies one line or a paragraph occupies one line. The former is suitable for summarizing documents with fixed fields such as contracts and reports, while the latter is suitable for organizing terms or issues.
  • Backup and Privacy: Copy the original to another folder before proceeding. Sensitive content such as contracts should be handled locally as much as possible and should not be handed over to online websites from unknown sources.

Steps to batch read Word with scripts and write them into Excel

  1. Place all pending .docx files into the same folder and name them according to a unified pattern, for example, "Contract_001". Unified naming allows the later rows to correspond one-to-one with Excel row numbers.
  2. Install Python on your computer, then install two libraries: reading Word and writing to Excel. This step only needs to be done once.
  3. Create a new script, iterate through the .docx files in the folder, read the text of each paragraph one by one, skip empty paragraphs, and maintain the original order.
  4. If table content is needed, then traverse the table in the document and extract cell text by row and column.
  5. Generate a line of record for each file, with the file name in the first column, followed by the required fields such as title, date, and amount.
  6. Create a new workbook using Excel, write headers and records, and save them in .xlsx format.
  7. Test run two or three files first, then open the results to check if the fields are aligned. After confirming everything is correct, proceed with all files.

If you don't want to write code, you can use macros in Excel to implement the same approach. If you only need to view or modify one part of Word's content, you can also open .docx file in the UniDoc web editor (app.unidoc.top) and copy the required parts.

After completion, check each item one by one

Inspection itemsHow to see itWhat should you do if there's a problem?
Number of linesThe number of Excel rows minus the header should equal the number of .docx in the folderIf it doesn't match, check if the file failed to open or was skipped, then just run it again
Correspondence between files and linesRandomly select a few lines and compare them item by item with the original fileMisalignment usually occurs when the traversal order is not fixed, sorting first and then rerunning
Blank cellsUse the filter function to view blank valuesCheck whether the source file contains this field or if the rules are written incorrectly
Numbers and datesCheck if it has been saved as text and whether the date order is correctSet to numeric or date format, and check decimal points and year/month/day
Special contentCheck whether images, footnotes, and formulas need to be keptScripts usually cannot read images and are handled separately when needed

❓ Frequently Asked Questions (FAQ)

1. Can you keep the table in Word when batch extracting?

Yes. The table needs to be traversed individually, read by row and column, and then write each row as a record in Excel. Merging cells requires special inspection, as the read content may be duplicated or missing.

2. Can scanned Word files also be extracted?

If Word only inserts images and text cannot be read directly, text recognition needs to be done first. Recognition results must be checked paragraph by paragraph, and errors and line breaks must be manually corrected.

3. How to choose a free online conversion tool?

First, check file size limits, whether the output has watermarks, and whether the paragraph and table structure can be preserved. Then check how to save and delete the uploaded file. Sensitive documents such as contracts are prioritized for local processing.

4. If you just want to put a piece of Word content into Excel, is there a simpler way?

You can select and copy all in Word, and when pasting into Excel, choose to keep only the text. Table content usually maintains the row and column structure, but after pasting, you still need to check the numeric and date formatting.

📝 Summary

The key to batch extracting Word content into Excel is to first standardize the file format and fields, then use macros or scripts to read them out all at once, generating a single line of record for each file. After completion, check the number of rows, randomly check the correspondences, and verify the format of numbers and dates, so you can use the table with confidence.

Open OmniDoc and process your table file

Updated 2026-11-12