Insert multiple entries from excel into DT per copy & paste

Insert multiple entries from excel into DT per copy & paste

artmusartmus Posts: 9Questions: 4Answers: 0

Hello,
is it possible to insert multiple entries (for example an entire column or row after row) into DataTables? I want to allow users to just copy their data from excel and paste it into DT, instead of uploading their data through a file-import. I thought about providing users an empty DT, whose number of rows increases when pasting the data entries.

Thanks
Artur

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583
    edited March 2019 Answer ✓

    Hi @artmus ,

    You can't add columns once the table has been initialised, but you can add multiple rows with rows.add() (or a single one with row.add()).

    Cheers,

    Colin

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    That's not a feature that is available out of the box, but you could have your users paste into a textarea and listen for the paste event. Then use the Editor API to create the new row, set the values and submit it to the server.

    Allan

This discussion has been closed.