View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Pflugs Pflugs is offline
external usenet poster
 
Posts: 167
Default Carriage return character

I'm having a little trouble understanding the problem, but I can tell you
that the characters Chr(10) and Chr(13) are probably at the source. You can
check for those characters or replace them before copying the text to the
sheet.

Try this code written by Tom Ogilvy:

Sub ReplaceLittleSquares()
Cells.Replace What:=Chr(10), _
Replacement:="", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False
Cells.Replace What:=Chr(13), _
Replacement:="", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False
End Sub

Good luck,
Pflugs

"alrastro" wrote:

Hi,
I'm importing a text file into excel no problem there, here is my question.
I need to know the last line of the text file, this files ends in a empty
blank line that only have a carriage return or enter character or blank line.
When i'm trying to read this row in cell is a blank line, no difference
bettewn that an a blank excel cell; that doesn't help, I would like to know
if there's a way to read that carriage return or enter or blank line of this
text file on

Thank you so much.