ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   End of Record symbol (https://www.excelbanter.com/excel-programming/357653-end-record-symbol.html)

Mervyn Thomas

End of Record symbol
 
I am creating a text file within excel and I do not know how to create what
I think is needed and that is an end of line character for each line. The
text is all in column A. The text file that excell creates appears to be
different to the model I am using in Notepad at the end of the line.
Anyone any experience in this?



NickHK

End of Record symbol
 
Mervyn,
If you are just doing a .SaveAs as a text file from Excel, it will take of
that for you.
As long as you are not looking to export this to a UNIX/Mac system, it not a
problem.

If you are using something like "Open MyFile For Output..", then it depends
how you are doing it.

NickHK

"Mervyn Thomas" wrote in message
...
I am creating a text file within excel and I do not know how to create

what
I think is needed and that is an end of line character for each line. The
text is all in column A. The text file that excell creates appears to be
different to the model I am using in Notepad at the end of the line.
Anyone any experience in this?





Patricia Shannon

End of Record symbol
 
What method are you using to create the text file?

"Mervyn Thomas" wrote:

I am creating a text file within excel and I do not know how to create what
I think is needed and that is an end of line character for each line. The
text is all in column A. The text file that excell creates appears to be
different to the model I am using in Notepad at the end of the line.
Anyone any experience in this?




Mervyn Thomas

End of Record symbol
 
I'm using a concatenate function to draw data from Excel fields and so
including for each record the appropriate field lengths such as the
calculation for the first record (all of which is in A1).

=UPPER(CONCATENATE("1ROYTEST1.CSV",TEXT(Import!$G$ 1,"00000000"),TEXT(Import!$H$1,"000000")))

I think my problem which occurs when I import this file into a banking sytem
is that the overall record length is not determined and the import does not
know when the next record starts hence my request for an "end of record"
sybol or something. On ther model I have this record appears to be padded
with blanks up to 180 characters in all. Hope this explains
Mervyn




"Patricia Shannon" wrote in
message ...
What method are you using to create the text file?

"Mervyn Thomas" wrote:

I am creating a text file within excel and I do not know how to create
what
I think is needed and that is an end of line character for each line.
The
text is all in column A. The text file that excell creates appears to be
different to the model I am using in Notepad at the end of the line.
Anyone any experience in this?






Patricia Shannon

End of Record symbol
 
How are you actually getting the info into the text file?
1) Putting the data in an Excel spreadsheet, then doing a Save As to a txt
file
2) Print #
3 Write #
4) FileSystemObject TextStream
a) Write
b) WriteLine
or what?


"Mervyn Thomas" wrote:

I'm using a concatenate function to draw data from Excel fields and so
including for each record the appropriate field lengths such as the
calculation for the first record (all of which is in A1).



=UPPER(CONCATENATE("1ROYTEST1.CSV",TEXT(Import!$G$ 1,"00000000"),TEXT(Import!$H$1,"000000")))

I think my problem which occurs when I import this file into a banking sytem
is that the overall record length is not determined and the import does not
know when the next record starts hence my request for an "end of record"
sybol or something. On ther model I have this record appears to be padded
with blanks up to 180 characters in all. Hope this explains
Mervyn




"Patricia Shannon" wrote in
message ...
What method are you using to create the text file?

"Mervyn Thomas" wrote:

I am creating a text file within excel and I do not know how to create
what
I think is needed and that is an end of line character for each line.
The
text is all in column A. The text file that excell creates appears to be
different to the model I am using in Notepad at the end of the line.
Anyone any experience in this?







Patricia Shannon

End of Record symbol
 
Also, what is happening that leads you to the conclusion that the end of line
characters are non-standard? Is everything on one line or what?


"Mervyn Thomas" wrote:

I'm using a concatenate function to draw data from Excel fields and so
including for each record the appropriate field lengths such as the
calculation for the first record (all of which is in A1).

=UPPER(CONCATENATE("1ROYTEST1.CSV",TEXT(Import!$G$ 1,"00000000"),TEXT(Import!$H$1,"000000")))

