Here's an example that will open a file named "M圜SVFile.txt" and then stick the data into a new worksheet starting at the first row. (This is the one that I find the fastest and easiest, particularly if you need to import the same type of file quite a bit.) The macro can open the text file, read each line, and then make a determination as to whether the information in that line should be added to the worksheet or not. This is, perhaps, the simplest option if you only need to process a single file and the entire file can fit within a single worksheet.Īnother approach is to use a macro. One is that you could simply import the whole text file, sort the records, and delete those you don't want. There are several ways you can approach this task. As an example, he may want to only import records that contain a "y" in column 5 of each record in the text file. Gordon wonders how he can import a subset of a text file into Excel, depending upon the value of a particular field.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |