How to Preserve Excel Rows and Columns When Saving as TXT
Question details
The user needs a way to export a large Excel inventory to a TXT file without losing the alignment of rows and columns.

- Product
- Spreadsheet
- Device & OS
- not provided
- Scenario
- Exporting a large dataset with approximately 53 columns and 3,000 rows to a plain text format for external software use.
- Observed behavior
- When the file is saved as a TXT and reopened, the columns no longer align because plain-text formats do not retain visual structures without specific delimiters.
Verify that your data range is contiguous; remove any completely blank rows or columns that might interrupt the export process.
Save as Tab-Delimited Text
Exporting the data using a consistent tab delimiter is the easiest way to ensure columns remain structured when imported into other software.
Plain text formats like TXT do not have visual gridlines. Saving your spreadsheet as a Tab-delimited file inserts a hidden 'tab' character between each column. While the text might look slightly misaligned in basic editors like Notepad due to varying word lengths, the structure remains perfectly intact for other software.
Click on 'File' (or the main application menu) and select 'Save As' to open the file saving dialogue box.
In the 'Save as type' (or 'File Type') dropdown menu, scroll down and select 'Text (Tab delimited) (*.txt)'.
Choose your destination folder and click 'Save'. If prompted with a warning about losing some formatting features, click 'Yes' to proceed with the plain text export.

Use a Custom VBA Export Macro
A VBA macro allows you to customize the text export, wrapping each value in quotes and using specific separators to force alignment.
Seamlessly Export Data to TXT with WPS Spreadsheet
Handling large datasets is fast and easy with WPS Office. WPS Spreadsheet allows you to accurately export massive inventories into perfectly structured tab-delimited or CSV files without writing complicated code.
- 1. Open the Spreadsheet: Launch WPS Office and open your large data inventory file.
- 2. Navigate to Save As: Click the 'Menu' button in the top left corner, then select 'Save As'.
- 3. Select Tab-Delimited TXT: In the 'File Type' dropdown menu, choose 'Text (Tab delimited) (*.txt)'.
- 4. Save the File: Choose your save directory and click 'Save'. Your rows and columns are now securely separated by tab delimiters.

Frequently Asked Questions
Why do columns look disorganized when I open the exported TXT file in Notepad?
Plain text editors like Notepad do not have cell grids. They display the hidden tab characters between your data, but because words vary in length, the columns will appear visually jagged. However, the data structure remains accurate for the receiving software.
How can I import my TXT file back into a spreadsheet without mixing up the columns?
Open your spreadsheet software and use the 'Get Data from Text/CSV' tool (or the Text Import Wizard). When prompted, specify the exact delimiter (like 'Tab' or 'Comma') you used during the export so the program knows exactly where to divide the columns.
Can I use commas to preserve my rows and columns instead of saving as TXT?
Yes. Saving your file as a CSV (Comma Delimited) format performs a very similar function to a TXT file, but it explicitly uses commas to separate columns. CSV files are widely supported by most database and spreadsheet programs.