I think my problem which occurs when I import this file into a banking sytem
is that the overall record length is not determined and the import does not
know when the next record starts hence my request for an "end of record"
sybol or something. On ther model I have this record appears to be padded
with blanks up to 180 characters in all. Hope this explains
Mervyn




"Patricia Shannon" wrote in
message ...
What method are you using to create the text file?

"Mervyn Thomas" wrote:

I am creating a text file within excel and I do not know how to create
what
I think is needed and that is an end of line character for each line.
The
text is all in column A. The text file that excell creates appears to be
different to the model I am using in Notepad at the end of the line.
Anyone any experience in this?







Mervyn Thomas

End of Record symbol
 
Patricia - I am doing a programatic file save with "FileFormat:=xlText"
which I think is the same as Text (Tab delimited) in Excel. The records
come as seperate lines when viewed in WordPad but when I do an "edit/select
all" the records appear longer than what was defined in the formula and the
model I am working to requires a fixed record length of 179. I have tried a
user defined function called "RightTab" which in excel does seem to provide
a fixed length but the same happens in WordPad - the records are much longer
than the 179 defined.
Thanks for your patience
Mervyn


"Patricia Shannon" wrote in
message ...
Also, what is happening that leads you to the conclusion that the end of
line
characters are non-standard? Is everything on one line or what?


"Mervyn Thomas" wrote:

I'm using a concatenate function to draw data from Excel fields and so
including for each record the appropriate field lengths such as the
calculation for the first record (all of which is in A1).

=UPPER(CONCATENATE("1ROYTEST1.CSV",TEXT(Import!$G$ 1,"00000000"),TEXT(Import!$H$1,"000000")))

I think my problem which occurs when I import this file into a banking
sytem
is that the overall record length is not determined and the import does
not
know when the next record starts hence my request for an "end of record"
sybol or something. On ther model I have this record appears to be
padded
with blanks up to 180 characters in all. Hope this explains
Mervyn




"Patricia Shannon" wrote in
message ...
What method are you using to create the text file?

"Mervyn Thomas" wrote:

I am creating a text file within excel and I do not know how to create
what
I think is needed and that is an end of line character for each line.
The
text is all in column A. The text file that excell creates appears to
be
different to the model I am using in Notepad at the end of the line.
Anyone any experience in this?









Patricia Shannon

End of Record symbol
 
Sorry I haven't replied sooner. I don't have a computer at home. If nobody
else has come up with the answer by then, I'll look at this more closely at
lunch and/or after work.

"Mervyn Thomas" wrote:

Patricia - I am doing a programatic file save with "FileFormat:=xlText"
which I think is the same as Text (Tab delimited) in Excel. The records
come as seperate lines when viewed in WordPad but when I do an "edit/select
all" the records appear longer than what was defined in the formula and the
model I am working to requires a fixed record length of 179. I have tried a
user defined function called "RightTab" which in excel does seem to provide
a fixed length but the same happens in WordPad - the records are much longer
than the 179 defined.
Thanks for your patience
Mervyn


"Patricia Shannon" wrote in
message ...
Also, what is happening that leads you to the conclusion that the end of
line
characters are non-standard? Is everything on one line or what?


"Mervyn Thomas" wrote:

I'm using a concatenate function to draw data from Excel fields and so
including for each record the appropriate field lengths such as the
calculation for the first record (all of which is in A1).

=UPPER(CONCATENATE("1ROYTEST1.CSV",TEXT(Import!$G$ 1,"00000000"),TEXT(Import!$H$1,"000000")))

I think my problem which occurs when I import this file into a banking
sytem
is that the overall record length is not determined and the import does
not
know when the next record starts hence my request for an "end of record"
sybol or something. On ther model I have this record appears to be
padded
with blanks up to 180 characters in all. Hope this explains
Mervyn




"Patricia Shannon" wrote in
message ...
What method are you using to create the text file?

"Mervyn Thomas" wrote:

I am creating a text file within excel and I do not know how to create
what
I think is needed and that is an end of line character for each line.
The
text is all in column A. The text file that excell creates appears to
be
different to the model I am using in Notepad at the end of the line.
Anyone any experience in this?










