New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Export RadSpreadsheet

Note: As of R1 2020 SP1 the export functionality is built-in and supports an easy client-side export to PDF. You can check it in the Spreadsheet - Export to PDF online demo.

  • Home
  • Insert
  • Data
  • Open...
  • Export...
  • Undo
  • Redo
  • Save
  • Paste
  • Cut
  • Copy
  • Bold
  • Italic
  • Underline
  • Link
  • Insert Comment
  • Insert image
  • Arial
  • Pick Color(Current Color is blank)
  • Pick Color(Current Color is blank)
  • All borders
    • All borders
    • Inside borders
    • Inside horizontal borders
    • Inside vertical borders
    • Outside borders
    • Left border
    • Top border
    • Right border
    • Bottom border
    • No border
  • Pick Color(Current Color is blank)
  • Horizontal alignment
    • Align Left
    • Align Center
    • Align Right
    • Justify
  • Vertical alignment
    • Align Top
    • Align Middle
    • Align Bottom
  • Wrap text
  • Merge Cells
    • Merge Cells
    • Merge Horizontally
    • Merge Vertically
    • Unmerge
  • Format
    • Automatic
    • Number
    • Percent
    • Financial
    • Currency
    • Date
    • Time
    • Date time
    • Duration
    • More formats...
  • Increase decimal
  • Decrease decimal
  • Freeze panes
    • Freeze panes
    • Freeze rows
    • Freeze columns
    • Unfreeze panes
  • Filter
  • Toggle gridlines
  • Add column left
    • Add column left
    • Add column right
    • Add row above
    • Add row below
  • Delete cells
    • Delete column
    • Delete row
  • Sort range A to Z
    • Sort range A to Z
    • Sort range Z to A
  • Filter
  • Data Validation
  • Cut
  • Copy
  • Paste
  • Hide
  • Unhide
  • Delete
  • Hide
  • Unhide
  • Delete

You could easily export the RadSpreadsheet control with the RadClientExportManager to PDF (as shown in the demo) and to an image.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • styles.css
<%@ Page AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="ClientExportManager.ApplicationScenarios.Spreadsheet.DefaultCS"Language="c#"  %>

<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <!-- Load Pako ZLIB library to enable PDF compression -->
    <script src="../../../Common/Scripts/pako.min.js"></script>
    <link href="styles.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <qsf:MessageBox ID="MessageBox" Type="Info" Icon="Info" runat="server" Visible="true">
        <p>
            <b>Note</b>: As of <b>R1 2020 SP1</b> the export functionality is built-in and supports an easy client-side export to PDF. You can check it in the <a href="https://demos.telerik.com/aspnet-ajax/spreadsheet/examples/overview/defaultcs.aspx">Spreadsheet - Export to PDF</a> online demo.
        </p>
    </qsf:MessageBox>
    <div class="demo-container">
        <telerik:RadButton ID="RadButton1" RenderMode="Lightweight" runat="server" OnClientClicked="exportRadSpreadsheet" Text="Export RadSpreadsheet to PDF" AutoPostBack="false" UseSubmitBehavior="false"></telerik:RadButton>

        <telerik:RadClientExportManager runat="server" ID="RadClientExportManager1">
        </telerik:RadClientExportManager>

        <telerik:RadSpreadsheet runat="server" ID="RadSpreadsheet1" Height="700px">
        </telerik:RadSpreadsheet>

    </div>

    <script>
        var $ = $telerik.$;

        function exportRadSpreadsheet() {
            $find('<%=RadClientExportManager1.ClientID%>').exportPDF($(".rssView"));
        }

    </script>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance