import data from .txt to excel

G

Guest

Hi,

I have various report extracted from different applications in .txt format.
I would like to transfer the same report from .txt format to excel.......the
report in .txt is generated on regular basis.
The report in .txt format contains many unwanted fileds. Can we write a
macro to export the data from .txt to excel so that the fileds required can
only be exported to excel.

Please help....

Cheers,
Mandeep
 
G

Guest

The simplest way is to record the process of opening a .txt file with the
wizard as a macro. You will have an option for each column to omit it.

Regards,
Stefi


„Mandeep Dhami†ezt írta:
 
G

Guest

Thanks Stefi.
But this does not solve my query completely.
I think the suggestion given by you can only be done for verticle colomns
but in .txt file after a page breck (new page) all the headings (title rows)
are repeated so I want that the title rows should not be repeated after
exporting in excel.
The .txt document has some where around 100+ pages so the heading rows is
repeated 100+ times which i don't want.

Hope i am able to clear my doubt.......

Cheers,
Mandeep
 
G

Guest

I'm afraid in this case you have to find a criterium to identify title rows
(e.g. they always begin with certain character(s) or contain certain string,
etc.) and this criterium certainly does not apply to your normal data rows.
Create a macro which recognizes and delete title rows, and place it in
Sub Workbook_Open()

Regards,
Stefi


„Mandeep Dhami†ezt írta:
 
G

Guest

Thanks for the reply.
But Stefi.....I don't how to use criterium to identify the title rows and
write MACRO's for that.
I just know to how to record macro and not to write a macro. If you could
write a macro for me as an example so that I can copy that and make necessary
adjustment as required in actual case.
If you do require any other info. do let me know.

Cheers,
Manseep
 
G

Guest

Copy here a title row and two or three data rows!
Stefi


„Mandeep Dhami†ezt írta:
 
G

Guest

Yes, it seems a good idea, send the file to (e-mail address removed)
It also would help, if you could give me the column headers of the expected
xl table and the first data row like this (with real data from the attached
file):

header text 1 header text 2 ...
value value

Stefi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top