Patricia Shannon

End of Record symbol
 
Normally, a line will end with CR/LF, i.e., carriage return/line feed
(different for MacIntosh). That would be CHAR(13) & CHAR(10)
That might, as you suspect, solve your problem. If not, I'll be looking
into it more closely.


"Mervyn Thomas" wrote:

Patricia - I am doing a programatic file save with "FileFormat:=xlText"
which I think is the same as Text (Tab delimited) in Excel. The records
come as seperate lines when viewed in WordPad but when I do an "edit/select
all" the records appear longer than what was defined in the formula and the
model I am working to requires a fixed record length of 179. I have tried a
user defined function called "RightTab" which in excel does seem to provide
a fixed length but the same happens in WordPad - the records are much longer
than the 179 defined.
Thanks for your patience
Mervyn


"Patricia Shannon" wrote in
message ...
Also, what is happening that leads you to the conclusion that the end of
line
characters are non-standard? Is everything on one line or what?


"Mervyn Thomas" wrote:

I'm using a concatenate function to draw data from Excel fields and so
including for each record the appropriate field lengths such as the
calculation for the first record (all of which is in A1).

=UPPER(CONCATENATE("1ROYTEST1.CSV",TEXT(Import!$G$ 1,"00000000"),TEXT(Import!$H$1,"000000")))

I think my problem which occurs when I import this file into a banking
sytem
is that the overall record length is not determined and the import does
not
know when the next record starts hence my request for an "end of record"
sybol or something. On ther model I have this record appears to be
padded
with blanks up to 180 characters in all. Hope this explains
Mervyn




"Patricia Shannon" wrote in
message ...
What method are you using to create the text file?

"Mervyn Thomas" wrote:

I am creating a text file within excel and I do not know how to create
what
I think is needed and that is an end of line character for each line.
The
text is all in column A. The text file that excell creates appears to
be
different to the model I am using in Notepad at the end of the line.
Anyone any experience in this?










Mervyn Thomas

End of Record symbol
 
Patricia - thanks this is getting closer but not quite there!. Your
suggestion produces a " at the start of the line and a " at the beginning of
the next line. I am now using TEXTPAD which shows "invisible Characters and
what I am trying to reproduce is a character that looks a like a thin "d" at
the end of the line only. Meanwhile I'll try some other CHAR"s
Mervyn

"Patricia Shannon" wrote in
message ...
Normally, a line will end with CR/LF, i.e., carriage return/line feed
(different for MacIntosh). That would be CHAR(13) & CHAR(10)
That might, as you suspect, solve your problem. If not, I'll be looking
into it more closely.


"Mervyn Thomas" wrote:

Patricia - I am doing a programatic file save with "FileFormat:=xlText"
which I think is the same as Text (Tab delimited) in Excel. The records
come as seperate lines when viewed in WordPad but when I do an
"edit/select
all" the records appear longer than what was defined in the formula and
the
model I am working to requires a fixed record length of 179. I have
tried a
user defined function called "RightTab" which in excel does seem to
provide
a fixed length but the same happens in WordPad - the records are much
longer
than the 179 defined.
Thanks for your patience
Mervyn


"Patricia Shannon" wrote in
message ...
Also, what is happening that leads you to the conclusion that the end
of
line
characters are non-standard? Is everything on one line or what?


"Mervyn Thomas" wrote:

I'm using a concatenate function to draw data from Excel fields and so
including for each record the appropriate field lengths such as the
calculation for the first record (all of which is in A1).

=UPPER(CONCATENATE("1ROYTEST1.CSV",TEXT(Import!$G$ 1,"00000000"),TEXT(Import!$H$1,"000000")))

I think my problem which occurs when I import this file into a banking
sytem
is that the overall record length is not determined and the import
does
not
know when the next record starts hence my request for an "end of
record"
sybol or something. On ther model I have this record appears to be
padded
with blanks up to 180 characters in all. Hope this explains
Mervyn




"Patricia Shannon" wrote
in
message ...
What method are you using to create the text file?

