Spread ASP.NET 16
Spread for ASP.NET 16 Product Documentation / Developer's Guide / Customizing the Appearance / Customizing the Appearance of the Sheet / Adding an Image to the Sheet
In This Topic
    Adding an Image to the Sheet
    In This Topic

    You can add a floating image to the sheet that can be exported to an Excel-formatted file.

    Sheet with an image

    You can use the AddImage or Add method to add the image to the sheet.

    Using Code

    1. Create an image object with the SpreadImage class.
    2. Set any image properties.
    3. Add the image to the sheet.

    Example

    This example adds an image to the sheet.

    C#
    Copy Code
    FarPoint.Web.Spread.SpreadImage image = new FarPoint.Web.Spread.SpreadImage();
    image.CanMove = true;
    image.CanSelect = true;
    image.ImageUrl = "fplogo.png";
    image.Width = 200;
    image.Height = 150;
    image.Left = 50;
    image.Top = 50;
    FpSpread1.ActiveSheetView.Images.Add(image);
    VB
    Copy Code
    Dim Image As New FarPoint.Web.Spread.SpreadImage()
    Image.CanMove = True
    Image.CanSelect = True
    Image.ImageUrl = "fplogo.png"
    Image.Width = 200
    Image.Height = 150
    Image.Left = 50
    Image.Top = 50
    FpSpread1.ActiveSheetView.Images.Add(Image)
    See Also