SpreadProcessing - Convert Documents

- OR -

Convert to:
File:
Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

With RadSpreadProcessing you can effortlessly convert documents from one to another file format among XLSX, CSV and TXT. Further, you can export any of these to PDF.

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

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<!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>
    <link href="styles.css" rel="stylesheet" />
    <script src="scripts.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div id="SpreadProcessing" class="demo-container">
        <telerik:RadAsyncUpload RenderMode="Lightweight" runat="server" ID="RadAsyncUpload1" HideFileInput="true" OnClientFileUploaded="demo.OnClientFileUploaded" OnClientValidationFailed="demo.OnClientValidationFailed"
            OnFileUploaded="RadAsyncUpload1_FileUploaded" AllowedFileExtensions=".xlsx,.pdf,.txt,.csv" />
        <div class="fileImages">
            <span class="column">
                <telerik:RadButton RenderMode="Lightweight" ID="Button1" Text="Load Custom Document" AutoPostBack="false" OnClientClicked="demo.UploadFile" runat="server" 
                    ToolTip="Please load a file with one of the following extensions: .xlsx, .pdf, .csv or .txt" />
                <asp:Image ImageUrl="~/SpreadProcessing/SampleData/CustomDocument_file.png" ID="CustomDocumentImage" runat="server" />
            </span>
            <asp:Label Text="- OR -" ID="OrLabel" runat="server" />
            <span class="column">
                <telerik:RadButton RenderMode="Lightweight" Text="Load Template Document" ID="LoadSampleDocumentButton" AutoPostBack="false" OnClientClicked="demo.UploadSampleDocument" runat="server" />
                <asp:Image ImageUrl="~/SpreadProcessing/SampleData/SampleDocumentImage.png" ID="SampleDocumentImage" runat="server" />
            </span>
        </div>
        <hr />

        <div class="converTo">
            <asp:Label ID="Label1" Text="Convert to:" runat="server" />
            <telerik:RadComboBox RenderMode="Lightweight" ID="ExtensionsRadComboBox" runat="server" Width="140px">
                <Items>
                    <telerik:RadComboBoxItem Value=".xlsx" Text="XLSX" />
                    <telerik:RadComboBoxItem Value=".csv" Text="CSV" />
                    <telerik:RadComboBoxItem Value=".txt" Text="TXT" />
                    <telerik:RadComboBoxItem Value=".pdf" Text="PDF" />
                </Items>
            </telerik:RadComboBox>
        </div>
        <span>File: </span>
        <asp:Label Text="" ID="FileLabel" runat="server" />
        <hr style="clear: both;" />
        <telerik:RadButton RenderMode="Lightweight" Text="Download" ID="DownloadButton" OnClientClicking="demo.CheckDownload" OnClick="SaveButton_Click" runat="server" CssClass="downloadBtn rbPrimaryButton" />
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance

Help Us Improve

Was this example helpful?