"Mervyn Thomas" wrote:

I am creating a text file within excel and I do not know how to
create
what
I think is needed and that is an end of line character for each
line.
The
text is all in column A. The text file that excell creates appears
to
be
different to the model I am using in Notepad at the end of the
line.
Anyone any experience in this?












Patricia Shannon

End of Record symbol
 
What version of Excel do you have? I have Excel 2003, and it looks like you
might need to use another file format. Doing a Help on FileFormat property,
I see the following likely possibilities:
xlTextMSDOS
xlTextWindows
xlUnicodeText

xlText is not used for saving files, but for describing the the DataType in
a PivotTable field!

These are symbolic names for numeric constants; using them is like typing
in the numeric value, so you don't get a compile error if you use it in the
wrong place, but you won't get the results you expect.

Try running the following:

Public Sub TryItOut3()

' Created by Patricia Shannon 04/02/2006

MsgBox "xlText=" & xlText _
& vbNewLine & "xlTextMSDOS=" & xlTextMSDOS _
& vbNewLine & "xlTextPrinter=" & xlTextPrinter _
& vbNewLine & "xltextwindows=" & xlTextWindows _
& vbNewLine & "xlUnicodeText=" & xlUnicodeText
End Sub

I got

xlText=-4158
xlTextMSDOS=21
xlTextPrinter=36
xltextwindows=20
xlUnicodeText=42

If you use one of these types, they should create the correct end of line
characters.



"Mervyn Thomas" wrote:

Patricia - thanks this is getting closer but not quite there!. Your
suggestion produces a " at the start of the line and a " at the beginning of
the next line. I am now using TEXTPAD which shows "invisible Characters and
what I am trying to reproduce is a character that looks a like a thin "d" at
the end of the line only. Meanwhile I'll try some other CHAR"s
Mervyn

"Patricia Shannon" wrote in
message ...
Normally, a line will end with CR/LF, i.e., carriage return/line feed
(different for MacIntosh). That would be CHAR(13) & CHAR(10)
That might, as you suspect, solve your problem. If not, I'll be looking
into it more closely.


"Mervyn Thomas" wrote:

Patricia - I am doing a programatic file save with "FileFormat:=xlText"
which I think is the same as Text (Tab delimited) in Excel. The records
come as seperate lines when viewed in WordPad but when I do an
"edit/select
all" the records appear longer than what was defined in the formula and
the
model I am working to requires a fixed record length of 179. I have
tried a
user defined function called "RightTab" which in excel does seem to
provide
a fixed length but the same happens in WordPad - the records are much
longer
than the 179 defined.
Thanks for your patience
Mervyn


"Patricia Shannon" wrote in
message ...
Also, what is happening that leads you to the conclusion that the end
of
line
characters are non-standard? Is everything on one line or what?


"Mervyn Thomas" wrote:

I'm using a concatenate function to draw data from Excel fields and so
including for each record the appropriate field lengths such as the
calculation for the first record (all of which is in A1).

=UPPER(CONCATENATE("1ROYTEST1.CSV",TEXT(Import!$G$ 1,"00000000"),TEXT(Import!$H$1,"000000")))

I think my problem which occurs when I import this file into a banking
sytem
is that the overall record length is not determined and the import
does
not
know when the next record starts hence my request for an "end of
record"
sybol or something. On ther model I have this record appears to be
padded
with blanks up to 180 characters in all. Hope this explains
Mervyn




"Patricia Shannon" wrote
in
message ...
What method are you using to create the text file?

"Mervyn Thomas" wrote:

I am creating a text file within excel and I do not know how to
create
what
I think is needed and that is an end of line character for each
line.
The
text is all in column A. The text file that excell creates appears
to
be
different to the model I am using in Notepad at the end of the
line.
Anyone any experience in this?













Mervyn Thomas

End of Record symbol
 
I've only got Excel 2000 so that might be the problem. Saving as
xLunicodeText does not solve the problem but I have now got a work around by
stripping out the invisible Tab Characters in TEXTPAD. It seems in Excel
2000 anyway that the records are padded out by some variable number of tab
characters both for each record and at the end of all records!

