Search Results for

    Show / Hide Table of Contents

    FlexCelAspViewer Class

    An ASP.NET component that can be used to embed an Excel file as HTML in a WebForm.

    Syntax

    Namespace: FlexCel.AspNet

    public class FlexCelAspViewer: WebControl

    Constructors

    Name Description
    FlexCelAspViewer Creates a new instance of FlexCelAspViewer.

    Methods

    Name Description
    OnImageLink Replace this event when creating a custom descendant of FlexCelAspViewer.
    OnSaveImage Replace this event when creating a custom descendant of FlexCelAspViewer.
    OnNamedRangeExport Replace this event when creating a custom descendant of FlexCelAspViewer.
    OnPreRender This prerender method is overriden so it saves the CSS rules to the head part of the html file.
    RenderContents Method overriden to return the exported xls file as HTML.

    Properties

    Name Description
    HtmlExport Component that will do the actual conversion from an Excel file to HTML. Most of the export settings should be changed in this component.
    SheetExport Defines how many sheets will be exported.
    SheetSeparator Defines a separator between multiple sheets when exporting all visible sheets. You can use for example <hr> here to write an horizontal ruler between sheets.
    RelativeImagePath Path where the images will be stored, relative to the path where the page is in.
    Try to use a different folder for the images, so it is easier to delete them later.
    ImageExportMode How the images will be served to the browser. See t'Creating a file using flexcelaspviewer component' in the Html Exporting Guide for more information.
    ImageTimeout Time in minutes that temporary images will live in the server before being deleted.
    Temporary images older than "current date - imageTimeOut" will be removed each time a new call to this component is made.
    Set this property to 0 or a negative value to not delete any image, if you wish to do the cleanup yourself using a server script.
    See also MaxTemporaryImages
    MaxTemporaryImages Maximum number of temporary images in the images folder. Set it to 0 or a negative value if you want unlimited images.
    Use this variable to avoid Denial of Service conditions. For example, a malicious user could keep continuously refreshing the webpage, without waiting for the page to load. As all images are created each time he refreshes, but they are never deleted (because they are never requested back) the disk could fill very fast, not giving time to the ImageTimeout...[more]
    ImageHandlerName Name for the ImageHandler used to return images when ImageExportMode is not TImageExport​Mode.​Temporary​Files.
    You need to add this name in web.config in your app.
    ImageParameterName Name for the parameter used to return the image in the URL. name when ImageExportMode is TImageExport​Mode.​Unique​Temporary​Files.
    This parameter will appear in the url as: http:​//​server/​.​.​.​/flexcelviewer.​ashx?​IMAGEPARAMETERNAME=​Imagename

    Events

    Name Description
    ImageLink Use this event to customize the links in the HTML file when using TImageExport​Mode.​Custom​Storage.
    SaveImage Use this event to save the images into other place. You will normally need to use this event when implementing your own Http Handler to return the images.
    NamedRangeExport Use this event to customize how a named range if exported to the HTML file. Note that for this event to be called, you first need to set HtmlExport.ExportNamedRanges = true. If you want to change the id that will be exported or exclude certain named from being exported, you can do so here.
    In This Article
    Back to top FlexCel Studio for the .NET Framework v7.24.0.0
    © 2002 - 2025 tmssoftware.com