Pasting Tab-Separated Values in the Grid from Excel
Environment
Product | Progress® Kendo UI Grid |
Description
How can I paste tab-separated values from Excel in the Kendo UI for Angular Grid?
Solution
Transfer data from Microsoft Excel by using the Clipboard.
In Latest Browser Versions
- Access the data that is copied from Excel in the
paste
event. - Convert the raw data to a plain text format (tab-separated values) by calling the
clipboardData.getData('text')
method.
The following example demonstrates how to use the paste
event to receive the data and then bind the Kendo UI Grid for Angular to it.
In Legacy Browsers
The suggested approach is not supported in Internet Explorer version 11 or earlier. To paste TSV from Excel when in legacy browsers, use a hidden textarea
element instead.
The suggested workaround for legacy browsers is a last-resort solution because it prevents the focusing of the Grid elements.