Docs HotXLS

AddPicture-method

Inserts a picture shape into the worksheet at the specified cell coordinate or as a free-floating image

Syntaxe

function AddPicture(FileName: WideString): TXLSPicture; overload; function AddPicture(FileName: WideString; ARow, ACol: Integer): TXLSPicture; overload; function AddPicture(Bitmap: Graphics.TBitmap; Transparent: Boolean = False): TXLSPicture; overload; function AddPicture(Bitmap: Graphics.TBitmap; ARow, ACol: Integer; Transparent: Boolean = False): TXLSPicture; overload;

Exemple

This example adds a picture to the first worksheet at row 5, column 2

Workbook.Sheets[1].Shapes.AddPicture('c:\images\logo.png', 5, 2);