You routinely use drag-and-drop to open files in Windows and are wondering if you can do the same with text files in Excel.
Yes, you can. Simply drag the text file and drop it on Excel's window.
While this sounds trivial, you'll quickly realize that dragging and dropping a text file into a spreadsheet does not always yield the results you'd like. Take a look at the example shown in Figure 3-7.
Figure 3-7. Text imported by drag-and-drop
The data contained in the text file was indeed loaded into the spreadsheet; however, all of the data on each line in the text file was lumped into a single cell (in column A) on each row in the spreadsheet. In this form, the data is treated as text and you can't perform analyses on the data or plot it on a chart. You need to parse the data in order put it in a useful form, i.e., separate the data into columns. See Recipe 3.6 to learn how to convert text like that shown in Figure 3-7 to columns of data.
See Recipe 3.6 to learn how to convert strings of text to useful columns of data.
Also, take a look at Recipes 3.1, 3.2, 3.4, and 3.5 for alternative data-importing techniques.
Getting Acquainted with Visual Basic for Applications
Collecting and Cleaning Up Data
Time Series Analysis
Curve Fitting and Regression
Numerical Integration and Differentiation
Solving Ordinary Differential Equations
Solving Partial Differential Equations
Performing Optimization Analyses in Excel
Introduction to Financial Calculations