Thanks for your help. I will try excel2003 when I can visit someone who has
it.
Mervyn

"Patricia Shannon" wrote in
message ...
What version of Excel do you have? I have Excel 2003, and it looks like
you
might need to use another file format. Doing a Help on FileFormat
property,
I see the following likely possibilities:
xlTextMSDOS
xlTextWindows
xlUnicodeText

xlText is not used for saving files, but for describing the the DataType
in
a PivotTable field!

These are symbolic names for numeric constants; using them is like typing
in the numeric value, so you don't get a compile error if you use it in
the
wrong place, but you won't get the results you expect.

Try running the following:

Public Sub TryItOut3()

' Created by Patricia Shannon 04/02/2006

MsgBox "xlText=" & xlText _
& vbNewLine & "xlTextMSDOS=" & xlTextMSDOS _
& vbNewLine & "xlTextPrinter=" & xlTextPrinter _
& vbNewLine & "xltextwindows=" & xlTextWindows _
& vbNewLine & "xlUnicodeText=" & xlUnicodeText
End Sub

I got

xlText=-4158
xlTextMSDOS=21
xlTextPrinter=36
xltextwindows=20
xlUnicodeText=42

If you use one of these types, they should create the correct end of line
characters.



"Mervyn Thomas" wrote:

Patricia - thanks this is getting closer but not quite there!. Your
suggestion produces a " at the start of the line and a " at the beginning
of
the next line. I am now using TEXTPAD which shows "invisible Characters
and
what I am trying to reproduce is a character that looks a like a thin "d"
at
the end of the line only. Meanwhile I'll try some other CHAR"s
Mervyn

"Patricia Shannon" wrote in
message ...
Normally, a line will end with CR/LF, i.e., carriage return/line feed
(different for MacIntosh). That would be CHAR(13) & CHAR(10)
That might, as you suspect, solve your problem. If not, I'll be
looking
into it more closely.


"Mervyn Thomas" wrote:

Patricia - I am doing a programatic file save with
"FileFormat:=xlText"
which I think is the same as Text (Tab delimited) in Excel. The
records
come as seperate lines when viewed in WordPad but when I do an
"edit/select
all" the records appear longer than what was defined in the formula
and
the
model I am working to requires a fixed record length of 179. I have
tried a
user defined function called "RightTab" which in excel does seem to
provide
a fixed length but the same happens in WordPad - the records are much
longer
than the 179 defined.
Thanks for your patience
Mervyn


"Patricia Shannon" wrote
in
message ...
Also, what is happening that leads you to the conclusion that the
end
of
line
characters are non-standard? Is everything on one line or what?


"Mervyn Thomas" wrote:

I'm using a concatenate function to draw data from Excel fields and
so
including for each record the appropriate field lengths such as the
calculation for the first record (all of which is in A1).

=UPPER(CONCATENATE("1ROYTEST1.CSV",TEXT(Import!$G$ 1,"00000000"),TEXT(Import!$H$1,"000000")))

I think my problem which occurs when I import this file into a
banking
sytem
is that the overall record length is not determined and the import
does
not
know when the next record starts hence my request for an "end of
record"
sybol or something. On ther model I have this record appears to
be
padded
with blanks up to 180 characters in all. Hope this explains
Mervyn




"Patricia Shannon"
wrote
in
message ...
What method are you using to create the text file?

"Mervyn Thomas" wrote:

I am creating a text file within excel and I do not know how to
create
what
I think is needed and that is an end of line character for each
line.
The
text is all in column A. The text file that excell creates
appears
to
be
different to the model I am using in Notepad at the end of the
line.
Anyone any experience in this?















NickHK

End of Record symbol
 
Mervyn,
AFAIK TextPad does not support Unicode. As such it may not display the
output from Excel with xlUnicodeText. Open it in binary to see the hex
characters actually used, or view in a Unicode enabled editor, e.g. WordPad.

NickHK

"Mervyn Thomas" wrote in message
...
I've only got Excel 2000 so that might be the problem. Saving as
xLunicodeText does not solve the problem but I have now got a work around

