cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
  • New JMP features coming to desktops everywhere this September. Sign up to learn more at jmp.com/launch.
Choose Language Hide Translation Bar

Paste multiple lines from excel into text edit box

Hello,

I currently have a text edit box, where the user would have to put in some ID's one by one and press a button "add" every time. I want them to be able to just copy multiple cells from excel and paste them into the text edit box, so it's faster for them. The problem is, that if I paste some ID's, then only the first ID (the others are in the next lines) will be pasted. Is there a way to paste something multiline into a text edit box or even another box? 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Paste multiple lines from excel into text edit box

You can make TextEditBox taller by using N Lines.

Names Default To Here(1);
win = New Window("Example",
	fontobj = text = Text Edit Box("Example Text")
);
text << Set N Lines(3);

And you can parse the user input as needed.

-Jarmo

View solution in original post

4 REPLIES 4
jthi
Super User

Re: Paste multiple lines from excel into text edit box

You can make TextEditBox taller by using N Lines.

Names Default To Here(1);
win = New Window("Example",
	fontobj = text = Text Edit Box("Example Text")
);
text << Set N Lines(3);

And you can parse the user input as needed.

-Jarmo

Re: Paste multiple lines from excel into text edit box

Okay thank you, due to me not knowing how many lines the will paste, I thought its not a great solution, but by setting N lines to 2, the text edit box will accept any number of lines. Just with n lines(1) it will accept only one

jthi
Super User

Re: Paste multiple lines from excel into text edit box

Usually, I have fixed size text edit box and then immediately clean and reformat the input after user has inputted (and committed) their values. So, if user inputs

a

b

c

it will be formatted to (or something similar)

a,b,c

in the text edit box

-Jarmo

Re: Paste multiple lines from excel into text edit box

When I paste some ID's from multiple excel cells, they are all in separate rows in the text edit box bot are not "separate" as in the are not split by delimiters, whitespaces or real line breaks. So when I do <<get text its just one string with the ID's in different rows but as I said no real delimiter. What could be a way to get all separate ID's ? You said you can format it inside the text edit box? Note that the ID's are completely random so no regex

Recommended Articles