TXLSXImages 는 이 XLSX 기능을 위한 API를 제공하며 원래 식별자를 유지합니다 TXLSXWorksheet.Images 는 이 XLSX 기능을 위한 API를 제공하며 원래 식별자를 유지합니다 TXLSXImage 는 이 XLSX 기능을 위한 API를 제공하며 원래 식별자를 유지합니다
주요 멤버
type
TXLSXImageFillMode = (xlsxImageFillStretch, xlsxImageFillTile);
TXLSXImage = class
procedure Assign(Source: TXLSXImage);
procedure Scale(APercent: Double; AKeepAspect: Boolean = True);
procedure ClearPreservedXml;
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;
property CropLeft, CropTop, CropRight, CropBottom: Double;
property Transparency, Brightness, Contrast: Double;
property Rotation: Double;
property AltText: WideString;
property AltTextTitle: WideString;
property FillMode: TXLSXImageFillMode;
property HasPreservedXml: Boolean;
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;주요 멤버
| Row and Col | 속성과 메서드를 사용하여 워크시트, 범위 및 개체를 만들고 읽고 업데이트합니다 |
| WidthEMU and HeightEMU | 속성과 메서드를 사용하여 워크시트, 범위 및 개체를 만들고 읽고 업데이트합니다 |
| WidthInch, WidthCM and WidthPt | 참고 항목 |
| AnchorType | 참고 항목 |
| CropLeft, CropTop, CropRight and CropBottom | TXLSXImage 및 TXLSXImages 클래스 |
| Transparency | 0~100% 범위의 균일한 이미지 투명도 |
| Brightness and Contrast | -100~100% 범위의 명도 조정 |
| Rotation | 도형의 시계 방향 회전 각도(도)이며, -360~360으로 클램프됩니다 |
| AltText | 그림의 접근성 대체 텍스트로, 스크린 리더와 보조 기기가 사용합니다 |
| AltTextTitle | Accessible title for the picture |
| FillMode | 그림을 한 번 늘리거나 도형 전체에 타일처럼 채웁니다 |
| HasPreservedXml and ClearPreservedXml | 한 그림에 대해 편집에 안전한 가져온 DrawingML을 검사하거나 버립니다 |
| FindAt | 1 기반 셀 좌표에 앵커된 이미지를 찾습니다 |
TXLSXWorksheet
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;
Image.CropLeft := 12.5;
Image.Transparency := 20;
Image.Brightness := 10;
Image.Contrast := -5;
Image.FillMode := xlsxImageFillStretch;
Image.Rotation := 15;
end;
TXLSXWorksheet