All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
New to Telerik UI for ASP.NET AJAX? Download free 30-day trial
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.
<%@ Page Language="vb" CodeFile="DefaultVB.aspx.vb" AutoEventWireup="false" Inherits="Telerik.SpreadProcessing.GenerateDocuments.DefaultVB" %> <%@ 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>