📄 uexceladapter.pas
字号:
property PrinterDriverSettings: TPrinterDriverSettings read GetPrinterDriverSettings write SetPrinterDriverSettings;
procedure DeleteMarkedRows(const Mark: Widestring);virtual;abstract;
procedure MakePageBreaks(const Mark: Widestring);virtual;abstract;
procedure InsertHPageBreak(const Row: integer);virtual;abstract;
procedure InsertVPageBreak(const Col: integer);virtual;abstract;
procedure DeleteHPageBreak(const Row: integer);virtual;abstract;
procedure DeleteVPageBreak(const Col: integer);virtual;abstract;
function HasHPageBreak(const Row: integer): boolean;virtual;abstract;
function HasVPageBreak(const Col: integer): boolean;virtual;abstract;
procedure RefreshPivotTables;virtual;abstract;
procedure RefreshChartRanges(const VarStr: string);virtual;abstract;
procedure Save(const AutoClose: boolean; const FileName: string; const OnGetFileName: TOnGetFileNameEvent; const OnGetOutStream: TOnGetOutStreamEvent=nil; const DataStream: TStream=nil);virtual;abstract;
procedure InsertAndCopyRows(const FirstRow, LastRow, DestRow, aCount: integer; const OnlyFormulas: boolean);virtual;abstract;
procedure InsertAndCopyCols(const FirstCol, LastCol, DestCol, aCount: integer; const OnlyFormulas: boolean);virtual;abstract;
procedure DeleteRows(const aRow, aCount: integer);virtual;abstract;
procedure DeleteCols(const aCol, aCount: integer);virtual;abstract;
procedure BeginSheet; virtual; abstract;
procedure EndSheet(const RowOffset: integer); virtual; abstract;
function CanOptimizeRead: boolean; virtual;abstract;
property RangeCount: integer read GetExcelNameCount;
property RangeName[index: integer]: Widestring read GetRangeName;
property RangeR1[index: integer]: integer read GetRangeR1 write SetRangeR1;
property RangeR2[index: integer]: integer read GetRangeR2 write SetRangeR2;
property RangeC1[index: integer]: integer read GetRangeC1 write SetRangeC1;
property RangeC2[index: integer]: integer read GetRangeC2 write SetRangeC2;
property RangeSheet[index: integer]: integer read GetRangeSheet;
procedure AddRange(var NamedRange: TXlsNamedRange);virtual;abstract;
property PicturesCount[Row: integer]: integer read GetPicturesCount;
property PictureName[Row: integer; aPos: integer]: Widestring read GetPictureName;
procedure AssignPicture(const Row, aPos: integer; const Pic: string; const PicType: TXlsImgTypes); overload; virtual;abstract;
procedure AssignPicture(const Row, aPos: integer; const Pic: string; const PicType: TXlsImgTypes; const Props: TImageProperties; const Anchor: TFlxAnchorType=at_MoveAndDontResize);overload; virtual; abstract;
procedure AssignPictureProperties(const Row, aPos: integer; const Props: TImageProperties; const Anchor: TFlxAnchorType=at_MoveAndDontResize);virtual;abstract;
procedure GetPicture(const Row, aPos: integer; const Pic: TStream; var PicType: TXlsImgTypes; var Anchor: TClientAnchor);virtual;abstract; //use row < 0 to return all
procedure DeleteImage(const Index: integer);virtual;abstract;
procedure ClearImage(const Index: integer);virtual;abstract;
procedure AddImage(const Data: string; const DataType: TXlsImgTypes; const Properties: TImageProperties;const Anchor: TFlxAnchorType);virtual;abstract;
property CommentsCount[Row: integer]: integer read GetCommentsCount;
property CommentText[Row: integer; aPos: integer]: Widestring read GetCommentText;
property CommentColumn[Row: integer; aPos: integer]: integer read GetCommentColumn;
procedure AssignComment(const Row, aPos: integer; const Comment: Widestring); virtual;abstract;
procedure SetCellComment(Row, Col: integer; const Value: widestring; const Properties: TImageProperties); virtual; abstract;
function GetCellComment(Row, Col: integer): widestring; virtual; abstract;
function CellCount(const aRow: integer): integer;virtual;abstract;
function GetCellData(const aRow, aColOffset: integer): variant;virtual;abstract;
function GetCellDataX(const aRow, aColOffset: integer): TXlsCellValue;virtual;abstract;
procedure GetCellDataX2(const aRow, aColOffset: integer;out v: TXlsCellValue; out RTFRuns: TRTFRunList);virtual;abstract;
procedure AssignCellData(const aRow, aColOffset: integer; const Value: variant);virtual;abstract;
procedure AssignCellDataX(const aRow, aColOffset: integer; const Value: TXlsCellValue);virtual;abstract;
procedure AssignCellDataX2(const aRow, aColOffset: integer; const Value: TXlsCellValue; const RTFRuns: TRTFRunList);virtual;abstract;
procedure GetCellValueX2(aRow, aCol: integer; out v: TXlsCellValue; out RTFRuns: TRTFRunList); virtual; abstract;
procedure AssignCellValueX2(aRow, aCol: integer; const Value: TXlsCellValue; const RTFRuns: TRTFRunList); virtual; abstract;
procedure SetCellString(const aRow, aCol: integer; const Text: Widestring; const DateFormat: widestring=''; const TimeFormat: widestring=''); overload; virtual; abstract;
procedure SetCellString(const aRow, aCol: integer; const Text: Widestring; const Fm: TFlxFormat; const DateFormat: widestring=''; const TimeFormat: widestring=''); overload; virtual; abstract;
function MaxRow: integer; virtual;abstract;
function MaxCol: integer; virtual;abstract;
function IsEmptyRow(const aRow: integer): boolean; virtual; abstract;
property CellValue[aRow, aCol: integer]: Variant read GetCellValue write SetCellValue; //this is for ole handling
property CellValueX[aRow, aCol: integer]: TXlsCellValue read GetCellValueX write SetCellValueX; //this is for ole handling
property CellFormat[aRow, aCol: integer]: integer read GetCellFormat write SetCellFormat;
property CellFormula[aRow, aCol: integer]: widestring read GetCellFormula write SetCellFormula;
procedure SetCellFormulaX(aRow, aCol: integer; const Formula: widestring; const Value: variant); virtual; abstract;
function ColByIndex(const Row, ColIndex: integer): integer;virtual; abstract;
function ColIndexCount(const Row: integer): integer; virtual; abstract;
function ColIndex(const Row, Col: integer): integer;virtual; abstract;
property ColumnWidth[aCol: integer]: integer read GetColumnWidth write SetColumnWidth;
property ColumnWidthHiddenIsZero[aCol: integer]: integer read GetColumnWidthHiddenIsZero;
property RowHeight[aRow: integer]: integer read GetRowHeight write SetRowHeight;
property RowHeightHiddenIsZero[aRow: integer]: integer read GetRowHeight;
property ColumnHidden[const aCol: integer]: boolean read GetColumnHidden write SetColumnHidden;
property RowHidden[const aRow: integer]: boolean read GetRowHidden write SetRowHidden;
property DefaultColWidth: integer read GetDefaultColWidth;
property DefaultRowHeight: integer read GetDefaultRowHeight;
property ColumnFormat[aColumn: integer]: integer read GetColumnFormat write SetColumnFormat;
property RowFormat[aRow: integer]: integer read GetRowFormat write SetRowFormat;
procedure SetBounds(const aRangePos: integer);virtual;abstract;
function GetFirstColumn: integer; virtual; abstract;
procedure PrepareBlockData(const R1,C1,R2,C2: integer);virtual;abstract;
procedure AssignBlockData(const Row,Col: integer; const v: variant);virtual;abstract;
procedure PasteBlockData;virtual;abstract;
function IsWorksheet(const index: integer): boolean; virtual; abstract;
property AutoRowHeight[Row: integer]: boolean read GetAutoRowHeight write SetAutoRowHeight;
property ColorPalette[Index: TColorPaletteRange]: LongWord read GetColorPalette write SetColorPalette;
function GetUsedPaletteColors: BooleanArray; virtual; abstract;
property FontList[index: integer]: TFlxFont read GetFontList write SetFontList;
function FontListCount: integer;virtual; abstract;
property FormatList[index: integer]: TFlxFormat read GetFormatList write SetFormatList;
function FormatListCount: integer;virtual; abstract;
function AddFormat (const Fmt: TFlxFormat): integer;virtual; abstract;
function AddFont (const Fmt: TFlxFont): integer;virtual; abstract;
property CellMergedBounds[aRow, aCol: integer]: TXlsCellRange read GetCellMergedBounds;
procedure MergeCells(const FirstRow, FirstCol, LastRow, LastCol: integer); virtual; abstract;
procedure UnMergeCells(const FirstRow, FirstCol, LastRow, LastCol: integer); virtual; abstract;
function CellMergedListCount: integer; virtual; abstract;
property CellMergedList[index: integer]: TXlsCellRange read GetCellMergedList;
procedure CopyToClipboard; overload; virtual; abstract;
procedure CopyToClipboard(const Range: TXlsCellRange); overload; virtual; abstract;
procedure PasteFromClipboard(const Row, Col: integer);virtual;abstract;
procedure ParseComments; virtual;abstract;
function HyperLinkCount: integer; virtual; abstract;
function GetHyperLink(const HyperLinkIndex:integer):THyperLink; virtual; abstract;
procedure SetHyperLink(const HyperLinkIndex:integer; const value: THyperLink); virtual; abstract;
function GetHyperLinkCellRange(const HyperLinkIndex: integer):TXlsCellRange; virtual; abstract;
procedure SetHyperLinkCellRange(const HyperLinkIndex: integer; const CellRange:TXlsCellRange ); virtual; abstract;
procedure AddHyperLink(const CellRange: TXlsCellRange; const value: THyperLink); virtual; abstract;
procedure DeleteHyperLink(const HyperLinkIndex: integer); virtual; abstract;
function GetRowOutlineLevel(const aRow: integer): integer;virtual;abstract;
procedure SetRowOutlineLevel(const FirstRow, LastRow: integer ;const Value: integer);virtual;abstract;
function GetColOutlineLevel(const aCol: integer): integer;virtual;abstract;
procedure SetColOutlineLevel(const FirstCol, LastCol: integer ;const Level: integer);virtual;abstract;
property OutlineSummaryRowsBelowDetail: boolean read GetOutlineSummaryRowsBelowDetail write SetOutlineSummaryRowsBelowDetail;
property OutlineSummaryColsRightOfDetail: boolean read GetOutlineSummaryColsRightOfDetail write SetOutlineSummaryColsRightOfDetail;
property OutlineAutomaticStyles: boolean read GetOutlineAutomaticStyles write SetOutlineAutomaticStyles;
property Options1904Dates: boolean read GetOptions1904Dates write SetOptions1904Dates;
property OptionsR1C1: boolean read GetOptionsR1C1 write SetOptionsR1C1;
property OptionsSaveExternalLinkValues: boolean read GetOptionsSaveExternalLinkValues write SetOptionsSaveExternalLinkValues;
property OptionsPrecisionAsDisplayed: boolean read GetOptionsPrecisionAsDisplayed write SetOptionsPrecisionAsDisplayed;
procedure FreezePanes(const Row, Col: integer);virtual;abstract;
procedure GetFrozenPanes(var Row, Col: integer);virtual;abstract;
procedure SplitWindow(const xOffset, yOffset: integer);virtual;abstract;
procedure GetSplitWindow(var xOffset, yOffset: integer);virtual;abstract;
property InvalidateFormulas: boolean read GetInvalidateFormulas write SetInvalidateFormulas;
procedure AutofitRow(const row1, row2: integer; const AutofitNotAutofittingRows: Boolean; const keepHeightAutomatic: Boolean; const adjustment: extended);virtual; abstract;
procedure AutofitCol(const Col1, Col2: integer; const IgnoreStrings: Boolean; const Adjustment: extended);virtual; abstract;
procedure AutofitRowsOnWorkbook(const AutofitNotAutofittingRows: Boolean; const KeepSizesAutomatic: Boolean; const Adjustment: extended);virtual; abstract;
end;
TExcelAdapter = class(TComponent)
private
{ Private declarations }
protected
{ Protected declarations }
public
function GetWorkbook: TExcelFile;virtual;abstract;
{ Public declarations }
published
{ Published declarations }
end;
procedure Register;
implementation
procedure Register;
begin
//No Register...
end;
{ TExcelFile }
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -