Click here to Skip to main content
14,606,091 members
Rate this:
Please Sign up or sign in to vote.
See more:
Q. The text that I entered in textbox have more than one line, I wanted to treat it as one cell in excel (* multiple lines) --> Is there any way when I paste my text in excel, it shows in one cell rather than dividing into multiple lines??

If I set the "accept return = true" the after hitting the enter key when I paste it to excel, it separates into multiple line.

Simply just copy from textbox to excel rightaway

please thanks.

What I have tried:

<textbox x:name="TextBox1" horizontalalignment="Left" height="335" margin="35,40,0,0" textwrapping="Wrap" text="TextBox" verticalalignment="Top" width="730" acceptsreturn="True">
Updated 16-Jun-20 20:11pm

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Seems, that this question is not related with programming issue...

If you would like to paste text into single cell in MS Excel, copy multi-line text into clipboard, go to an Excel sheet, double-click in cell (o use F2 key to switch in edition mode) and paste text from clipboard.
Member 14864160 17-Jun-20 2:23am
Appreciate for your answer!
I have another question. What if I have a textbox filled with multiline and I wanted to combine those lines together into one line??
Maciej Los 17-Jun-20 2:27am
Well... you need to remove line-breaks ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100