by
stripping out the invisible Tab Characters in TEXTPAD. It seems in Excel
2000 anyway that the records are padded out by some variable number of tab
characters both for each record and at the end of all records!

Thanks for your help. I will try excel2003 when I can visit someone who

has
it.
Mervyn

"Patricia Shannon" wrote in
message ...
What version of Excel do you have? I have Excel 2003, and it looks like
you
might need to use another file format. Doing a Help on FileFormat
property,
I see the following likely possibilities:
xlTextMSDOS
xlTextWindows
xlUnicodeText

xlText is not used for saving files, but for describing the the DataType
in
a PivotTable field!

These are symbolic names for numeric constants; using them is like

typing
in the numeric value, so you don't get a compile error if you use it in
the
wrong place, but you won't get the results you expect.

Try running the following:

Public Sub TryItOut3()

' Created by Patricia Shannon 04/02/2006

MsgBox "xlText=" & xlText _
& vbNewLine & "xlTextMSDOS=" & xlTextMSDOS _
& vbNewLine & "xlTextPrinter=" & xlTextPrinter _
& vbNewLine & "xltextwindows=" & xlTextWindows _
& vbNewLine & "xlUnicodeText=" & xlUnicodeText
End Sub

I got

xlText=-4158
xlTextMSDOS=21
xlTextPrinter=36
xltextwindows=20
xlUnicodeText=42

If you use one of these types, they should create the correct end of

line
characters.



"Mervyn Thomas" wrote:

Patricia - thanks this is getting closer but not quite there!. Your
suggestion produces a " at the start of the line and a " at the

beginning
of
the next line. I am now using TEXTPAD which shows "invisible

Characters
and
what I am trying to reproduce is a character that looks a like a thin

"d"
at
the end of the line only. Meanwhile I'll try some other CHAR"s
Mervyn

"Patricia Shannon" wrote in
message ...
Normally, a line will end with CR/LF, i.e., carriage return/line feed
(different for MacIntosh). That would be CHAR(13) & CHAR(10)
That might, as you suspect, solve your problem. If not, I'll be
looking
into it more closely.


"Mervyn Thomas" wrote:

Patricia - I am doing a programatic file save with
"FileFormat:=xlText"
which I think is the same as Text (Tab delimited) in Excel. The
records
come as seperate lines when viewed in WordPad but when I do an
"edit/select
all" the records appear longer than what was defined in the formula
and
the
model I am working to requires a fixed record length of 179. I have
tried a
user defined function called "RightTab" which in excel does seem to
provide
a fixed length but the same happens in WordPad - the records are

much
longer
than the 179 defined.
Thanks for your patience
Mervyn


"Patricia Shannon" wrote
in
message ...
Also, what is happening that leads you to the conclusion that the
end
of
line
characters are non-standard? Is everything on one line or what?


"Mervyn Thomas" wrote:

I'm using a concatenate function to draw data from Excel fields

and
so
including for each record the appropriate field lengths such as

the
calculation for the first record (all of which is in A1).


=UPPER(CONCATENATE("1ROYTEST1.CSV",TEXT(Import!$G$ 1,"00000000"),TEXT(Import!
$H$1,"000000")))

I think my problem which occurs when I import this file into a
banking
sytem
is that the overall record length is not determined and the

import
does
not
know when the next record starts hence my request for an "end of
record"
sybol or something. On ther model I have this record appears to
be
padded
with blanks up to 180 characters in all. Hope this explains
Mervyn




"Patricia Shannon"
wrote
in
message

...
What method are you using to create the text file?

"Mervyn Thomas" wrote:

I am creating a text file within excel and I do not know how

to
create
what
I think is needed and that is an end of line character for

each
line.
The
text is all in column A. The text file that excell creates
appears
to
be
different to the model I am using in Notepad at the end of the
line.
Anyone any experience in this?

















Patricia Shannon

End of Record symbol
 
I'm glad you seem to have a solution that works for you. If necessary, you
could use a method I mentioned earlier to create a file yourself. That way
you would have more control over the format.
Good luck

