Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 113
Default Char(13) displaying as square in Excel

We are using Excel to load data into SQL.

We are using the Concatenate function to join a couple columns of data and
we want to put a CRLF (Carriage Return, Line Feed) after the first column
(line) of data.

=IF(B2=F2,A2,CONCATENATE(A2, CHAR(10), B2) )

This data will be loaded into a nvarchar field (notes) in SQL. I know about
using the 'wrap text' formatting to get rid of the square box display in
Excel and display the text as two lines. However, when we import this data
into the SQL database, the square box is what is displayed, and the data is
not being put on two separate lines.

Anyone ever encountered this problem and have any solutions?

Thanks,
Leslie Fournier
Oregon Aero, Inc.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Char(13) displaying as square in Excel

Hi Leslie,

Your subject line indicates CHAR(13), and your message indicates CHAR(10).
For vbCrLf, you need both (13 first, then 10):

=IF(B2=F2,A2,CONCATENATE(A2, CHAR(13) & CHAR(10), B2) )

Does that work as expected?

--
Regards,

Jake Marx
www.longhead.com


[please keep replies in the newsgroup - email address unmonitored]

Leslie wrote:
We are using Excel to load data into SQL.

We are using the Concatenate function to join a couple columns of
data and we want to put a CRLF (Carriage Return, Line Feed) after the
first column (line) of data.

=IF(B2=F2,A2,CONCATENATE(A2, CHAR(10), B2) )

This data will be loaded into a nvarchar field (notes) in SQL. I
know about using the 'wrap text' formatting to get rid of the square
box display in Excel and display the text as two lines. However,
when we import this data into the SQL database, the square box is
what is displayed, and the data is not being put on two separate
lines.

Anyone ever encountered this problem and have any solutions?

Thanks,
Leslie Fournier
Oregon Aero, Inc.



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
How do I a rotate my square radar chart (square-diamond)? Becs I Know Nathing Charts and Charting in Excel 5 April 3rd 23 07:30 PM
how to center a square plot area in a square chart xppuser Charts and Charting in Excel 2 March 11th 06 08:13 AM
8500 cells with phone number(7 char.), wishing to add area code (10 char.) [email protected] Excel Discussion (Misc queries) 6 March 10th 06 05:13 PM
Regression Output -- R Square versus Adjusted R Square Bonnie Excel Discussion (Misc queries) 1 October 25th 05 12:55 AM
Line break in cell, char(10) square settings? Fredrik Jansson Excel Programming 3 October 14th 03 01:37 PM


All times are GMT +1. The time now is 02:54 AM.

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

About Us

"It's about Microsoft Excel"