Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default 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?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default 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?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default 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?





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default 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?








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default 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?






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default 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?








  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default 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?









  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default 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?









  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default 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?













  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default 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?












  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default 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?














  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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?
















  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default 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?















Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Type a symbol useing shortcut keys rather the insert a symbol RJD Excel Discussion (Misc queries) 2 December 23rd 09 06:28 PM
Open new record with selected fields from previous record Design by Sue Excel Discussion (Misc queries) 1 June 12th 09 02:24 PM
Euro symbol displays as dollar symbol in Excel BrendaM Excel Worksheet Functions 5 April 24th 09 03:43 PM
I need a symbol but "symbol" in the Insert menu is grayed-out. Nothappy Excel Discussion (Misc queries) 2 May 3rd 05 12:16 AM
Record Macro - Record custom user actions Sal[_4_] Excel Programming 1 December 23rd 04 03:18 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"