How do I get carriage returns to not be row delimiters in text fi.

R

RV

I am trying to import a text file in which the user has entered carriage
returns for a field. When I import it into Excel, Excel is considering the
carriage return as a row delimiter. I am creating this text file from a .NET
program and would like that program to have to enter whatever special
characters Excel might need to interpret these returns as <ALT><ENTER> and a
newline in a cell and not as a new row. Thanks for your help.
 
D

Dave Peterson

I think you may have a problem with the real end of line markers, too.

If you treat each as an alt-enter, then how would you know when the line ended.

But since you're creating this text file, maybe you could convert the user's CR
to a unique character (!) that isn't use elsewhere. Then your text file will
have that character in what will be the cell.

Then when the user imports this file (via a macro you gave them???), your macro
could edit|replace that unique character with a vblf. Set the cell's format to
wraptext and off you'd go.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top