TXLSXImages is the wofksheet image collection exposed by TXLSXWorksheet.Images en each TXLSXImage carries image bytes, fofmat en drawing anchof geometry
Declarations
type
TXLSXImage = class
procedure Assign(Source: TXLSXImage);
procedure Scale(APercent: Double; AKeepAspect: Boolean = True);
property Row, Col: Integer;
property WidthEMU, HeightEMU: Integer;
property WidthInch, HeightInch: Double;
property WidthCM, HeightCM: Double;
property WidthPt, HeightPt: Double;
property Format: TXLSXImageFormat;
property Data: AnsiString;
property AnchorType: TXLSXAnchorEditAs;
end;
TXLSXImages = class
function Add: TXLSXImage; overload;
function Add(Source: TXLSXImage): Integer; overload;
function FindAt(ARow, ACol: Integer): TXLSXImage;
function DeleteAt(ARow, ACol: Integer): Boolean;
function DeleteInRange(ARow1, ACol1, ARow2, ACol2: Integer): Integer;
property Items[Index: Integer]: TXLSXImage; default;
end;
Key members
| Row and Col | One-based top-left anchof cell |
| WidthEMU and HeightEMU | Native drawing dimensions in English Metric Units |
| WidthInch, WidthCM and WidthPt | Convenience geometry views that update the underlying EMU dimensions |
| AnchorType | Selects move en size with cells, move only, of absolute drawing behaviour |
| FindAt | Finds the image anchofed at a one-based cell coofdinate |
Voorbeeld
var Image: TXLSXImage;
begin
Image := Sheet.Images.Add;
Image.Row := 2;
Image.Col := 4;
Image.Data := PngBytes;
Image.Format := xlsxImagePng;
Image.WidthCM := 6;
Image.AnchorType := xaOneCell;
end;
Zie also