Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Add Line break to string for Excel (using c#)

I'm adding som data to a string that will be imported to Excel. I need
to add line breaks in the text sp that they are visible in Excel but
what string should I insert?

/Ladyhawke

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Add Line break to string for Excel (using c#)

Chr(10)

NickHK

"ladyhawke" wrote in message
oups.com...
I'm adding som data to a string that will be imported to Excel. I need
to add line breaks in the text sp that they are visible in Excel but
what string should I insert?

/Ladyhawke



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Add Line break to string for Excel (using c#)


NickHK wrote:
Chr(10)


or chr(13)

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Add Line break to string for Excel (using c#)

I assumed the OP wanted to put a line break in text all contained in a cell.
If it somewhere else it would depend, possibly the C# equivalent of
vbNewLine or Chr(13).

NickHK

"Morris"
egroups.com...

NickHK wrote:
Chr(10)


or chr(13)



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Add Line break to string for Excel (using c#)

vbCrLf combines Chr(10) and Chr(13) for carriage return and line feed.

"ladyhawke" wrote:

I'm adding som data to a string that will be imported to Excel. I need
to add line breaks in the text sp that they are visible in Excel but
what string should I insert?

/Ladyhawke




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Add Line break to string for Excel (using c#)

Would Char(13) equal soft line break? That is whats needed here... If I
insert Char(10) it will change line in the comma seperated file
(thereby initializing a new dataline (not wanted))

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 can i add a line break into a formula in excel 2000? Bretter99 Excel Discussion (Misc queries) 9 March 15th 10 05:07 PM
How to get a line to locate at the page break in excel Heppe85 Excel Discussion (Misc queries) 1 January 16th 09 09:18 AM
Replacing a hard line break in Excel a_ryan1972 Excel Discussion (Misc queries) 4 October 25th 06 09:28 PM
Break cell into multiple lines by line break Chia Excel Discussion (Misc queries) 1 August 20th 06 06:37 AM
Why can't I get 'alt enter' to create a line break in Excel? babbott Excel Discussion (Misc queries) 3 May 9th 06 12:18 AM


All times are GMT +1. The time now is 11:56 PM.

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"