Edit this page

How to Paste data-only in the RadSpreadsheet

This help article shows how to paste data-only into the RadSpreadsheet, removing all styles from the source data.

Occasionally, it is desirable to only paste the raw data into the RadSpreadsheet. If substancial amounts of data are being copied and pasted into the RadSpreadsheet, parsing and rendering the content could take a long time. Removing the styling will both reduce the volumn of data pasted, and speed up the rendering. See Figure 1 for an example of pasting data-only.

Figure 1: A RadSpreadsheet with styled source data pasted using data-only.


kendo.spreadsheet.Clipboard.prototype.paste = function () {
    var sheet = this.workbook.activeSheet();
    var pasteRef = this.pasteRef();
    var content = this._content;
    content.data = stripData(content.data);
    sheet.range(pasteRef).setState(content, this);
    sheet.triggerChange({ recalc: true, ref: pasteRef });

function stripData(source) {
    var data = Array.isArray(source) ? [] : {};
    for (var key in source) {
        if (source.hasOwnProperty(key)) {
            var t = typeof source[key];
            if (key === "value") {
                data[key] = source["value"];
            } else if (source[key] === null) {
                data[key] = null;
            } else {
                data[key] = t === 'object' ? stripData(source[key]) : null;
    return data;
<telerik:RadSpreadsheet ID="RadSpreadsheet1" runat="server" Width="500" Height="800">

See Also

Is this article helpful? No Yes
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article