I'm using Visual Basic (actually embedded Visual Basic) to write a program that will create a csv file to be opened in Excel. My problem is with CRLF (Carriage Return - Line Feed) characters.
I know how to insert CRLFs (Alt-Enter) into a workbook cell for multi-line cell entries. But what character or character combination do I have my program insert into my file to achieve the same multi-line result?? I've tried vbCrLf, Chr(13) & Chr(10), and ChrW(13) & ChrW(10), with no success.
My file is a name and address file. If I have a record that looks like:
"John","Jones","100 Main Street[CRLF here]Suite 700","New York","NY"
Excel sees the embedded CRLF as a record delimiter, even though it's within the quotation mark field delimiters. So I end up with 2 records instead of one.
I'm using Excel 2000, but I have no control over what my eventual users will be using.
Again, my question is what character or character combination do I have my program insert into my file to achieve a multi-line cell entry in Excel??
_________________
- Jeff
This message was edited by jeffg22 on 2002-09-26 16:53
This message was edited by jeffg22 on 2002-09-26 16:57
I know how to insert CRLFs (Alt-Enter) into a workbook cell for multi-line cell entries. But what character or character combination do I have my program insert into my file to achieve the same multi-line result?? I've tried vbCrLf, Chr(13) & Chr(10), and ChrW(13) & ChrW(10), with no success.
My file is a name and address file. If I have a record that looks like:
"John","Jones","100 Main Street[CRLF here]Suite 700","New York","NY"
Excel sees the embedded CRLF as a record delimiter, even though it's within the quotation mark field delimiters. So I end up with 2 records instead of one.
I'm using Excel 2000, but I have no control over what my eventual users will be using.
Again, my question is what character or character combination do I have my program insert into my file to achieve a multi-line cell entry in Excel??
_________________
- Jeff
This message was edited by jeffg22 on 2002-09-26 16:53
This message was edited by jeffg22 on 2002-09-26 16:57