PDA

View Full Version : Import the text file data into different worksheet of xls based on certain value.



Arun
03-12-2009, 09:15 AM
Hello Gurus -

I need to import the one text file into excel. In Text file i have multiple entries and based on the values of column 2 (which can be as different result set) i need to import the text file data into multiple worksheet based on the values of column 2 so that new work sheet gets created and worksheet name also gets created based on the values of Column2.

I want that column1 data of text file goes to column1 of worksheet1, column2 values goes to column2 worksheet1 etc and different worksheet gets created based on the different state/name field values like one for Opened another for Withdrawn, another for Development etc .

Kindly help me in this.
Attached is the sample text file for the same.

Note:- In my text fiel there can be more then 2000 entries which gets imported to different worksheet based on the values of column2.

Kindly help . Thanks in advance.

Kenneth Hobs
03-12-2009, 10:04 AM
A bit more clarification is needed. You want to create a new workbook?

Your sheet1 would have 2 columns, and the other sheets would have the same number of columns as in the text file? Meaning, repeat columns 1 and 2. Repeating column 2 would seem redundant on the other sheets.