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

Generate Documents



#Product NameUnit PriceUnits In StockSub Total
Page size:
 77 items in 8 pages
1Chai18.0039702.00
2Chang19.0017323.00
3Aniseed Syrup10.0013130.00
4Chef Anton's Cajun Seasoning22.00531166.00
5Chef Anton's Gumbo Mix21.3500.00
6Grandma's Boysenberry Spread25.001203000.00
7Uncle Bob's Organic Dried Pears30.0015450.00
8Northwoods Cranberry Sauce40.006240.00
9Mishi Kobe Niku97.00292813.00
10Ikura31.0031961.00
  • Demo Configurator
Exported file type
Xlsx

RadSpreadProcessing allows you to create a document from scratch using code only. This is particularly convenient when in need to export large amount of data to one of the supported formats - XLSX, CSV, TXT and PDF.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • styles.css
<%@ Page Language="c#" CodeFile="DefaultCS.aspx.cs" AutoEventWireup="true" Inherits="Telerik.SpreadProcessing.GenerateDocuments.DefaultCS" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <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 RenderMode="Lightweight" Text="Download" ID="Download" CssClass="downloadButton" OnClick="Download_Click" runat="server" />
        <br />
        <br />
        <telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" runat="server" GridLines="None"
            OnNeedDataSource="RadGrid1_NeedDataSource" AutoGenerateColumns="false" AllowPaging="true">
            <MasterTableView>
                <Columns>
                    <telerik:GridBoundColumn DataField="ProductID" HeaderText="#">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ProductName" HeaderText="Product Name"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="UnitPrice" HeaderText="Unit Price">
                        <HeaderStyle HorizontalAlign="Right" />
                        <ItemStyle HorizontalAlign="Right" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="UnitsInStock" HeaderText="Units In Stock">
                        <HeaderStyle HorizontalAlign="Right" />
                        <ItemStyle HorizontalAlign="Right" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="SubTotal" HeaderText="Sub Total">
                        <HeaderStyle HorizontalAlign="Right" />
                        <ItemStyle HorizontalAlign="Right" />
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </div>
    <qsf:ConfiguratorPanel runat="server" ID="ConfigurationPanel1" Title="Demo Configurator">
        <Views>
            <qsf:View>
                <fieldset>
                    <legend>Exported file type</legend>
                </fieldset>
                <qsf:DropDownList Size="Medium" runat="server" ID="ExtensionsDropDownList">
                    <Items>
                        <telerik:DropDownListItem Value=".xlsx" Text="Xlsx" />
                        <telerik:DropDownListItem Value=".csv" Text="Csv" />
                        <telerik:DropDownListItem Value=".txt" Text="Txt" />
                        <telerik:DropDownListItem Value=".pdf" Text="Pdf" />
                    </Items>
                </qsf:DropDownList>
            </qsf:View>
        </Views>

    </qsf:ConfiguratorPanel>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance