How to Import a Word from a Text File into a Specific Cell in WPS Spreadsheets
Question details
The user needs to import the contents of a text file into WPS Spreadsheets and place a value in a specific cell, either by referencing the imported data or by automating the transfer.

- Product
- WPS Office Spreadsheets
- Device & OS
- not provided
- Scenario
- The user wants to import a word or text file into a worksheet and show the required value in a chosen Excel cell, optionally as a repeatable workflow.
- Observed behavior
- The imported text appears in the selected cell or is referenced from an import sheet, and can be updated when the source text or import range changes.
Save the source text file in a fixed folder and note its full path, including the file name and .txt extension. In WPS Spreadsheets, open the destination workbook and decide whether you will import to a helper sheet and reference it, or use a macro to write the value directly.
Import the Text File to a Sheet and Reference It from the Target Cell
Use this method when the text file may contain more than one word, or when you want the target cell to update automatically from an imported data cell.
This keeps the raw imported text visible in a helper sheet so you can audit it, while the destination cell simply displays the required value through a formula.
In WPS Spreadsheets, open the destination workbook and go to Data > Import Data > From Text. Select the .txt file you want to import.
Choose Delimited or Fixed width based on the file layout, set the delimiter or column break, preview the result, and click Finish.
In the Import Data dialog, select the cell where the imported text should be placed, such as SheetImport!A1, and click OK.
Click the specific cell where the value should appear, type =, then select the imported cell or enter a formula like =SheetImport!D4, and press Enter.

Place a Single Word from a Text File Directly into a Specific Cell with a VBA Macro
Use this when you need to read one text file repeatedly from a fixed path and write the value straight into a chosen cell without keeping an import sheet.
Copy a Single Word from a Text Editor and Paste It into the Target Cell
Use this for a one-time transfer when the text file is already open and you only need to place the visible text into a single cell.
Import a Text File into a Specific Excel Cell with WPS Spreadsheets
WPS Spreadsheets can read a .txt file through the built-in text import tool, place it in a worksheet, and display the required value in any target cell with a formula. This gives you a repeatable, Excel-compatible workflow without relying on a separate Office installation.
- 1. Open your workbook: Launch WPS Office, open the workbook where the text should be imported, or create a new spreadsheet.
- 2. Start the text import: Go to the Data tab, click Import Data, and choose From Text. Select the source .txt file and click Open.
- 3. Configure the import settings: In the Text Import Wizard, choose Delimited or Fixed width, set the delimiter or column break, check the preview, and click Finish.
- 4. Select the destination cell: When prompted, choose the cell where the imported text should be placed, such as SheetImport!A1, and confirm.
- 5. Reference the target cell: Click the specific cell that should display the word or value, type =, select the imported cell, or enter =SheetImport!D4, and press Enter.

Frequently Asked Questions
Can I put a text file value into one cell without first importing it to another sheet?
For a single value, you can copy and paste from a text editor, or run a VBA macro that reads the file and writes it to the target cell. The built-in text import places data in a worksheet first, and you then reference it with a formula.
How do I update the target cell after the .txt file changes?
Re-run the text import or the macro and keep the destination range the same. If you use a formula such as =SheetImport!D4, the displayed value updates when the referenced cell is updated.
Why does my imported text split into several columns?
This is normally caused by the delimiter setting. In the Text Import Wizard, choose Fixed width if each line is one value, or uncheck Space or Comma under Delimited so the whole line stays in one cell.
Can I import a Word document (.docx) this way?
The built-in text import expects a text or CSV file. Save or export the Word document as .txt first, or copy the word from the document and paste it into WPS Spreadsheets.
Does this work in Microsoft Excel files opened in WPS Office?
Yes. WPS Spreadsheets is compatible with .xlsx, .xls, and .csv files, so you can open an Excel workbook, import text, and save it back in an Excel-compatible format.




