Import Text Files into Excel through VBA

Share Now


Import Text files through Excel VBA, There are two ways to import data from text file into MS Excel, Here we are using VBA code to import data. In Excel 2007 you can import or export up to 1,048,576 rows and 16,384 columns.

Exercise:

Suppose all your text files are saved in common folder of “D:” Drive. In the same folder your Summary Excel Workbook is also saved in which you want to import all your text file data. Text File name is passed in “Column B” of you worksheet and Result will be Collete in “Column D”.

OR you can save in any drive with common folder for text file and worksheet.

Step 1: Open your Excel VBA Editor (Alr+F11).

Step 2: Write down the below mentioned Code in the Module:

Step3: Run the Macro. (For reference check the attachment (Click Here)).



Share Now
September 23, 2012

0 responses on "Import Text Files into Excel through VBA"

    Leave a Message

    Your email address will not be published. Required fields are marked *

    Tableau Training in Delhi

    All Rights Reserved. EC Analytics Consulting 2014 - 2019.

    NM 23, Sector 14, OLD DLF Colony - Gurgaon (Haryana) India. 9582876837 | Privacy Policy