ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   copy from multicolumn .txt document (https://www.excelbanter.com/excel-programming/375562-copy-multicolumn-txt-document.html)

rea

copy from multicolumn .txt document
 
can somebody help me...
i have a .txt wich holds data in 5 or six colums separated with sign
",".
i manage to copy data from .txt wich holds only one column, but i dont
know how to solve this problem.i need to copy only 1 column from .txt
(lets say third) to .xls .
the number of rows is huge.


NickHK

copy from multicolumn .txt document
 
You can either change the extension to .csv and Excel should open it
normally.
Or in Excel, go FileOpen and follow the steps.
Either way, you can then copy and work the data in Excel.

NickHK

"rea" wrote in message
oups.com...
can somebody help me...
i have a .txt wich holds data in 5 or six colums separated with sign
",".
i manage to copy data from .txt wich holds only one column, but i dont
know how to solve this problem.i need to copy only 1 column from .txt
(lets say third) to .xls .
the number of rows is huge.




rea

copy from multicolumn .txt document
 
it is one solution, but i need to have a code, becuse mz txt is
generated from another program wich recives data from rs232... so it is
a bit complicated,but the point is that i need to code.


rea

copy from multicolumn .txt document
 
it is one solution, but i need to have a code, becuse mz txt is
generated from another program wich recives data from rs232... so it is
a bit complicated,but the point is that i need to code.


NickHK

copy from multicolumn .txt document
 
Well, record the macro of the Open file option and see the code.

As for the rename, use
Name "mz.txt" As "mz.csv"
adding paths as required.

NickHK

"rea" wrote in message
oups.com...
it is one solution, but i need to have a code, becuse mz txt is
generated from another program wich recives data from rs232... so it is
a bit complicated,but the point is that i need to code.




rea

copy from multicolumn .txt document
 
thnx, but it wont solve my problem for good.
because i need to use variables.i am planning to expand the main code,
but i am missing small piece of code wich would put the selector to a
third colmn of .txt
thnx


NickHK

copy from multicolumn .txt document
 
If you can do it manually, you can (normally) generate the code for the
actions.
Show the code you get and explain why it is not the desired result.

NickHK

"rea" wrote in message
ps.com...
thnx, but it wont solve my problem for good.
because i need to use variables.i am planning to expand the main code,
but i am missing small piece of code wich would put the selector to a
third colmn of .txt
thnx




Tom Ogilvy

copy from multicolumn .txt document
 
You can also look at this page an perhaps adapt it to your requirements

http://www.cpearson.com/excel/imptext.htm import/export text files

--
Regards,
Tom Ogilvy


"rea" wrote:

thnx, but it wont solve my problem for good.
because i need to use variables.i am planning to expand the main code,
but i am missing small piece of code wich would put the selector to a
third colmn of .txt
thnx




All times are GMT +1. The time now is 09:23 AM.

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