Spreadsheet - Export to PDF

  • Home
  • Insert
  • Data
  • Undo
  • Redo
  • Save
  • Paste
  • Cut
  • Copy
  • Bold
  • Italic
  • Underline
  • Link
  • 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
  • Delete
  • Hide
  • Delete
Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

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 PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<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" />
    <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

Help Us Improve

Was this example helpful?