Hi,
I have a txt file with a lot of data which im trying to export to excel. The
data is not seperated by any comma, space or anything. All the data is
together but i know how many characters goes into each cell of every column.
I dont want to go thru fixed length wizard as it takes a lot of time. Can
anyone help me with this plz?
EX: The format of the 1st line in txt file is
04MKK 9900000001/ 2INSUINSU23234563 / /
/ / / // /
/ //CRS Insured Name 1
CRS2 Insured Name 1
/ / / / /// / // 1100000001
M// /
New
I cannot consider spaces to delimt the file as there is no data for some
records in those spaces but some do. lets say the first cell of the 1st
column is 3 charachters, 1st cell of second column should have 2 char etc.
The ultimate format shld be like this
04M KK 9900000001 / /
quot;nickquot; gt; wrote in message
...
gt; Hi,
gt;
gt; I have a txt file with a lot of data which im trying to export to excel.
gt; The
gt; data is not seperated by any comma, space or anything. All the data is
gt; together but i know how many characters goes into each cell of every
gt; column.
gt; I dont want to go thru fixed length wizard as it takes a lot of time. Can
gt; anyone help me with this plz?
gt;
gt; EX: The format of the 1st line in txt file is
gt; 04MKK 9900000001/ 2INSUINSU23234563 / /
gt; / / / // /
gt; / //CRS Insured Name 1
gt; CRS2 Insured Name 1
gt; / / / / /// / // 1100000001
gt; M// /
gt; New
gt;
gt; I cannot consider spaces to delimt the file as there is no data for some
gt; records in those spaces but some do. lets say the first cell of the 1st
gt; column is 3 charachters, 1st cell of second column should have 2 char etc.
gt; The ultimate format shld be like this
gt;
gt; 04M KK 9900000001 / /
gt;
gt;
gt;
Nick, you posted this question yesterday. It would be best for you if you'd
stay with one conversation so we can narrow things down. Now, onward:
1) Question: Why do you think the slashes cannot be gotten rid of
completely? Whoever sent you this file - do they say you have to keep the
slashes?
2) Question: You said you don't want to use the wizard because it takes too
much time. How often do you need to import this file?
Hi,
Yes the slashes have to be there. wherever u see spaces and slashes, they r
considered as characters as well which means, they could go in to any cell.
bottom line is i cant get rid of anything from there...no letters, spaces,
slashes...nothing. every cell has a fixed character irreespective of letters,
numbers, spaces, / etc.
I dont wanna use the wizard as i have 5 files like these for now and they
keep getting updated very often.
Thank you
quot;Doug Kanterquot; wrote:
gt;
gt; quot;nickquot; gt; wrote in message
gt; ...
gt; gt; Hi,
gt; gt;
gt; gt; I have a txt file with a lot of data which im trying to export to excel.
gt; gt; The
gt; gt; data is not seperated by any comma, space or anything. All the data is
gt; gt; together but i know how many characters goes into each cell of every
gt; gt; column.
gt; gt; I dont want to go thru fixed length wizard as it takes a lot of time. Can
gt; gt; anyone help me with this plz?
gt; gt;
gt; gt; EX: The format of the 1st line in txt file is
gt; gt; 04MKK 9900000001/ 2INSUINSU23234563 / /
gt; gt; / / / // /
gt; gt; / //CRS Insured Name 1
gt; gt; CRS2 Insured Name 1
gt; gt; / / / / /// / // 1100000001
gt; gt; M// /
gt; gt; New
gt; gt;
gt; gt; I cannot consider spaces to delimt the file as there is no data for some
gt; gt; records in those spaces but some do. lets say the first cell of the 1st
gt; gt; column is 3 charachters, 1st cell of second column should have 2 char etc.
gt; gt; The ultimate format shld be like this
gt; gt;
gt; gt; 04M KK 9900000001 / /
gt; gt;
gt; gt;
gt; gt;
gt;
gt; Nick, you posted this question yesterday. It would be best for you if you'd
gt; stay with one conversation so we can narrow things down. Now, onward:
gt;
gt; 1) Question: Why do you think the slashes cannot be gotten rid of
gt; completely? Whoever sent you this file - do they say you have to keep the
gt; slashes?
gt;
gt; 2) Question: You said you don't want to use the wizard because it takes too
gt; much time. How often do you need to import this file?
gt;
gt;
gt;
quot;nickquot; gt; wrote in message
...
gt; quot;Doug Kanterquot; wrote:
gt;gt; quot;nickquot; gt; wrote in message
gt;gt; ...
gt;gt; gt; Hi,
gt;gt; gt;
gt;gt; gt; I have a txt file with a lot of data which im trying to export to
gt;gt; gt; excel.
gt;gt; gt; The
gt;gt; gt; data is not seperated by any comma, space or anything. All the data is
gt;gt; gt; together but i know how many characters goes into each cell of every
gt;gt; gt; column.
gt;gt; gt; I dont want to go thru fixed length wizard as it takes a lot of time.
gt;gt; gt; Can
gt;gt; gt; anyone help me with this plz?
gt;gt; gt;
gt;gt; gt; EX: The format of the 1st line in txt file is
gt;gt; gt; 04MKK 9900000001/ 2INSUINSU23234563 / /
gt;gt; gt; / / / // /
gt;gt; gt; / //CRS Insured Name 1
gt;gt; gt; CRS2 Insured Name 1
gt;gt; gt; / / / / /// / // 1100000001
gt;gt; gt; M// /
gt;gt; gt; New
gt;gt; gt;
gt;gt; gt; I cannot consider spaces to delimt the file as there is no data for
gt;gt; gt; some
gt;gt; gt; records in those spaces but some do. lets say the first cell of the 1st
gt;gt; gt; column is 3 charachters, 1st cell of second column should have 2 char
gt;gt; gt; etc.
gt;gt; gt; The ultimate format shld be like this
gt;gt; gt;
gt;gt; gt; 04M KK 9900000001 / /
gt;gt; gt;
gt;gt; gt;
gt;gt; gt;
gt;gt;
gt;gt; Nick, you posted this question yesterday. It would be best for you if
gt;gt; you'd
gt;gt; stay with one conversation so we can narrow things down. Now, onward:
gt;gt;
gt;gt; 1) Question: Why do you think the slashes cannot be gotten rid of
gt;gt; completely? Whoever sent you this file - do they say you have to keep the
gt;gt; slashes?
gt;gt;
gt;gt; 2) Question: You said you don't want to use the wizard because it takes
gt;gt; too
gt;gt; much time. How often do you need to import this file?
gt;gt;
gt;gt;
gt;gt;gt; Hi,
gt;
gt; Yes the slashes have to be there. wherever u see spaces and slashes, they
gt; r
gt; considered as characters as well which means, they could go in to any
gt; cell.
gt; bottom line is i cant get rid of anything from there...no letters, spaces,
gt; slashes...nothing. every cell has a fixed character irreespective of
gt; letters,
gt; numbers, spaces, / etc.
gt;
gt; I dont wanna use the wizard as i have 5 files like these for now and they
gt; keep getting updated very often.
gt;
gt; Thank you
Assuming that the field widths are consistent, you can record a macro while
going through the fixed length import steps manually. The macro will not
only record the steps you take, but also the name of the text file you
opened. So, assuming the 5 file names remain the same (or that you can
rename them with a consistent pattern), this will work fine. Once you're
sure the macros work, you could attach them to custom toolbar buttons so
this becomes a one-click operation for each file.
Within Excel, this is your only choice.
There may be other possibilities if you can tell me what software produced
the original text files.
Hi doug,
Thanx a lot for your help. it definitely cuts down my work later when these
files are updated. one thing is that every file and even in every file, every
cell has different widths. Its not consistant. but one thing i cld definitely
do with your advise is when these files get updated, the width is still gonna
be the same for that particular file. about the software, the company has its
own database which produces these files.
Thank you very much. Please do let me know if you could come up with any
other ideas. thanks
quot;Doug Kanterquot; wrote:
gt; quot;nickquot; gt; wrote in message
gt; ...
gt;
gt; gt; quot;Doug Kanterquot; wrote:
gt; gt;gt; quot;nickquot; gt; wrote in message
gt; gt;gt; ...
gt; gt;gt; gt; Hi,
gt; gt;gt; gt;
gt; gt;gt; gt; I have a txt file with a lot of data which im trying to export to
gt; gt;gt; gt; excel.
gt; gt;gt; gt; The
gt; gt;gt; gt; data is not seperated by any comma, space or anything. All the data is
gt; gt;gt; gt; together but i know how many characters goes into each cell of every
gt; gt;gt; gt; column.
gt; gt;gt; gt; I dont want to go thru fixed length wizard as it takes a lot of time.
gt; gt;gt; gt; Can
gt; gt;gt; gt; anyone help me with this plz?
gt; gt;gt; gt;
gt; gt;gt; gt; EX: The format of the 1st line in txt file is
gt; gt;gt; gt; 04MKK 9900000001/ 2INSUINSU23234563 / /
gt; gt;gt; gt; / / / // /
gt; gt;gt; gt; / //CRS Insured Name 1
gt; gt;gt; gt; CRS2 Insured Name 1
gt; gt;gt; gt; / / / / /// / // 1100000001
gt; gt;gt; gt; M// /
gt; gt;gt; gt; New
gt; gt;gt; gt;
gt; gt;gt; gt; I cannot consider spaces to delimt the file as there is no data for
gt; gt;gt; gt; some
gt; gt;gt; gt; records in those spaces but some do. lets say the first cell of the 1st
gt; gt;gt; gt; column is 3 charachters, 1st cell of second column should have 2 char
gt; gt;gt; gt; etc.
gt; gt;gt; gt; The ultimate format shld be like this
gt; gt;gt; gt;
gt; gt;gt; gt; 04M KK 9900000001 / /
gt; gt;gt; gt;
gt; gt;gt; gt;
gt; gt;gt; gt;
gt; gt;gt;
gt; gt;gt; Nick, you posted this question yesterday. It would be best for you if
gt; gt;gt; you'd
gt; gt;gt; stay with one conversation so we can narrow things down. Now, onward:
gt; gt;gt;
gt; gt;gt; 1) Question: Why do you think the slashes cannot be gotten rid of
gt; gt;gt; completely? Whoever sent you this file - do they say you have to keep the
gt; gt;gt; slashes?
gt; gt;gt;
gt; gt;gt; 2) Question: You said you don't want to use the wizard because it takes
gt; gt;gt; too
gt; gt;gt; much time. How often do you need to import this file?
gt; gt;gt;
gt; gt;gt;
gt; gt;gt;
gt;
gt;
gt; gt; Hi,
gt; gt;
gt; gt; Yes the slashes have to be there. wherever u see spaces and slashes, they
gt; gt; r
gt; gt; considered as characters as well which means, they could go in to any
gt; gt; cell.
gt; gt; bottom line is i cant get rid of anything from there...no letters, spaces,
gt; gt; slashes...nothing. every cell has a fixed character irreespective of
gt; gt; letters,
gt; gt; numbers, spaces, / etc.
gt; gt;
gt; gt; I dont wanna use the wizard as i have 5 files like these for now and they
gt; gt; keep getting updated very often.
gt; gt;
gt; gt; Thank you
gt;
gt; Assuming that the field widths are consistent, you can record a macro while
gt; going through the fixed length import steps manually. The macro will not
gt; only record the steps you take, but also the name of the text file you
gt; opened. So, assuming the 5 file names remain the same (or that you can
gt; rename them with a consistent pattern), this will work fine. Once you're
gt; sure the macros work, you could attach them to custom toolbar buttons so
gt; this becomes a one-click operation for each file.
gt;
gt; Within Excel, this is your only choice.
gt;
gt; There may be other possibilities if you can tell me what software produced
gt; the original text files.
gt;
gt;
gt;
quot;nickquot; gt; wrote in message
...
gt; Hi doug,
gt;
gt; Thanx a lot for your help. it definitely cuts down my work later when
gt; these
gt; files are updated. one thing is that every file and even in every file,
gt; every
gt; cell has different widths. Its not consistant. but one thing i cld
gt; definitely
gt; do with your advise is when these files get updated, the width is still
gt; gonna
gt; be the same for that particular file.
Then, record a different macro for each file. We're talking what....2
minutes each for this step?gt; about the software, the company has its
gt; own database which produces these files.
I'll bet you a year's pay that if you spoke to the right person, they could
provide you with much better text files. Mainframe geeks will get away with
anything they can until someone calls and they realize their sloppiness has
been noticed. Ask for something better. They may be able to give you a very
generic and dependable format like .DBF (ask about that). Or, a real fixed
length file, or somehow delimited.
quot;nickquot; gt; wrote in message
...
gt; Hi,
gt;
gt; I have a txt file with a lot of data which im trying to export to excel.
gt; The
gt; data is not seperated by any comma, space or anything. All the data is
gt; together but i know how many characters goes into each cell of every
gt; column.
gt; I dont want to go thru fixed length wizard as it takes a lot of time. Can
gt; anyone help me with this plz?
gt;
gt; EX: The format of the 1st line in txt file is
gt; 04MKK 9900000001/ 2INSUINSU23234563 / /
gt; / / / // /
gt; / //CRS Insured Name 1
gt; CRS2 Insured Name 1
gt; / / / / /// / // 1100000001
gt; M// /
gt; New
gt;
gt; I cannot consider spaces to delimt the file as there is no data for some
gt; records in those spaces but some do. lets say the first cell of the 1st
gt; column is 3 charachters, 1st cell of second column should have 2 char etc.
gt; The ultimate format shld be like this
gt;
gt; 04M KK 9900000001 / /
gt;
gt;
gt;
TIME OUT! HANG ON A MINUTE! The presence of the slashes makes absolutely no
sense. Is it possible that THOSE are your delimiters? Right now, just for
grins, try using Excel's delimited import method. On the 2nd screen, unclick
TAB, click Other, and put a slash in the box to the right of other.
You said those slashes existed as data, but why? It makes no sense, if the
sample above is any indication. What possible meaning could all those
slashes have?
Hi,
Ok, the process here is...they r transfering all the data from one
application to the other. the slashes are nothing but an indication to input
all the / fields manually in the new system. Hope whateva i said makes sense.
its part of SAP implementation. The new system is SAP
quot;Doug Kanterquot; wrote:
gt; quot;nickquot; gt; wrote in message
gt; ...
gt; gt; Hi,
gt; gt;
gt; gt; I have a txt file with a lot of data which im trying to export to excel.
gt; gt; The
gt; gt; data is not seperated by any comma, space or anything. All the data is
gt; gt; together but i know how many characters goes into each cell of every
gt; gt; column.
gt; gt; I dont want to go thru fixed length wizard as it takes a lot of time. Can
gt; gt; anyone help me with this plz?
gt; gt;
gt; gt; EX: The format of the 1st line in txt file is
gt; gt; 04MKK 9900000001/ 2INSUINSU23234563 / /
gt; gt; / / / // /
gt; gt; / //CRS Insured Name 1
gt; gt; CRS2 Insured Name 1
gt; gt; / / / / /// / // 1100000001
gt; gt; M// /
gt; gt; New
gt; gt;
gt; gt; I cannot consider spaces to delimt the file as there is no data for some
gt; gt; records in those spaces but some do. lets say the first cell of the 1st
gt; gt; column is 3 charachters, 1st cell of second column should have 2 char etc.
gt; gt; The ultimate format shld be like this
gt; gt;
gt; gt; 04M KK 9900000001 / /
gt; gt;
gt; gt;
gt; gt;
gt;
gt; TIME OUT! HANG ON A MINUTE! The presence of the slashes makes absolutely no
gt; sense. Is it possible that THOSE are your delimiters? Right now, just for
gt; grins, try using Excel's delimited import method. On the 2nd screen, unclick
gt; TAB, click Other, and put a slash in the box to the right of other.
gt;
gt; You said those slashes existed as data, but why? It makes no sense, if the
gt; sample above is any indication. What possible meaning could all those
gt; slashes have?
gt;
gt;
gt;
can i use left function? can u help me out how i use this function? like ex:
=LEFT(o_CRSF_BP_20060213.txt!$A$1,Sheet1!B1)
=left(txt file,i inserted all the char len in row b( lets say in this case
its 2))
When i did the above function, it gives me the first 2 chars of that txt
file. in the same way can i use left func in cell 2 starting with 3 char of
that txt file till what ever the char length for that cell is?
quot;nickquot; wrote:
gt; Hi,
gt;
gt; Ok, the process here is...they r transfering all the data from one
gt; application to the other. the slashes are nothing but an indication to input
gt; all the / fields manually in the new system. Hope whateva i said makes sense.
gt; its part of SAP implementation. The new system is SAP
gt;
gt; quot;Doug Kanterquot; wrote:
gt;
gt; gt; quot;nickquot; gt; wrote in message
gt; gt; ...
gt; gt; gt; Hi,
gt; gt; gt;
gt; gt; gt; I have a txt file with a lot of data which im trying to export to excel.
gt; gt; gt; The
gt; gt; gt; data is not seperated by any comma, space or anything. All the data is
gt; gt; gt; together but i know how many characters goes into each cell of every
gt; gt; gt; column.
gt; gt; gt; I dont want to go thru fixed length wizard as it takes a lot of time. Can
gt; gt; gt; anyone help me with this plz?
gt; gt; gt;
gt; gt; gt; EX: The format of the 1st line in txt file is
gt; gt; gt; 04MKK 9900000001/ 2INSUINSU23234563 / /
gt; gt; gt; / / / // /
gt; gt; gt; / //CRS Insured Name 1
gt; gt; gt; CRS2 Insured Name 1
gt; gt; gt; / / / / /// / // 1100000001
gt; gt; gt; M// /
gt; gt; gt; New
gt; gt; gt;
gt; gt; gt; I cannot consider spaces to delimt the file as there is no data for some
gt; gt; gt; records in those spaces but some do. lets say the first cell of the 1st
gt; gt; gt; column is 3 charachters, 1st cell of second column should have 2 char etc.
gt; gt; gt; The ultimate format shld be like this
gt; gt; gt;
gt; gt; gt; 04M KK 9900000001 / /
gt; gt; gt;
gt; gt; gt;
gt; gt; gt;
gt; gt;
gt; gt; TIME OUT! HANG ON A MINUTE! The presence of the slashes makes absolutely no
gt; gt; sense. Is it possible that THOSE are your delimiters? Right now, just for
gt; gt; grins, try using Excel's delimited import method. On the 2nd screen, unclick
gt; gt; TAB, click Other, and put a slash in the box to the right of other.
gt; gt;
gt; gt; You said those slashes existed as data, but why? It makes no sense, if the
gt; gt; sample above is any indication. What possible meaning could all those
gt; gt; slashes have?
gt; gt;
gt; gt;
gt; gt;
quot;nickquot; gt; wrote in message
...
gt; Hi,
gt;
gt; Ok, the process here is...they r transfering all the data from one
gt; application to the other. the slashes are nothing but an indication to
gt; input
gt; all the / fields manually in the new system. Hope whateva i said makes
gt; sense.
gt; its part of SAP implementation. The new system is SAP
They can definitely give you a better file to work with. Just ask.
- Aug 14 Mon 2006 20:09
Pls help! Txt to Xls
close
全站熱搜
留言列表
發表留言