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.


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
November 16, 2019

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

    Leave a Message

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

    EC Analytics will help your business make better decisions by providing expert-level business intelligence (BI) services. Forecasting, strategy, optimization, performance analysis, trend analysis, customer analysis, budget planning, financial reporting and more. EC Analytics also offers Advanced Data Analytics training in corporate and retail.

    Social Media



    0124- 4601426

    EC Analytics Consulting @ 2019 ALL RIGHTS RESERVED