This tutorial will demonstrate how to open a .txt file in Excel & Google Sheets
Opening a Text File in Excel
1. In the Ribbon, select File > Open > Browse, and then select the text or csv file to be opened.
The Text Import Wizard will open to the first of three steps.
2. Depending on the data contained in the file selected, you can either choose Delimited or Fixed Width as the file type. If the data is separated with a character like a comma, semicolon, space, or tab, select Delimited. If the first row of data contains column headings, check My data has headers.
3. Click Next to go to the next step.
4. In Step 2, select the type of delimiters contained in the text file – in this case the tab delimiter. Then select the text qualifier. In some cases, the data may be enclosed in quote marks but for this example, (none) is selected as the text qualifier.
5. Click Next to go to the next step.
6. The final step of the text import wizard allows you to specify the data type contained in each column. Most of the time, Excel will be able to determine the data type automatically, and you can leave the selected Column data format on General.
7. Click Finish to import the data into Excel.
Importing a Text File into Excel Using Get Data
An alternative way of importing data into Excel from a text file, is to use the Get and Transform Data function.
In the Ribbon, select Data > Get and Transform Data > From Text/CSV.
Select the file to be imported, and then click Import.
The file will appear in a dialog box with the delimiter already automatically selected, and the text divided by Excel according to the data stored in the text file. Click Load to load the data into Excel.
The data now appears in a new sheet in Excel. There are now two new tabs on the ribbon – Table Design and Query – as well as a Queries & Connections pane appearing on the right hand side of the screen. This shows us that the data is linked to the .txt file and if any data in the .txt file was to change (external to Excel), the data displayed in Excel would change too.
To unlink the imported data from the external .txt file, in the Ribbon, select Table Design > External Table Data > Unlink.
The data is imported into Excel as a table. To convert it to a standard Excel range, in the Ribbon, select Table Design > Tools > Convert to Range.
Both the Table Design and Query tabs on the Ribbon will then disappear.
How to Open a Text (.txt) File in Google Sheets
1. From the File menu in Google Sheets, select Import.
2. Click Upload, and then click on the blue “Select a file from your device” button to select the required file.
The name of the file to be imported will be displayed under File with the default options available for importing automatically selected.
3. To change the Import Location, click the drop down list under Import Location and select the option required.
To change the Separator type, click the drop down list under Separator type and select the separator required.
4. Keep “Convert text to numbers, dates, and formulas” checked and then click Import Data to import the file into Google Sheets.
The dialog box will import the data into a new Google sheet.
5. Click Open now to open the Google sheet.