TXT to Excel: Complete Guide to Converting Text Files into Spreadsheets Fast
Learn how to convert txt to Excel using Power Query, Text Import Wizard, and delimiters. Step-by-step methods, fixes, and tips for clean data import.

Converting txt to Excel is one of the most common data-prep tasks office workers, analysts, and students face every day. Whether you are pulling log files from a server, exporting reports from legacy software, or downloading transaction histories from a bank, the source data almost always lands in a plain text file. Excel, by contrast, expects rows and columns, formatted numbers, and dates that behave predictably. Bridging that gap quickly and cleanly is a skill that pays off in every job that touches data, and it only takes a few minutes to master once you understand the patterns.
The good news is that modern Excel — versions 2016 through Microsoft 365 — gives you several reliable ways to import text. The classic Text Import Wizard still ships in the application, the newer Get & Transform (Power Query) engine offers repeatable, refreshable imports, and a simple drag-and-drop or double-click can sometimes do the trick for well-formatted files. Each method has its strengths, and choosing the right one depends on file size, delimiter type, and whether you plan to import the same file again next week.
This guide walks through every approach in plain language. You will learn how to handle comma-separated values, tab-delimited exports, fixed-width logs, pipe-separated extracts, and ugly multi-encoding files that include accented characters or right-to-left text. You will also see how to avoid the most common traps — leading zeros that vanish, dates that flip from DD/MM to MM/DD, scientific notation invading product IDs, and silent truncation of long numbers like credit card stubs or SKU codes.
Beyond mechanics, we will cover quality control. A clean import means nothing if the data inside is wrong, so we will look at validation steps, deduplication using remove duplicates excel features, and how to lock down imported sheets so colleagues cannot accidentally break the column layout. We will also touch on automation: once you can convert one text file, you can build a Power Query that processes a whole folder of them every Monday morning without lifting a finger.
If you regularly work with large datasets, you will appreciate the performance section. A 500 MB log file behaves very differently from a 50-row CSV, and the import method you choose can mean the difference between a five-second refresh and a frozen application. We benchmark the realistic limits of each approach and explain when it is time to push data into Power Pivot, an external database, or a connected dashboard instead of cramming it onto a worksheet.
Finally, we wrap up with troubleshooting recipes for the errors that frustrate even experienced users: garbled characters, missing rows after import, mismatched column counts, and Power Query connections that mysteriously break overnight. By the end of this article you will have a complete mental model for txt to Excel conversion, plus a checklist you can pin to your monitor for tomorrow morning's first import job.
TXT to Excel by the Numbers
Four Ways to Convert TXT to Excel
The classic three-step dialog box accessible from Data > From Text/CSV (Legacy). Perfect for one-off imports under 1 million rows where you need fine-grained control over data types in each column.
The modern, refreshable approach built into Excel 2016 and later. Lets you save the import as a query you can rerun whenever the source file updates. Ideal for recurring weekly or monthly reports.
Simply choose File > Open and point Excel at the .txt file. Fastest method but offers the least control. Excel guesses delimiters and data types, which can corrupt leading zeros or long numeric IDs.
Open the text file in Notepad, select all, copy, then paste into Excel and use Data > Text to Columns. Useful when the file is small or you only need a slice of the data inside a larger document.
The Text Import Wizard remains the most-used route for converting txt to Excel because it walks you through every decision the application would otherwise make silently. To launch it in Excel 2016 or later, you may first need to enable it: go to File > Options > Data and check the box for From Text (Legacy). Once enabled, the wizard appears under Data > Get Data > Legacy Wizards. In older versions of Excel, the wizard launches automatically when you choose File > Open and select a .txt file.
Step one of the wizard asks whether your data is Delimited or Fixed Width. Delimited means each field is separated by a specific character — usually a comma, tab, semicolon, or pipe. Fixed width means each field occupies a set number of characters and lines are padded with spaces. Most modern exports use delimited format, but mainframe reports, COBOL output, and certain banking extracts still use fixed width. Choose carefully because the rest of the wizard depends on this initial decision.
Step two lets you choose the delimiter or, for fixed-width files, drag column-break markers on a visual preview. If your file has unusual delimiters like the vertical bar (|) or caret (^), tick Other and type the character. You can also enable Treat consecutive delimiters as one for files where extra spaces or tabs appear between fields, and you can set a Text Qualifier (usually a double quote) to handle fields that contain the delimiter character inside quoted strings.
Step three is the most important and the most often skipped. Here you assign a data type to each column: General, Text, Date, or Do Not Import (Skip). For columns containing leading zeros, product codes, ZIP codes, or any identifier that begins with 0, you must select Text. If you leave them as General, Excel will strip the zero and you will silently lose data. For date columns, choose the exact format the source uses (MDY, DMY, or YMD) to avoid the notorious flip where 03/04/2026 becomes April third instead of March fourth.
Once you click Finish, Excel asks where to place the data. You can drop it into the existing sheet starting at a specific cell, or send it to a new sheet. The latter is usually safer because it preserves any formulas, formatting, or notes you already have in the workbook. After import, save the file immediately as .xlsx or .xlsm to preserve your column data types — saving back to .txt or .csv will erase them.
One of the wizard's hidden strengths is repeatability through the Refresh feature. When you import via the wizard, Excel can remember the source path and settings if you tick External Data Properties. Right-clicking the imported range and choosing Refresh re-runs the import using the saved configuration. This is handy for daily exports but less powerful than Power Query, which we cover in detail later. For users who need to combine the import with lookups, knowing how to write a vlookup excel formula immediately after import unlocks fast cross-referencing against master tables.
A final tip: if the wizard does not appear at all when you open a .txt file, check that the Trust Center has not blocked external content. Also confirm the file extension actually is .txt — some systems export files with no extension or with .log, and Excel may not associate those with the wizard. Renaming or saving as .txt before opening solves this 90% of the time.
Delimiters, Encoding & Formats You Will Encounter
Comma is the most common delimiter, used in CSV exports from every major database, CRM, and accounting platform. Tab is the second most common, especially in scientific data and bioinformatics. Semicolons appear frequently in European exports because comma is reserved as the decimal separator in many EU locales.
Pipe (|) and caret (^) show up in healthcare HL7 messages and older financial systems. Whenever you open a file, glance at the first three lines in Notepad to identify the separator before launching the wizard. Misidentifying the delimiter is the single largest cause of failed txt to Excel imports across every industry.
Text Import Wizard vs Power Query: Which Should You Use?
- +Power Query refreshes imports automatically when the source file changes
- +Power Query handles folders of files, combining hundreds in one operation
- +Power Query preserves transformation steps so you can audit logic later
- +Power Query supports much larger files without freezing the application
- +Power Query connects to web sources, databases, and SharePoint in addition to text
- +Power Query lets you unpivot, merge, and split columns without writing formulas
- −Power Query has a steeper learning curve for first-time users
- −The Text Import Wizard is faster for genuine one-off imports under 10,000 rows
- −Power Query queries can break silently if source folders move or rename
- −Older Excel versions before 2016 lack Power Query without an add-in
- −Refresh times on Power Query can be slow for poorly written queries
- −Sharing workbooks with Power Query requires colleagues to have compatible Excel versions
Pre-Import Quality Checklist for TXT to Excel
- ✓Open the file in Notepad or VS Code to identify delimiter and encoding before importing
- ✓Confirm the file uses consistent line endings throughout (CRLF, LF, or CR)
- ✓Count expected columns in the header row and compare to a sample data row
- ✓Identify columns that must remain text — IDs, ZIP codes, phone numbers, account numbers
- ✓Note the exact date format used (MDY, DMY, or YMD) for proper conversion
- ✓Check for embedded delimiters inside quoted fields that require a text qualifier
- ✓Verify file size — files over 500 MB should use Power Query, not the legacy wizard
- ✓Make a backup copy of the original .txt file before any conversion steps
- ✓Decide target location — new sheet versus existing cell range — to avoid overwrites
- ✓Plan validation rules to run immediately after import to catch silent data corruption
Always import IDs as Text
The number-one cause of post-import frustration is Excel converting numeric-looking identifiers to General format. Account numbers like 0012345 become 12345, sixteen-digit credit card stubs convert to scientific notation like 1.23457E+15, and SKUs lose precision. Forcing those columns to Text during step three of the wizard takes two extra seconds and saves hours of cleanup later.
Power Query is the modern answer to repeatable txt to Excel conversion and has been built into Excel since the 2016 release under the name Get & Transform. To use it, go to Data > Get Data > From File > From Text/CSV, then select your file. A preview window appears showing the first 200 rows alongside detected delimiter, encoding, and data type guesses. You can accept the preview and Load the data directly into a worksheet, or click Transform Data to open the full Power Query Editor for fine-grained adjustments.
Inside the editor, every action you take — promoting headers, changing data types, removing columns, filtering rows — is recorded as a step in the Applied Steps panel on the right. This recorded list becomes your import recipe. The next time the source file refreshes, the entire recipe replays automatically, giving you a reliable pipeline that does not depend on remembering manual clicks. For weekly or monthly reports, this is transformative.
A particularly powerful feature is combining files from a folder. Choose Get Data > From File > From Folder and point Power Query at a directory containing multiple text files with the same structure. The query stacks them all into a single table and appends new files automatically as they appear. This pattern is ideal for daily log dumps, branch-level sales exports, or any workflow that produces one file per period or per location.
Performance is another reason to prefer Power Query for serious work. Because it streams data and does not require loading the entire file into memory at once, it handles files in the hundreds of megabytes that would freeze the legacy wizard. You can also choose Load To > Connection Only to keep large datasets out of the worksheet entirely, then pull subsets into PivotTables on demand using the Data Model. This keeps workbook size small and refresh times short.
Power Query transformations are written in a functional language called M. You do not need to learn M to be productive — the graphical editor generates it for you — but glancing at the Advanced Editor occasionally helps you understand exactly what the query does. Useful built-in transformations include Trim and Clean for messy text, Split Column by Delimiter for compound fields, Pivot and Unpivot for restructuring layouts, and Merge Queries for joining text imports with reference tables.
One small caveat: when sharing a workbook that contains Power Query connections, recipients must have a compatible Excel version and access to the underlying source file path. If the source lives on a network drive that the recipient cannot reach, the refresh fails. Best practice is to store source files in a shared OneDrive or SharePoint folder and use the cloud path in the query so any colleague with access can refresh. After loading data, many users apply how to freeze a row in excel techniques to keep headers visible while scrolling through the imported rows.
Finally, Power Query plays beautifully with downstream Excel features. You can pull data into a Table, then build PivotTables, charts, and dashboards on top. Because the Table refreshes when the query refreshes, every connected visual updates with one click. Combined with Power Pivot for advanced modeling and Power BI for publishing, Power Query forms the entry point to Microsoft's entire self-service analytics stack — all starting from that humble text file you imported five minutes ago.
Excel aggressively interprets anything that looks remotely like a date and converts it. Gene names like SEPT2 become September 2nd, fractions like 1/2 become January 2nd, and European-format dates flip month and day. Always preview your data carefully and force suspect columns to Text during import. Once the conversion happens, the original value is gone and there is no automatic way to recover it without re-importing from source.
Even with the right method, things go wrong. The most common error is a column-count mismatch where some rows have more or fewer fields than the header. This usually means a delimiter character appears unescaped inside a data value — a comma inside an address, for example. The fix is to ensure source data uses a text qualifier (double quotes are standard) and that you enable Text Qualifier in the import settings. If you cannot fix the source, switch to a different delimiter like the pipe character that is unlikely to appear inside data.
Garbled characters — question marks, square boxes, or odd accents — almost always indicate an encoding mismatch. The file might be UTF-8 while Excel is reading it as ANSI, or vice versa. Cycle through 65001 (UTF-8), 1252 (Western European), and 1200 (UTF-16) in the File Origin dropdown until names and accents render correctly. For Asian languages, you may need to install additional language packs in Windows before the relevant code pages appear in the dropdown.
Missing rows after import usually trace to inconsistent line endings or unexpected end-of-file markers. Open the file in Notepad++ and use View > Show Symbol > Show All Characters to make hidden bytes visible. Convert all line endings to Windows (CRLF) using Edit > EOL Conversion, then save and reimport. If rows still go missing, check for Ctrl-Z bytes (0x1A), which old DOS programs treated as end-of-file and which can prematurely terminate Excel's read operation.
Numbers stored as text are another frequent headache. After import, summing a column returns zero because Excel sees the values as text strings. The quickest fix is to select the range, click the warning triangle that appears, and choose Convert to Number. For larger datasets, use the VALUE function in a helper column or run Data > Text to Columns > Finish on the column without changing any settings — that small trick forces Excel to re-evaluate the data type without altering values.
Power Query connections can also break in predictable ways. The most frequent cause is a source file or folder being moved or renamed. Go to Data > Queries & Connections, right-click the broken query, choose Edit, and update the Source step to the new path. If the file structure has changed — a new column was added, for example — you may need to refresh the data type and renaming steps as well. Saving queries pointing at OneDrive paths rather than mapped drive letters prevents most relocation issues.
Finally, performance complaints usually have one of three causes: too many columns set to Auto data-type detection, too many transformation steps that could be combined, or queries that materialize huge intermediate tables. The fix is to remove unneeded columns as early as possible in the query, batch type conversions into one step, and load very large tables only to the Data Model rather than to a worksheet. These three changes routinely cut refresh times from minutes to seconds on real-world imports.
Once your text file is safely converted into a spreadsheet, the real value comes from what you do next. Start by formatting the data as an Excel Table using Ctrl+T. Tables auto-extend when new rows arrive, propagate formulas down the entire column, and provide built-in filtering and sorting. They also assign structured references like Table1[Sales] that make formulas far more readable than plain A1 notation, especially when you collaborate with colleagues who inherit the workbook later.
Validation is the next priority. Add Data Validation rules to critical columns so future manual edits cannot break the dataset. For example, a Country column might restrict input to a named list, while an Order Quantity column might enforce values between 1 and 10,000. If users will pick from a finite set of options, learn how to create a drop down list in excel — it takes 30 seconds and prevents typos that would otherwise corrupt downstream PivotTables and lookups.
Deduplication should happen early and often. Imported text files often contain duplicate header rows when multiple exports are concatenated, or repeated transactions when an export script runs twice. Select your data range and use Data > Remove Duplicates. Excel previews how many duplicates were found and how many remain. For audit trails, copy the data to a separate sheet first so you have a record of what was removed. Pairing dedup with conditional formatting that highlights duplicates is an even safer workflow.
For polished reports, presentation matters as much as accuracy. Use cell formatting — currency, percentage, custom date masks — to make numbers readable at a glance. Apply alternating row shading via the Table Styles gallery, and freeze the header row so it remains visible while you scroll. If a single cell needs to span multiple columns visually for a title, learn how to merge cells in excel, but use merging sparingly because merged cells interfere with sorting and filtering.
Automation is the final frontier. If you import the same file weekly, save your Power Query and create a macro that refreshes all queries with a single button. Better yet, schedule a Power Automate flow that downloads the file from email or SharePoint, drops it in the source folder, and emails you when the workbook has refreshed. These pipelines turn a 30-minute Monday morning chore into a 30-second confirmation click and free you to focus on analysis rather than mechanics.
Documentation is often skipped but pays huge dividends. Add a small README sheet to every workbook describing where the source data comes from, when it refreshes, who owns it, and what each column means. Future you — or the colleague who inherits the file in three years — will be enormously grateful. Include a screenshot of any tricky Power Query steps and note any manual cleanup that happens after refresh. Good documentation turns a fragile one-person workbook into a reliable team asset.
The path from raw text file to polished, validated, refreshable Excel workbook is short once you know the steps. Choose the right import method for the file size and frequency, force critical columns to text, validate immediately, and document everything. Within a few converted files you will develop personal rhythms and shortcuts that make new imports almost effortless, and you will have built a foundation for every analysis, dashboard, and report that follows.
Excel Questions and Answers
About the Author
Business Consultant & Professional Certification Advisor
Wharton School, University of PennsylvaniaKatherine Lee earned her MBA from the Wharton School at the University of Pennsylvania and holds CPA, PHR, and PMP certifications. With a background spanning corporate finance, human resources, and project management, she has coached professionals preparing for CPA, CMA, PHR/SPHR, PMP, and financial services licensing exams.