"Mervyn Thomas" wrote:

I've only got Excel 2000 so that might be the problem. Saving as
xLunicodeText does not solve the problem but I have now got a work around by
stripping out the invisible Tab Characters in TEXTPAD. It seems in Excel
2000 anyway that the records are padded out by some variable number of tab
characters both for each record and at the end of all records!

Thanks for your help. I will try excel2003 when I can visit someone who has
it.
Mervyn

"Patricia Shannon" wrote in
message ...
What version of Excel do you have? I have Excel 2003, and it looks like
you
might need to use another file format. Doing a Help on FileFormat
property,
I see the following likely possibilities:
xlTextMSDOS
xlTextWindows
xlUnicodeText

xlText is not used for saving files, but for describing the the DataType
in
a PivotTable field!

These are symbolic names for numeric constants; using them is like typing
in the numeric value, so you don't get a compile error if you use it in
the
wrong place, but you won't get the results you expect.

Try running the following:

Public Sub TryItOut3()

' Created by Patricia Shannon 04/02/2006

MsgBox "xlText=" & xlText _
& vbNewLine & "xlTextMSDOS=" & xlTextMSDOS _
& vbNewLine & "xlTextPrinter=" & xlTextPrinter _
& vbNewLine & "xltextwindows=" & xlTextWindows _
& vbNewLine & "xlUnicodeText=" & xlUnicodeText
End Sub

I got

xlText=-4158
xlTextMSDOS=21
xlTextPrinter=36
xltextwindows=20
xlUnicodeText=42

If you use one of these types, they should create the correct end of line
characters.



"Mervyn Thomas" wrote:

Patricia - thanks this is getting closer but not quite there!. Your
suggestion produces a " at the start of the line and a " at the beginning
of
the next line. I am now using TEXTPAD which shows "invisible Characters
and
what I am trying to reproduce is a character that looks a like a thin "d"
at
the end of the line only. Meanwhile I'll try some other CHAR"s
Mervyn

"Patricia Shannon" wrote in
message ...
Normally, a line will end with CR/LF, i.e., carriage return/line feed
(different for MacIntosh). That would be CHAR(13) & CHAR(10)
That might, as you suspect, solve your problem. If not, I'll be
looking
into it more closely.


"Mervyn Thomas" wrote:

Patricia - I am doing a programatic file save with
"FileFormat:=xlText"
which I think is the same as Text (Tab delimited) in Excel. The
records
come as seperate lines when viewed in WordPad but when I do an
"edit/select
all" the records appear longer than what was defined in the formula
and
the
model I am working to requires a fixed record length of 179. I have
tried a
user defined function called "RightTab" which in excel does seem to
provide
a fixed length but the same happens in WordPad - the records are much
longer
than the 179 defined.
Thanks for your patience
Mervyn


"Patricia Shannon" wrote
in
message ...
Also, what is happening that leads you to the conclusion that the
end
of
line
characters are non-standard? Is everything on one line or what?


"Mervyn Thomas" wrote:

I'm using a concatenate function to draw data from Excel fields and
so
including for each record the appropriate field lengths such as the
calculation for the first record (all of which is in A1).

=UPPER(CONCATENATE("1ROYTEST1.CSV",TEXT(Import!$G$ 1,"00000000"),TEXT(Import!$H$1,"000000")))

I think my problem which occurs when I import this file into a
banking
sytem
is that the overall record length is not determined and the import
does
not
know when the next record starts hence my request for an "end of
record"
sybol or something. On ther model I have this record appears to
be
padded
with blanks up to 180 characters in all. Hope this explains
Mervyn




"Patricia Shannon"
wrote
in
message ...
What method are you using to create the text file?

"Mervyn Thomas" wrote:

I am creating a text file within excel and I do not know how to
create
what
I think is needed and that is an end of line character for each
line.
The
text is all in column A. The text file that excell creates
appears
to
be
different to the model I am using in Notepad at the end of the
line.
Anyone any experience in this?

















All times are GMT +1. The time now is 03:22 AM.

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