Insert multiple entries from excel into DT per copy & paste
Insert multiple entries from excel into DT per copy & paste

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
This discussion has been closed.
Answers
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 withrow.add()
).Cheers,
Colin
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