4 Replies Latest reply on May 9, 2011 4:40 AM by nikos101

    Urgent : Copy Paste Excel to TextInput /TextArea

    Arsohoh Level 1

      Hi All,


      My requirement is that, I need to copy multiple rows from excel and paste it up in TextInput /TextArea. I will have the same number of rows and columns in my TextInput /TextArea component. Now the issue is that when i copy and paste multiple rows of data into my TextInput /TextArea, the data is not getting copied in the right manner.


      Say for example, i have excel data as


      col 1 col 2 col3   col 4

      one   two   three   four

      1       2       3         4

      when i copy these two rows and paste in my text input components, i get to see the following,


      one two three four1


      here I'm using the keyDown event for ctrl-c & ctrl-v opertions and with in my listener function of the keyDown am using a textField instance and dispatching the TextEvent.Text_input event so that i can use the "event.text" and parse and split the same. This works fine, but when i use my mouse (Right click) to paste  the contents i make a Change event to get dispatched and when i use  textField instance and dispatch the TextEvent.Text_input event, it seems like nothing is happening. Now how do i get this "event.text" so that i can parse even on mouse event.


      Please advice.