ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   import data from .txt to excel (https://www.excelbanter.com/excel-discussion-misc-queries/46429-import-data-txt-excel.html)

Mandeep Dhami

import data from .txt to excel
 
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

Stefi

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:

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


Mandeep Dhami

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

"Stefi" wrote:

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:

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


Stefi

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:

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

"Stefi" wrote:

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:

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


Mandeep Dhami

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

"Stefi" wrote:

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:

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

"Stefi" wrote:

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:

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


Stefi

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


€˛Mandeep Dhami€¯ ezt Ć*rta:

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

"Stefi" wrote:

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:

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

"Stefi" wrote:

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:

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


Stefi

Yes, it seems a good idea, send the file to
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



All times are GMT +1. The time now is 02:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com