1. #1
    Sencha User
    Join Date
    Apr 2014
    Posts
    4
    Vote Rating
    0
    ha15hans is on a distinguished road

      0  

    Default Answered: Issue with Paste of Excel Data

    Hi all,

    I am trying to import data from an excel spreadsheet into a textbox using EXTSJS 4.2.2 and am having an issue:

    Below is my code for the paste event:

    Code:
    p.on('paste', function (evt) {                    
        var dataString=evt.data.dataValue;
        ...
    });
    When I copy cells from excel this listener triggers correctly and brings in data however, in one scenario the wrong data is brought in.

    If we have a table in excel with a large number but the cell is to small it will display as below:

    123 | 1234
    TE | ####

    But if you copy the above and paste into notepad the correct data comes for the #### (Say the text is 123456789). In the above code example we get a cell with ####. Does anyone have a resolution for this?

  2. Hi--

    Does pasting without the event bring in the correct data?

    Can you share an example of this issue in action? Please use https://fiddle.sencha.com

    Thanks!
    Joel

  3. #2
    Sencha - Support Team joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    1,502
    Vote Rating
    85
    Answers
    177
    joel.watson is just really nice joel.watson is just really nice joel.watson is just really nice joel.watson is just really nice joel.watson is just really nice

      0  

    Default

    Hi--

    Does pasting without the event bring in the correct data?

    Can you share an example of this issue in action? Please use https://fiddle.sencha.com

    Thanks!
    Joel

  4. #3
    Sencha User
    Join Date
    Apr 2014
    Posts
    4
    Vote Rating
    0
    ha15hans is on a distinguished road

      0  

    Default

    You were right removing the past listener resolved the issue.

  5. #4
    Sencha - Support Team joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    1,502
    Vote Rating
    85
    Answers
    177
    joel.watson is just really nice joel.watson is just really nice joel.watson is just really nice joel.watson is just really nice joel.watson is just really nice

      0  

    Default

    Quote Originally Posted by ha15hans View Post
    You were right removing the past listener resolved the issue.
    Cool, glad you got it working!

    Thanks
    Joel

Thread Participants: 1

Tags for this Thread