Dokumentacja HotXLS

TXLSXWorksheet class

Single worksheet inside a TXLSXWorkbook Posiada kolekcję komórek oraz kolekcje scalonych komórek, hiperłączy i komentarzy. Zadeklarowany w lxHandleX

Declaration

type
  TXLSXTextBox = class
    constructor Create(const AText: WideString; AFromRow, AFromCol, AToRow, AToCol: Integer);
    property Text: WideString;
    property FromRow, FromCol, ToRow, ToCol: Integer;
  end;

  TXLSXIgnoredError = class
    constructor Create(const ASqRef: WideString);
    procedure Assign(Source: TXLSXIgnoredError);
    property SqRef: WideString;
    property EvalError: Boolean;
    property TwoDigitTextYear: Boolean;
    property NumberStoredAsText: Boolean;
    property Formula: Boolean;
    property FormulaRange: Boolean;
    property UnlockedFormula: Boolean;
    property EmptyCellReference: Boolean;
    property ListDataValidation: Boolean;
    property CalculatedColumn: Boolean;
  end;

  TXLSXIgnoredErrors = class
    function Add(const ASqRef: WideString): TXLSXIgnoredError;
    function AddExisting(Source: TXLSXIgnoredError): TXLSXIgnoredError;
    procedure Delete(Index: Integer);
    procedure Clear;
    property Count: Integer;
    property Items[Index: Integer]: TXLSXIgnoredError; default;
  end;

  TXLSXScenarioInputCell = class
    property Ref: WideString;
    property Value: WideString;
    property NumberFormatId: Integer;
    property Deleted: Boolean;
    property Undone: Boolean;
  end;

  TXLSXScenarioInputCells = class
    function Add(const ARef, AValue: WideString): TXLSXScenarioInputCell;
    procedure Delete(Index: Integer);
    procedure Clear;
    property Count: Integer;
    property Items[Index: Integer]: TXLSXScenarioInputCell; default;
  end;

  TXLSXScenario = class
    property Name: WideString;
    property Locked: Boolean;
    property Hidden: Boolean;
    property User: WideString;
    property Comment: WideString;
    property InputCells: TXLSXScenarioInputCells;
  end;

  TXLSXScenarios = class
    function Add(const AName: WideString): TXLSXScenario;
    function FindByName(const AName: WideString): TXLSXScenario;
    procedure Delete(Index: Integer);
    procedure Clear;
    property Count: Integer;
    property Items[Index: Integer]: TXLSXScenario; default;
    property CurrentIndex: Integer;
    property ShownIndex: Integer;
    property SqRef: WideString;
  end;

  TXLSXWorksheet = class
    constructor Create(const AName: WideString);
    destructor Destroy; override;
    procedure SetWorkbook(AWorkbook: TXLSXWorkbook);
    function MergeCells(ARow1, ACol1, ARow2, ACol2: Integer): Integer;
    function FillMergedCellValues: Integer;
    property FormControls: TXLSXFormControls;
    function AddHyperlink(ARow, ACol: Integer; const AUrl: WideString): Integer; overload;
    function AddHyperlink(ARow, ACol: Integer; const AUrl, ADisplay: WideString): Integer; overload;
    function AddHyperlink(ARow, ACol: Integer; const AUrl, ADisplay, ATooltip: WideString): Integer; overload;
    function AddComment(ARow, ACol: Integer; const AText: WideString): Integer; overload;
    function AddComment(ARow, ACol: Integer; const AText, AAuthor: WideString): Integer; overload;
    function AddImage(ARow, ACol: Integer; const AData: AnsiString; AFormat: TXLSXImageFormat): Integer;
    function AddImageFromFile(ARow, ACol: Integer; const AFileName: WideString): Integer;
    function AddConditionalFormat(const ARange: WideString; AOp: TXLSXCfOperator; const AFormula1: WideString): Integer; overload;
    function AddConditionalFormat(const ARange: WideString; AOp: TXLSXCfOperator; const AFormula1, AFormula2: WideString): Integer; overload;
    // Excel 2007+ extension rules (v2.36.0+) — mirror the BIFF8 TXLSWorksheet API.
    // Their colors are BGR ($00BBGGRR, like a VCL TColor), not the ARGB used by fonts and fills
    function AddCondFormatDataBar(const ARange: WideString; AColor: LongWord;
      AMinKind: TXLSCfValueKind = cfvMinOfRange; const AMinValue: WideString = '';
      AMaxKind: TXLSCfValueKind = cfvMaxOfRange; const AMaxValue: WideString = ''): Integer;
    function AddCondFormatColorScale2(const ARange: WideString;
      AMinColor, AMaxColor: LongWord;
      AMinKind: TXLSCfValueKind = cfvMinOfRange; const AMinValue: WideString = '';
      AMaxKind: TXLSCfValueKind = cfvMaxOfRange; const AMaxValue: WideString = ''): Integer;
    function AddCondFormatColorScale3(const ARange: WideString;
      AMinColor, AMidColor, AMaxColor: LongWord;
      AMinKind: TXLSCfValueKind = cfvMinOfRange; const AMinValue: WideString = '';
      AMidKind: TXLSCfValueKind = cfvPercentile; const AMidValue: WideString = '50';
      AMaxKind: TXLSCfValueKind = cfvMaxOfRange; const AMaxValue: WideString = ''): Integer;
    function AddCondFormatIconSet(const ARange: WideString;
      ASetType: TXLSIconSetType): Integer;
    function AddCondFormatExpression(const ARange: WideString;
      const AFormula: WideString): Integer;
    function AddCondFormatContainsText(const ARange, AText: WideString): Integer;
    function AddCondFormatNotContainsText(const ARange, AText: WideString): Integer;
    function AddCondFormatBeginsWith(const ARange, AText: WideString): Integer;
    function AddCondFormatEndsWith(const ARange, AText: WideString): Integer;
    function AddCondFormatTop10(const ARange: WideString; ARank: Integer;
      ABottom: Boolean = False; APercent: Boolean = False): Integer;
    function AddCondFormatAboveAverage(const ARange: WideString;
      AAbove: Boolean = True): Integer;
    function AddCondFormatDuplicateValues(const ARange: WideString): Integer;
    function AddCondFormatUniqueValues(const ARange: WideString): Integer;
    function AddCondFormatContainsBlanks(const ARange: WideString): Integer;
    function AddCondFormatNotContainsBlanks(const ARange: WideString): Integer;
    function AddCondFormatContainsErrors(const ARange: WideString): Integer;
    function AddCondFormatNotContainsErrors(const ARange: WideString): Integer;
    function AddDataValidation(const ARange: WideString; AType: TXLSXDataValidationType; AOp: TXLSXDvOperator; const AFormula1: WideString): Integer; overload;
    function AddDataValidation(const ARange: WideString; AType: TXLSXDataValidationType; AOp: TXLSXDvOperator; const AFormula1, AFormula2: WideString): Integer; overload;
    function AddListValidation(const ARange, AItems: WideString): Integer;
    function AddWholeNumberValidation(const ARange: WideString; AOp: TXLSXDvOperator; const AFormula1: WideString): Integer; overload;
    function AddWholeNumberValidation(const ARange: WideString; AOp: TXLSXDvOperator; const AFormula1, AFormula2: WideString): Integer; overload;
    function AddDecimalValidation(const ARange: WideString; AOp: TXLSXDvOperator; const AFormula1: WideString): Integer; overload;
    function AddDecimalValidation(const ARange: WideString; AOp: TXLSXDvOperator; const AFormula1, AFormula2: WideString): Integer; overload;
    function AddDateValidation(const ARange: WideString; AOp: TXLSXDvOperator; const AFormula1: WideString): Integer; overload;
    function AddDateValidation(const ARange: WideString; AOp: TXLSXDvOperator; const AFormula1, AFormula2: WideString): Integer; overload;
    function AddTimeValidation(const ARange: WideString; AOp: TXLSXDvOperator; const AFormula1: WideString): Integer; overload;
    function AddTimeValidation(const ARange: WideString; AOp: TXLSXDvOperator; const AFormula1, AFormula2: WideString): Integer; overload;
    function AddTextLengthValidation(const ARange: WideString; AOp: TXLSXDvOperator; const AFormula1: WideString): Integer; overload;
    function AddTextLengthValidation(const ARange: WideString; AOp: TXLSXDvOperator; const AFormula1, AFormula2: WideString): Integer; overload;
    function AddCustomValidation(const ARange, AFormula: WideString): Integer;
    function CheckDataValidation(ARow, ACol: Integer; const AValue: Variant;
      SetIfValid: Boolean = False): Integer;
    // Excel-style table (insert table) — see TXLSXTable.
    function AddTable(const AName, ARange: WideString; AColumns: TStrings): Integer;
    // Chart helpers — anchored or full-page (via AddChartSheet on workbook).
    function AddChart(AChartType: TXLSXChartType; const ATitle: WideString;
      AFromRow, AFromCol, AToRow, AToCol: Integer): TXLSXChart;
    // Standalone drawing text boxes.
    function AddTextBox(const AText: WideString;
      AFromRow, AFromCol, AToRow, AToCol: Integer): TXLSXTextBox;
    function TextBoxCount: Integer;
    function TextBox(Index: Integer): TXLSXTextBox;
    function IndexOfTextBoxAt(ARow, ACol: Integer): Integer;
    function FindTextBoxAt(ARow, ACol: Integer): TXLSXTextBox;
    procedure DeleteTextBox(Index: Integer);
    function DeleteTextBoxAt(ARow, ACol: Integer): Boolean;
    function DeleteTextBoxesInRange(ARow1, ACol1, ARow2, ACol2: Integer): Integer;
    procedure ClearTextBoxes;
    // Internal Sheet!Cell hyperlink (no rels relationship needed).
    function AddHyperlinkToCell(ARow, ACol: Integer; const ALocation: WideString): Integer; overload;
    function AddHyperlinkToCell(ARow, ACol: Integer; const ALocation, ADisplay: WideString): Integer; overload;
    function AddHyperlinkToCell(ARow, ACol: Integer; const ALocation, ADisplay, ATooltip: WideString): Integer; overload;
    // Sheet visibility and selection state.
    property Visibility: TXLSXSheetVisibility;
    property Visible: Boolean;
    property IsSelected: Boolean;
    procedure SetIsSelected(Value: Boolean);
    // Auto-fit column width / row height from cell content.
    procedure AutoFitColumn(ACol: Integer; AMinWidth: Double = 0; AMaxWidth: Double = 0);
    procedure AutoFitColumns(AColMin, AColMax: Integer; AMinWidth: Double = 0; AMaxWidth: Double = 0);
    procedure AutoFitRow(ARow: Integer; AMinHeight: Double = 0; AMaxHeight: Double = 0);
    procedure AutoFitRows(ARowMin, ARowMax: Integer; AMinHeight: Double = 0; AMaxHeight: Double = 0);
    // Row / column insert and delete with cascade shift.
    procedure InsertRows(BeforeRow, Count: Integer);
    procedure DeleteRows(StartRow, Count: Integer);
    procedure InsertCols(BeforeCol, Count: Integer);
    procedure DeleteCols(StartCol, Count: Integer);
    // Manual page breaks.
    procedure AddRowBreak(BeforeRow: Integer);
    procedure AddColBreak(BeforeCol: Integer);
    function  HasRowBreak(BeforeRow: Integer): Boolean;
    function  HasColBreak(BeforeCol: Integer): Boolean;
    function  IndexOfRowBreak(BeforeRow: Integer): Integer;
    function  IndexOfColBreak(BeforeCol: Integer): Integer;
    procedure RemoveRowBreak(BeforeRow: Integer);
    procedure RemoveColBreak(BeforeCol: Integer);
    function  RemoveRowBreaksInRange(FirstRow, LastRow: Integer): Integer;
    function  RemoveColBreaksInRange(FirstCol, LastCol: Integer): Integer;
    procedure ClearRowBreaks;
    procedure ClearColBreaks;
    procedure ClearAllPageBreaks;
    function  RowBreakCount: Integer;
    function  ColBreakCount: Integer;
    function  RowBreaks(Index: Integer): Integer;
    function  ColBreaks(Index: Integer): Integer;
    function  KeepRowLinkLevel(AfterRow: Integer): Integer;
    function  KeepColLinkLevel(AfterCol: Integer): Integer;
    function Calculate(const Formula: WideString): Variant;
    function ForEachCell(Callback: TXLSXCellReadEvent): Integer;
    function ForEachFormattedCell(Callback: TXLSXCellTextEvent): Integer;
    function ForEachRow(Callback: TXLSXRowReadEvent): Integer;
    function FindText(const SearchText: WideString; out Row, Col: Integer): Boolean; overload;
    function FindText(const SearchText: WideString; out Row, Col: Integer; MatchCase: Boolean): Boolean; overload;
    function ReplaceText(const SearchText, ReplacementText: WideString): Integer; overload;
    function ReplaceText(const SearchText, ReplacementText: WideString; MatchCase: Boolean): Integer; overload;
    function FindText(const SearchText: WideString; out Row, Col: Integer; Options: TXLSXFindOptions; StartRow, StartCol: Integer): Boolean; overload;
    function FindTextIn(const SearchText: WideString; out Row, Col: Integer; Options: TXLSXFindOptions; FirstRow, FirstCol, LastRow, LastCol, StartRow, StartCol: Integer): Boolean;
    function ReplaceText(const SearchText, ReplacementText: WideString; Options: TXLSXFindOptions): Integer; overload;
    function ReplaceText(const SearchText, ReplacementText: WideString; Options: TXLSXFindOptions; Callback: TXLSXReplaceEvent): Integer; overload;
    function ReplaceTextIn(const SearchText, ReplacementText: WideString; Options: TXLSXFindOptions; FirstRow, FirstCol, LastRow, LastCol: Integer; Callback: TXLSXReplaceEvent): Integer;
    function WriteCells(const ARange: WideString; Callback: TXLSXCellWriteEvent): Integer; overload;
    function WriteCells(ARow1, ACol1, ARow2, ACol2: Integer; Callback: TXLSXCellWriteEvent): Integer; overload;
    function WriteRows(const ARange: WideString; Callback: TXLSXRowWriteEvent): Integer; overload;
    function WriteRows(ARow1, ACol1, ARow2, ACol2: Integer; Callback: TXLSXRowWriteEvent): Integer; overload;
    function WriteFloatRowValues(ARow, ACol: Integer; const AValues: array of Double): Integer;
    function WriteStringRowValues(ARow, ACol: Integer; const AValues: array of WideString): Integer;
    function WriteRowValues(ARow, ACol: Integer; const AValues: array of Variant): Integer;
    function WriteFloatColumnValues(ARow, ACol: Integer; const AValues: array of Double): Integer;
    function WriteStringColumnValues(ARow, ACol: Integer; const AValues: array of WideString): Integer;
    function WriteColumnValues(ARow, ACol: Integer; const AValues: array of Variant): Integer;
    // Column / row metadata.
    procedure SetColWidth(ACol: Integer; AWidth: Double);
    function HasColWidth(ACol: Integer): Boolean;
    procedure ClearColWidths;
    procedure SetRowHeight(ARow: Integer; AHeight: Double);
    function HasRowHeight(ARow: Integer): Boolean;
    procedure ClearRowHeights;
    procedure SetRowOutlineLevel(ARow, ALevel: Integer);
    function HasRowOutlineLevel(ARow: Integer): Boolean;
    procedure ClearRowOutlineLevels;
    procedure SetColOutlineLevel(ACol, ALevel: Integer);
    function HasColOutlineLevel(ACol: Integer): Boolean;
    procedure ClearColOutlineLevels;
    procedure SetRowHidden(ARow: Integer; AHidden: Boolean);
    procedure SetColHidden(ACol: Integer; AHidden: Boolean);
    procedure ClearRowHidden;
    procedure ClearColHidden;
    procedure SetRowCollapsed(ARow: Integer; ACollapsed: Boolean);
    procedure SetColCollapsed(ACol: Integer; ACollapsed: Boolean);
    procedure ClearRowCollapsed;
    procedure ClearColCollapsed;
    function TryGetOutlineNode(AAxis: TXLSOutlineAxis; ANodeIndex: Integer; out ANode: TXLSOutlineNode): Boolean;
    function SetOutlineNodeCollapsed(AAxis: TXLSOutlineAxis; ANodeIndex: Integer; ACollapsed: Boolean; AChildMode: TXLSOutlineChildMode = xocPreserve): Boolean;
    procedure SetOutlineDisplayLevel(AAxis: TXLSOutlineAxis; ADisplayLevel: Integer; AChildMode: TXLSOutlineChildMode = xocPreserve);
    // Range copy / move / clear API.
    procedure ClearRangeValues(const ARange: WideString); overload;
    procedure ClearRangeValues(ARow1, ACol1, ARow2, ACol2: Integer); overload;
    procedure ClearRange(ARow1, ACol1, ARow2, ACol2: Integer);
    procedure CopyRange(ASrcRow1, ASrcCol1, ASrcRow2, ASrcCol2, ADstRow, ADstCol: Integer);
    procedure CopyRangeTo(ASrcRow1, ASrcCol1, ASrcRow2, ASrcCol2: Integer;
      ATargetSheet: TXLSXWorksheet; ADstRow, ADstCol: Integer);
    procedure CopyFrom(ASource: TXLSXWorksheet);
    procedure MoveRange(ASrcRow1, ASrcCol1, ASrcRow2, ASrcCol2, ADstRow, ADstCol: Integer);
    procedure SortRange(ARow1, ACol1, ARow2, ACol2: Integer;
      const AKeyCols: array of Integer; const ADescending: array of Boolean);
    function GetCellVisibleFormat(ARow, ACol: Integer): TXLSXCellStyleState;
    function Subtotal(ARow1, ACol1, ARow2, ACol2, AChangeColumn,
      AFunction: Integer; const ASubtotalColumns: array of Integer): Integer; overload;
    function Subtotal(ARow1, ACol1, ARow2, ACol2, AChangeColumn,
      AFunction: Integer; const ASubtotalColumns: array of Integer;
      const AGrandTotalText: WideString): Integer; overload;
    function SubtotalDefaultEnglishString(AFunction: Integer): WideString;
    // Frozen panes (top rows / left columns).
    procedure FreezePanes(ARow, ACol: Integer);
    procedure UnfreezePane;
    property FreezeCol, FreezeRow: Integer;
    // Page setup.
    procedure SetPageMargins(ALeft, ARight, ATop, ABottom: Double); overload;
    procedure SetPageMargins(ALeft, ARight, ATop, ABottom, AHeader, AFooter: Double); overload;
    property MarginLeft, MarginRight, MarginTop, MarginBottom,
             MarginHeader, MarginFooter: Double;
    property MarginLeftCM, MarginRightCM, MarginTopCM, MarginBottomCM,
             MarginHeaderCM, MarginFooterCM: Double;
    property PageLandscape: Boolean;
    property PaperSize, PageScale, FitToWidth, FitToHeight: Integer;
    property HeaderText, FooterText: WideString;
    property LeftHeader, CenterHeader, RightHeader: WideString;
    property LeftFooter, CenterFooter, RightFooter: WideString;
    property CenterHorizontally, CenterVertically: Boolean;
    property PrintGridlines: Boolean;
    property PrintHeadings: Boolean;
    property BlackAndWhite: Boolean;
    property Draft: Boolean;
    property PrintNotes: Boolean;
    property PrintOverThenDown: Boolean;
    property PrintArea: WideString;
    property PrintTitleRows: WideString;
    property PrintTitleCols: WideString;
    // Auto-filter range (e.g. "A1:C100"). Empty = no filter.
    procedure SetAutoFilter(ARow1, ACol1, ARow2, ACol2: Integer); overload;
    procedure SetAutoFilter(const ARange: WideString); overload;
    procedure ClearAutoFilter;
    property AutoFilterRange: WideString;
    property AutoFilterColumns: TXLSXAutoFilterColumns;
    function AddAutoFilterColumn(AColId: Integer; AOp1: TXLSXAutoFilterOp; const ACriteria1: WideString): TXLSXAutoFilterColumn; overload;
    function AddAutoFilterColumn(AColId: Integer; AOp1: TXLSXAutoFilterOp; const ACriteria1: WideString; AOp2: TXLSXAutoFilterOp; const ACriteria2: WideString; AAndConnector: Boolean): TXLSXAutoFilterColumn; overload;
    procedure ClearAutoFilterColumns;
    function AutoFilterRowVisible(ARow: Integer): Boolean;
    function PreviewAutoFilterRows(Callback: TXLSXAutoFilterRowEvent): Integer;
    function ApplyAutoFilter(const ARange: WideString): Boolean;
    // Sheet protection (16-bit legacy hash).
    procedure Protect; overload;
    procedure Protect(const APassword: WideString); overload;
    procedure UnProtect;
    property IsProtected: Boolean;
    property AllowOption[Option: TXLSXSheetProtectionOption]: Boolean;
    property SheetProtectionOptions: TXLSXSheetProtectionOptions;
    property PageSetupTouched: Boolean;
    property SheetProtectHash: WideString;
    // Sheet tab color + chart-sheet flag.
    property TabColor: LongWord;
    property TabColorIsAuto: Boolean;
    property IsChartSheet: Boolean;
    property Name: WideString;
    property Workbook: TXLSXWorkbook;
    property AlignWithMargins: Boolean;
    property CodeName: WideString;
    property ConsolidateXml: WideString;
    property DifferentFirst: Boolean;
    property DifferentOddEven: Boolean;
    property EvenFooterText: WideString;
    property EvenHeaderText: WideString;
    property FirstFooterText: WideString;
    property FirstHeaderText: WideString;
    property FirstPageNumber: Integer;
    property GridColor: LongWord;
    property HorizontalDpi: Integer;
    property OutlineLevelCol: Integer;
    property OutlineLevelRow: Integer;
    property PaneState: WideString;
    property PhoneticAlignment: WideString;
    property PhoneticFontId: Integer;
    property PhoneticType: WideString;
    property PrintErrors: Integer;
    property ScaleWithDoc: Boolean;
    property ScenariosXml: WideString;
    property SheetProtectAlgorithmName: WideString;
    property SheetProtectHashValue: WideString;
    property SheetProtectSaltValue: WideString;
    property SheetProtectSpinCount: Integer;
    property ShowFormulas: Boolean;
    property ShowOutlineSymbols: Boolean;
    property SortState: TXLSXSortState;
    property SortStateXml: WideString;
    property SummaryBelow: Boolean;
    property SummaryRight: Boolean;
    property UseFirstPageNumber: Boolean;
    property UsePrinterDefaults: Boolean;
    property VerticalDpi: Integer;
    property ZeroHeight: Boolean;
    property ZoomNormal: Integer;
    property ZoomPageLayout: Integer;
    property ZoomSheetLayout: Integer;
    // Sheet view display options.
    property View: TXLSXWindowView;
    property Zoom: Integer;
    property DisplayGridLines: Boolean;
    property DisplayZeros: Boolean;
    property DisplayRightToLeft: Boolean;
    property StandardWidth: Double;
    property StandardHeight: Double;
    // Collections owned by the worksheet.
    property Cells: TXLSXCells;
    property MergedCells: TXLSXMergedCells;
    property Hyperlinks: TXLSXHyperlinks;
    property Comments: TXLSXComments;
    property Images: TXLSXImages;
    property ConditionalFormats: TXLSXConditionalFormats;
    property DataValidations: TXLSXDataValidations;
    property IgnoredErrors: TXLSXIgnoredErrors;
    property Scenarios: TXLSXScenarios;
    property Tables: TXLSXTables;
    property Charts: TXLSXCharts;
    property PivotTables: TXLSPivotTables;
    function AddPivotTable(const SourceRangeA1: WideString; DestRow, DestCol: Integer; const Name: WideString): TXLSPivotTable;
    function AddPivotTableCopy(SourcePivot: TXLSPivotTable; DestRow, DestCol: Integer; const NewName: WideString): TXLSPivotTable;
    function PivotSetDataFieldFormat(DataField: TXLSPivotDataField; const FormatStr: WideString): Word;
    property ColWidth[ACol: Integer]: Double;
    property RowHeight[ARow: Integer]: Double;
    property RowOutlineLevel[ARow: Integer]: Integer;
    property ColOutlineLevel[ACol: Integer]: Integer;
    property RowHidden[ARow: Integer]: Boolean;
    property ColHidden[ACol: Integer]: Boolean;
    property RowCollapsed[ARow: Integer]: Boolean;
    property ColCollapsed[ACol: Integer]: Boolean;
    property Range[const Ref: WideString]: TXLSXRange;
    property RCRange[R1, C1, R2, C2: Integer]: TXLSXRange;
    property UsedRange: TXLSXRange;
    function EntireRow(ARow: Integer): TXLSXRange;
    function EntireColumn(ACol: Integer): TXLSXRange;
    property ProtectedRanges: TXLSXProtectedRanges;
    property RawWorksheetExts: TXLSXRawWorksheetExts;
    property SparklineGroups: TXLSXSparklineGroups;
    property ThreadedComments: TXLSXThreadedComments;
    function AddAreaChart(AChartType: TXLSXChartType; const ATitle: WideString; AFromRow, AFromCol, AToRow, AToCol: Integer): TXLSXChart;
    function AddBarChart(AChartType: TXLSXChartType; const ATitle: WideString; AFromRow, AFromCol, AToRow, AToCol: Integer): TXLSXChart;
    function AddChartFromRange(const ARange: WideString; AChartType: TXLSXChartType): TXLSXChart;
    function AddColumnChart(AChartType: TXLSXChartType; const ATitle: WideString; AFromRow, AFromCol, AToRow, AToCol: Integer): TXLSXChart;
    function AddLineChart(AChartType: TXLSXChartType; const ATitle: WideString; AFromRow, AFromCol, AToRow, AToCol: Integer): TXLSXChart;
    function AddPieChart(AChartType: TXLSXChartType; const ATitle: WideString; AFromRow, AFromCol, AToRow, AToCol: Integer): TXLSXChart;
    function AddSparklineGroup(const ARange, ALocation: WideString; AType: TXLSXSparklineType): TXLSXSparklineGroup;
    function AddThreadedComment(ARow, ACol: Integer; const AText, AAuthor: WideString): TXLSXThreadedComment;
    function AddThreadedReply(AParentComment: TXLSXThreadedComment; const AText, AAuthor: WideString): TXLSXThreadedComment;
    function GetSheetProtectOption(Option: TXLSXSheetProtectionOption): Boolean;
    procedure SetSheetProtectOption(Option: TXLSXSheetProtectionOption; Value: Boolean);
    procedure PasteFromClipboard(StartRow, StartCol: Integer);
    function AddWordArt(const AText, APreset: WideString; AFromRow, AFromCol, AToRow, AToCol: Integer): TXLSXTextBox;
    procedure BuildRowMajorCellOrder;
    procedure ClearRawDrawingAnchors;
    function CreateConditionalFormatEvaluator: TXLSXConditionalFormatEvaluator;
    function RawDrawingAnchor(Index: Integer): WideString;
    function RawDrawingAnchorCount: Integer;
    function AddRawDrawingAnchor(const AXml: WideString): TXLSXDrawingObject;
    procedure BringToFront(AObject: TXLSXDrawingObject);
    procedure SendToBack(AObject: TXLSXDrawingObject);
    procedure BringForward(AObject: TXLSXDrawingObject);
    procedure SendBackward(AObject: TXLSXDrawingObject);
    function SaveAsPDF(const FileName: WideString): Integer; overload;
    function SaveAsPDF(Stream: TStream): Integer; overload;
    procedure ToggleColGrouped(ACol: Integer);
    procedure ToggleRowGrouped(ARow: Integer);
  end;

  TXLSXBuiltinCellStyle = (
    xbsNormal, xbsGood, xbsBad, xbsNeutral,
    xbsCalculation, xbsCheckCell, xbsExplanatoryText, xbsInput,
    xbsLinkedCell, xbsNote, xbsOutput, xbsWarningText,
    xbsHeading1, xbsHeading2, xbsHeading3, xbsHeading4, xbsTitle, xbsTotal,
    xbsAccent1, xbsAccent2, xbsAccent3, xbsAccent4, xbsAccent5, xbsAccent6);

  TXLSXRange = class
    function RefA1: WideString;
    function SaveAsHTML(const FileName: WideString): Integer; overload;
    function SaveAsHTML(const FileName: WideString; Options: TXLSXHtmlExportOptions): Integer; overload;
    function SaveAsHTML(Stream: TStream): Integer; overload;
    function SaveAsHTML(Stream: TStream; Options: TXLSXHtmlExportOptions): Integer; overload;
    procedure SetValue(const V: Variant);
    procedure SetFormula(const F: WideString);
    procedure ClearValues;
    procedure Clear;
    procedure ClearAll;
    procedure SetFontIndex(AIdx: Integer);
    procedure SetFillIndex(AIdx: Integer);
    procedure SetBorderIndex(AIdx: Integer);
    procedure SetNumberFormatIndex(AIdx: Integer);
    procedure SetAlignmentIndex(AIdx: Integer);
    procedure SetNumberFormat(const Fmt: WideString);
    procedure SetBorders(Kind: TXLSXBorderEdgeKind; Style: TXLSXBorderStyle); overload;
    procedure SetBorders(Kind: TXLSXBorderEdgeKind; Style: TXLSXBorderStyle; Color: LongWord); overload;
    procedure SetLocked(ALocked: Boolean);
    procedure SetFormulaHidden(AHidden: Boolean);
    procedure AutoFitColumns(AMinWidth: Double = 0; AMaxWidth: Double = 0);
    procedure AutoFitRows(AMinHeight: Double = 0; AMaxHeight: Double = 0);
    procedure Merge; overload;
    procedure Merge(Across: OleVariant); overload;
    procedure Unmerge;
    function Offset(DRow, DCol: Integer): TXLSXRange;
    function Resize(NewRowCount, NewColCount: Integer): TXLSXRange;
    procedure Sort(AKeyColumn: Integer; ADescending: Boolean = False); overload;
    procedure Sort(const AKeyColumns: array of Integer; const ADescending: array of Boolean); overload;
    procedure ApplyBuiltinStyle(AStyle: TXLSXBuiltinCellStyle);
    procedure CopyTo(ADestRow, ADestCol: Integer);
    procedure MoveTo(ADestRow, ADestCol: Integer);
    procedure InsertRows;
    procedure DeleteRows;
    procedure InsertCols;
    procedure DeleteCols;
  end;
      

Members

NameWorksheet tab name as shown by Excel
SetWorkbook / WorkbookUstawia i udostępnia wsteczne odwołanie do skoroszytu używane przez pomocnicze metody komórek i zasobów wspólnych skoroszytu, takie jak wspólne formaty liczbowe, wypełnienia, obramowania i wyszukiwanie współdzielonych ciągów
CellsCell collection. Use Cells.Item[Row, Col].Value See TXLSXCells / TXLSXCell
CalculateKompiluje i wylicza ciąg formuły Excela w kontekście tego arkusza. Wiodący = jest akceptowany, a odwołania lokalne arkusza, komórki wskazywane przez formuły, odwołania międzyarkuszowe, zakresy nazw zdefiniowanych oraz obsługiwane funkcje tekstowe, daty, dni robocze, inżynierskie/konwersji systemów, bitowe, statystyczne, agregujące i matematyczne są rozwiązywane przez wspólny ewaluator formuł skoroszytu
GetCellVisibleFormat / Subtotal / SubtotalDefaultEnglishString / CheckDataValidationGetCellVisibleFormat rozwiązuje efektywny styl we współrzędnej bez tworzenia pustej komórki. Subtotal grupuje posortowany prostokąt po zmianach wartości jednej absolutnej kolumny arkusza, przyjmuje numery funkcji SUBTOTAL z Excela od 1 do 11 albo od 101 do 111, wstawia wiersze formuł i konspektu oraz zwraca liczbę wstawionych wierszy. SubtotalDefaultEnglishString mapuje numer funkcji SUBTOTAL na jej angielską nazwę (na przykład 1 na Average i 9 na Total). CheckDataValidation zwraca -1 dla poprawnego kandydata albo numer pierwszego niespełnionego reguły (od 1) i zatwierdza tylko, gdy SetIfValid jest true, a wszystkie pasujące reguły przechodzą
ForEachCell / ForEachFormattedCell / ForEachRow / FindText / ReplaceText / WriteCells / WriteRowsNarzędzia do skanowania wczytanych komórek i wierszy, wyszukiwania tekstu, zamiany tekstu i wypełniania zakresów. ForEachCell przechodzi po istniejących komórkach w kolejności wierszy, podając wartość i tekst formuły. ForEachFormattedCell przechodzi po wypełnionych komórkach w kolejności wierszy/kolumn, przekazując wyświetlany tekst każdej komórki z zastosowanym formatem liczbowym, i zwraca liczbę odwiedzonych komórek, respektując anulowanie przez callback. ForEachRow przechodzi po istniejących wierszach w kolejności wierszy i podaje dla każdego wiersza pierwszą i ostatnią wczytaną kolumnę. FindText i ReplaceText skanują wczytane komórki tekstowe w kolejności wierszy, pomijają formuły i wartości nietekstowe i potrafią uwzględniać wielkość liter; przeciążenia z opcjami dodają semantykę okienka Find z Excela (symbole wieloznaczne, dopasowanie całej komórki, wielkość liter, wyszukiwanie po tekście formuły, skanowanie od końca, skanowanie kolumnami), a FindTextIn / ReplaceTextIn zamykają skan w prostokątnym oknie z opcjonalnym callbackiem zamiany dla każdego dopasowania. WriteCells żąda wartości dla zakresu liczbowego lub w stylu A1 i obsługuje pomijanie per komórka oraz anulowanie. WriteRows żąda tablicy Variant dla każdego wiersza i obsługuje pomijanie całych wierszy oraz anulowanie
MergedCellsMerged-range collection. See TXLSXMergedCells
HyperlinksHyperlink collection. See TXLSXHyperlinks
CommentsCell-comment collection. See TXLSXComments
Tables / AddTableExcel-style table band on the worksheet. See TXLSXTable / TXLSXTables
Charts / AddChartKolekcja zakotwiczonych wykresów. Zobacz TXLSXChart / TXLSXCharts Enumeracja typów wykresów obsługuje wykresy kolumnowe, słupkowe, liniowe, kołowe, warstwowe, pierścieniowe, punktowe, bąbelkowe i radarowe. Dla wykresu na pełnej stronie użyj Workbook.AddChartSheet(...)
AddTextBox / TextBoxCount / TextBox / FindTextBoxAtTworzy, wylicza, lokalizuje, usuwa i czyści samodzielne pola tekstowe rysunku zakotwiczone w prostokątach komórek IndexOfTextBoxAt i FindTextBoxAt znajdują pierwsze pole tekstowe zawierające komórkę, a DeleteTextBoxAt, DeleteTextBoxesInRange, DeleteTextBox i ClearTextBoxes usuwają pojedyncze lub zgrupowane pola tekstowe, nie dotykając komentarzy komórek
AddHyperlinkToCell overloadsInternal anchor hyperlink — jumps to a Sheet!Cell location elsewhere in the workbook. No rels relationship is generated. See TXLSXHyperlink.Location
RowOutlineLevel / ColOutlineLevelGroup nesting level (0..7) for the matching row or column. SaveAs emits outlineLevel="N" on the row / col entry
RowHidden / ColHiddenBoolean — drops the row or column from view (hidden="1")
RowCollapsed / ColCollapsedBoolean — marks a row / column whose grouping parent is collapsed (collapsed="1")
FreezePanes(Row, Col) / UnfreezePaneSets a frozen split — the top Row rows and left Col columns stay visible while the remainder scrolls. FreezeCol and FreezeRow are read-only properties exposing the current split
SetPageMargins / Page setup propertiesAll six margins plus PageLandscape, PaperSize, PageScale, FitToWidth, FitToHeight, HeaderText, FooterText, LeftHeader, CenterHeader, RightHeader, LeftFooter, CenterFooter, RightFooter, CenterHorizontally, and CenterVertically. Setting any one triggers the corresponding <pageMargins>, <pageSetup>, and <headerFooter> blocks on SaveAs. Use the named xlsxPaper* constants such as xlsxPaperLetter, xlsxPaperA4, xlsxPaperA3, and xlsxPaperLegal instead of raw Excel paper-size codes when possible
VisibilitySheet visibility: xlsxSheetVisible (default), xlsxSheetHidden (hidden but unhideable in Excel UI), or xlsxSheetVeryHidden (requires VBA or code to unhide). SaveAs emits a state attribute on the <sheet> element in xl/workbook.xmlVisible is a Boolean convenience alias for common show or hide operations
SetIsSelected / IsSelectedGdy True, karta arkusza wygląda na zaznaczoną (podświetloną). Kilka arkuszy może być zaznaczonych jednocześnie. SaveAs emituje tabSelected="1" w pasującym <sheetView>
AutoFitColumn / AutoFitColumnsAutoFitColumn(Col, MinWidth, MaxWidth) mierzy każdą komórkę w kolumnie i ustawia ColWidth[Col] na najszerszą zawartość (ASCII = 1 znak, CJK = 2 znaki, skala Calibri 11pt), a następnie stosuje opcjonalne limity minimalnej i maksymalnej szerokości AutoFitColumns(Min, Max, MinWidth, MaxWidth) iteruje po zakresie kolumn, ograniczonym do ostatniej kolumny zawierającej komórki
AutoFitRow / AutoFitRowsAutoFitRow(Row, MinHeight, MaxHeight) ustawia RowHeight[Row] na najwyższą zawartość komórki w tym wierszu (w punktach), a następnie stosuje opcjonalne limity minimalnej i maksymalnej wysokości AutoFitRows(Min, Max, MinHeight, MaxHeight) iteruje po zakresie wierszy, ograniczonym do ostatniego wiersza zawierającego komórki
InsertRows / DeleteRowsInsertRows(BeforeRow, Count) przesuwa każdy wiersz w BeforeRow i poniżej w dół o Count. DeleteRows(StartRow, Count) usuwa wiersze [StartRow, StartRow+Count-1] i podciąga resztę do góry. Obie operacje kaskadowo obejmują komórki, scalone zakresy, wysokości wierszy, poziomy konspektu, flagi ukrycia, hiperłącza, komentarze, zamrożone okienka oraz odwołania autofiltra / formatowania warunkowego / sprawdzania poprawności danych, tabele, formuły komórek, formuły formatowania warunkowego / sprawdzania poprawności danych, wewnętrzne cele hiperłączy, odwołania ustawień wydruku, ręczne podziały stron, kryteria kolumn autofiltra, zakresy serii wykresów i nazwy zdefiniowane wskazujące na edytowany arkusz, kotwice obrazów oraz kotwice wykresów
InsertCols / DeleteColsJak InsertRows / DeleteRows, ale działające na kolumnach. Szerokości kolumn, poziomy konspektu i flagi ukrycia również są aktualizowane
AddRowBreak / AddColBreakAddRowBreak(N) inserts a manual page break before row N (i.e. row N starts a new printed page). AddColBreak(N) breaks before column N. SaveAs writes <rowBreaks> / <colBreaks> in the sheet XML
HasRowBreak / HasColBreak / IndexOfRowBreak / IndexOfColBreakQuery or locate a single manual break by its "before" index
RemoveRowBreak / RemoveColBreak / RemoveRowBreaksInRange / RemoveColBreaksInRangeUsuwa jeden ręczny podział lub wszystkie podziały w domkniętym przedziale wierszy / kolumn; pomocnicze metody zakresów przyjmują odwrócone współrzędne i zwracają liczbę usuniętych podziałów
ClearRowBreaks / ClearColBreaks / ClearAllPageBreaksRemove all row breaks, all column breaks, or both
RowBreakCount / ColBreakCount / RowBreaks[i] / ColBreaks[i]Iterate stored break indices (1-based "Before" values)
KeepRowLinkLevel / KeepColLinkLevelZwraca najsilniejszy poziom "trzymaj razem" łączący wiersz (lub kolumnę) po podanym indeksie z blokiem powyżej (lub po lewej) albo 0 , gdy pozycja nie leży wewnątrz bloku keep-together
PrintGridlines / PrintHeadingsWhen True, SaveAs emits printGridLines="1" / printRowColHeadings="1" inside <printOptions> so row/column grid lines or headings appear on the printed page
BlackAndWhite / Draft / PrintNotes / PrintOverThenDownPrint options in <pageSetup>: BlackAndWhite renders in B&W; Draft suppresses graphics for faster preview; PrintNotes prints cell comments as displayed; PrintOverThenDown switches page order to left-to-right-first instead of top-to-bottom-first
PrintAreaThe rectangular region Excel prints (e.g "$A$1:$D$10"). Written as a workbook-level <definedName name="_xlnm.Print_Area"> scoped to this sheet. Empty string = not set
PrintTitleRows / PrintTitleColsRow or column ranges that repeat on every printed page (e.g. "$1:$3" or "$A:$B"). Written as <definedName name="_xlnm.Print_Titles">
SetAutoFilter / AutoFilterRangeSets the filter range (e.g "A1:C100"); SaveAs writes <autoFilter ref="..."/>
AutoFilterColumns / AddAutoFilterColumn / ClearAutoFilterColumnsKryteria filtrów per kolumna przypięte do zakresu autofiltra. AddAutoFilterColumn(ColId, Op, Criteria) dodaje filtr z jednym kryterium; przeciążenie z dwoma kryteriami dodaje parę AND/OR AutoFilterColumns.FindByColId(ColId) zwraca istniejący obiekt kryteriów, a AutoFilterColumns.DeleteByColId(ColId) usuwa go bez ręcznego skanowania Items, natomiast AutoFilterColumns.ClearCriteria czyści wszystkie kryteria kolumn, zachowując zakres filtra ColId to przesunięcie liczone od 0 wewnątrz zakresu autofiltra (nie kolumna arkusza). SaveAs zapisuje <filterColumn> wewnątrz <autoFilter>
AutoFilterRowVisible / PreviewAutoFilterRows / ApplyAutoFilterAutoFilterRowVisible(Row) ewaluuje zapisane kryteria AutoFilter XLSX dla jednego wiersza danych. PreviewAutoFilterRows przechodzi po wierszach danych w AutoFilterRange, przekazuje przez callback stan widoczności każdego wiersza, zwraca liczbę odwiedzonych widocznych wierszy i nie zmienia flag ukrycia wierszy. ApplyAutoFilter stosuje kryteria autofiltra, ukrywa wiersze niespełniające kryteriów i zwraca, czy operacja się powiodła
Protect / UnProtect / IsProtectedPrzełącznik ochrony na poziomie arkusza z opcjonalnym 16-bitowym hashem hasła w starszym formacie. Odwzorowywany jako <sheetProtection>
AllowOption / SheetProtectionOptions15 szczegółowych opcji uprawnień ochrony (m.in. formatowanie komórek, wstawianie wierszy/kolumn, sortowanie, autofiltr, zaznaczanie komórek zablokowanych/odblokowanych itd.), odpowiadających liście uprawnień z "Chroń arkusz" w Excelu
PageSetupTouched / SheetProtectHashPageSetupTouched pozwala sprawdzić, czy wartości ustawień strony były jawnie zmieniane, a SheetProtectHash służy do odczytu/zapisu 16-bitowego tekstu hashu ochrony arkusza używanego przez starsze formaty plików XLS
AddPivotTable / AddPivotTableCopy / PivotSetDataFieldFormatMetody tworzenia, kopiowania i formatowania tabel przestawnych. AddPivotTable buduje tabelę przestawną z zakresu źródłowego w notacji A1, np. 'Data!A1:C9', i zakotwicza ją w komórce DestRow, DestCol liczonej od 1; dla źle sformułowanego źródła albo kotwicy poza arkuszem zwraca nil. AddPivotTableCopy robi głęboką kopię istniejącej tabeli przestawnej — z tego albo innego skoroszytu — pod nową kotwicą (liczoną od 1) na tym arkuszu (puste NewName daje '<source> (2)'). PivotSetDataFieldFormat rejestruje format liczbowy pola danych i zwraca jego indeks formatu liczbowego
PivotTablesKolekcja tabel przestawnych zdefiniowanych na tym arkuszu
MarginLeftCM / MarginRightCM / MarginTopCM / MarginBottomCM / MarginHeaderCM / MarginFooterCMMarginesy ustawień strony wyrażone w centymetrach
TabColor / TabColorIsAutoKolor ARGB karty arkusza w Excelu; przypisanie TabColor ustawia TabColorIsAuto na False, a TabColorIsAuto = True (wartość domyślna) powoduje pominięcie elementu <tabColor> wewnątrz <sheetPr>
IsChartSheetWhen True, SaveAs writes the sheet to xl/chartsheets/sheetN.xml instead of xl/worksheets/sheetN.xml and hosts Charts[0] full-page. Use the Workbook.AddChartSheet(...) helper for the typical setup
ViewWorksheet view mode. Values are xlsxNormalView, xlsxPageBreakPreview, and xlsxPageLayoutView. SaveAs writes the corresponding view attribute on <sheetView>; Open reads it back
ZoomSheet view zoom percentage (10–400; default 100, clamped on assignment). Emits zoomScale="N" inside <sheetView>; default is suppressed so untouched sheets stay clean
DisplayGridLinesWhen False, hides the cell grid lines in the sheet view. Default True. Emits showGridLines="0" when False
DisplayZerosWhen False, cells with a zero value render as blank instead of "0". Default True. Emits showZeros="0" when False
DisplayRightToLeftWhen True, arkusz jest wyświetlany w układzie od prawej do lewej (kolumna A po prawej), odpowiednim dla tekstu arabskiego lub hebrajskiego. Emituje rightToLeft="1"
StandardWidthDomyślna szerokość kolumny w jednostkach znakowych Excela (np. 8.43 = wbudowana wartość domyślna). Ustawienie wartości > 0 emituje <sheetFormatPr defaultColWidth="..."/>0 oznacza brak ustawienia (element pomijany)
StandardHeightDomyślna wysokość wiersza w punktach (np. 15 = wartość wbudowana). Ustawienie wartości > 0 emituje defaultRowHeight="..." w <sheetFormatPr>0 oznacza brak ustawienia
ClearRangeValues / CopyRange / CopyRangeTo / CopyFrom / MoveRange / SortRange / ClearRangeOperacje na zakresach komórek. CopyRange i CopyRangeTo duplikują wartości, formuły, indeksy stylów i przebiegi rich-text; CopyFrom duplikuje całą zawartość i ustawienia arkusza (w tym scalone komórki, ustawienia strony, stan widoku, autofiltry itd.); te trzy metody kopiują wyłącznie zawartość komórek, więc komentarze zostają w tyle — przeniesie je dopiero CloneRangeTo albo Sheets.AddCopy, razem z przebiegami rich-text; MoveRange omija nakładanie na obszar docelowy; SortRange sortuje całe wiersze w prostokącie według jednej lub więcej bezwzględnych kolumn klucza; ClearRange usuwa komórki; ClearRangeValues czyści wartości i formuły, zachowując indeksy stylów
Range / RCRange / UsedRangeZwraca należące do arkusza TXLSXRange opakowania odwołań A1, współrzędnych liczbowych liczonych od 1 albo domknięcia wypełnionego arkusza. TXLSXRange.SaveAsHTML(FileName) i TXLSXRange.SaveAsHTML(Stream) eksportują tylko zaznaczony zakres jako tabelę HTML w UTF-8. Opakowania zakresów zapewniają też hurtowy zapis wartości i formuł, indeksy stylów, formaty liczbowe, obramowania, flagi ochrony, auto-dopasowanie, scalanie, przesunięcie, zmianę rozmiaru, sortowanie wielokluczowe, wbudowane style komórek, kopiowanie/przenoszenie oraz pomocnicze wstawianie i usuwanie całych wierszy lub całych kolumn
EntireRow / EntireColumnZwraca zakresy całych wierszy lub całych kolumn dla podanego indeksu, nadające się do operacji strukturalnych lub propagacji stylów
MergeCells(R1, C1, R2, C2)Dodaje scalony prostokąt i zwraca indeks nowego wpisu. Współrzędne są liczone od 1, oba końce włącznie. Odpowiednik MergedCells.Add(R1, C1, R2, C2). W kodzie w stylu Range Range['A1:C3'].Merge(True) zapisuje jeden scalony zakres na wiersz, jak polecenie scalania w poprzek z Excela
FillMergedCellValuesKopiuje wartość kotwicy każdego zakresu scalonego do wszystkich objętych komórek, dzięki czemu arkusze w stylu raportów czytają się potem jak jedna płaska siatka. Puste lub nullowe kotwice są pomijane, więc wcześniej wypełnione scalenia zachowują własną zawartość, a funkcja zwraca liczbę wypełnionych komórek
FormControlsKolekcja formantów formularza arkusza (przyciski, pola wyboru, przyciski opcji, pola kombi, listy) tworzona przez rodzinę pomocników AddFormButton / AddFormCheckBox / AddFormRadioButton / AddFormComboBox / AddFormListBox . Każdy wpis udostępnia prostokąt kotwicy, powiązaną komórkę i typ kontrolki
AddHyperlink overloadsAdds an external URL hyperlink to a single cell Display and Tooltip are optional. Equivalent to Hyperlinks.Add(...)
AddComment overloadsAdds a comment to a single cell. Author is optional. Equivalent to Comments.Add(...)
ColWidth[Col]Szerokość kolumny w jednostkach Excela (ta sama skala, której używa okno dialogowe szerokości kolumny). Odczyt nieustawionej kolumny zwraca 0; przypisanie wartości ustawia szerokość tej kolumny liczonej od 1. SaveAs emituje jeden wpis <col> na każdą dostosowaną kolumnę; Open odtwarza blok <cols> z powrotem do tej mapy
RowHeight[Row]Wysokość wiersza w punktach (ta sama skala, której używa okno dialogowe wysokości wiersza Excela). Odczyt nieustawionego wiersza zwraca 0; przypisanie wartości ustawia wysokość tego wiersza liczonego od 1. SaveAs zapisuje atrybuty ht i customHeight="1" na każdym <row> o niestandardowej wysokości, także na wierszach, które niosą samą wysokość bez danych komórek
SetColWidth / SetRowHeightBezpośrednie setery używane przez powyższe właściwości indeksowane. Dostępne jako nazwane metody — dla wywołujących, którzy wolą nie używać składni właściwości
HasColWidth / HasRowHeightZwraca True, gdy arkusz ma niestandardową szerokość lub wysokość dla podanego indeksu. Użyj tego, aby odróżnić "nieustawione" od świadomego 0
ClearColWidths / ClearRowHeightsDrops every customized width or height back to the Excel default
ClearRowHidden / ClearColHidden / ClearRowCollapsed / ClearColCollapsedUsuwa wszystkie nadpisania ukrycia/zwinięcia wierszy lub kolumn, przywracając domyślny stan widoczny i rozwinięty
ImagesImage collection. Use AddImage / AddImageFromFile as the convenience entry points. See TXLSXImage / TXLSXImages
HeaderFooterImagesTypowane sloty obrazów nagłówka i stopki dla strony nieparzystej, parzystej i pierwszej, z niezależnymi właściwościami pozycji, rozmiaru, marginesu, formatu, danych i tytułu. Zobacz TXLSXHeaderFooterImage / TXLSXHeaderFooterImages
ConditionalFormatsConditional formatting rules for this worksheet Use AddConditionalFormat as the convenience entry See TXLSXConditionalFormat / TXLSXConditionalFormats
DataValidationsData-validation rules for this worksheet. Use AddDataValidation / AddListValidation as the convenience entries. See TXLSXDataValidation / TXLSXDataValidations
IgnoredErrorsTypowane metadane tłumienia błędów arkusza Każdy TXLSXIgnoredError łączy wieloobszarowy SqRef (obszary rozdzielone białymi znakami) ze standardowymi flagami ewaluacji, daty, liczby zapisanej jako tekst, formuły, odblokowanej formuły, pustego odwołania, walidacji danych i kolumny obliczanej. Wpisy przeżywają kopiowanie arkusza oraz cykle open/save, a ich zakresy podążają za wstawianiem i usuwaniem wierszy i kolumn
AddImage / AddImageFromFileDodaje obraz zakotwiczony w komórce. AddImage przyjmuje surowe bajty plus TXLSXImageFormat; AddImageFromFile czyta plik i rozpoznaje format po rozszerzeniu. Odpowiednik Images.Add na tej kolekcji
AddConditionalFormat overloadsDodaje regułę formatowania warunkowego typu cellIs Odpowiednik ConditionalFormats.Add(...)
AddCondFormatExpression / text / rank / average / duplicate / blank / error helpersDodaje wyspecjalizowane reguły formatowania warunkowego dla formuł, dopasowania tekstu, rankingów góra/dół, wartości powyżej/poniżej średniej, wartości duplikujących się lub unikatowych, pustych, niepustych, błędów i niebłędów. Zwrócony indeks można potem użyć z ConditionalFormats[Index].Style, aby podpiąć formatowanie
AddWholeNumberValidation / AddWholeNumberValidation overloads / Whole whole-number validationsAdds entire wholesale whole number validations with range or criteria support
ProtectedRangesCollection of protected cell ranges requiring password authentication in the sheet.
RawWorksheetExtsExposes raw worksheet extension list data for direct XML injection.
SparklineGroups / AddSparklineGroupManage inline mini sparkline charts within cells. AddSparklineGroup creates a group referencing a data range.
ThreadedComments / AddThreadedComment / AddThreadedReplySupport modern threaded comment conversations (replies). AddThreadedComment creates a top-level threaded comment conversation, and AddThreadedReply appends a reply.
AddAreaChart / AddBarChart / AddChartFromRange / AddColumnChart / AddLineChart / AddPieChartExcel charting shortcuts. AddChartFromRange creates an anchored chart directly from cell data.
GetSheetProtectOption / SetSheetProtectOptionGet or set specific sheet protection permission flags programmatically.
PasteFromClipboardWkleja zawartość ze schowka bezpośrednio, zaczynając od podanych współrzędnych
AlignWithMarginsOkreśla whether page margins align with worksheet contents
CodeNameOkreśla the VBA sheet code name
ConsolidateXmlExposes raw consolidated XML data
DifferentFirstEnables separate first-page header/footer
DifferentOddEvenEnables separate odd/even page headers/footers
EvenFooterText / EvenHeaderTextText strings for even-page headers and footers
FirstFooterText / FirstHeaderTextText strings for first-page headers and footers
FirstPageNumberFirst page print number
GridColorSheet gridline color
HorizontalDpi / VerticalDpiPrint DPI resolutions for horizontal and vertical axes
OutlineLevelCol / OutlineLevelRowDefault outline level for columns and rows
PaneStatePane frozen scroll state
PhoneticAlignment / PhoneticFontId / PhoneticTypeCJK phonetic ruby text alignment, font index, and phonetic type
PrintErrorsCell error printing behavior
ScaleWithDocScales headers/footers with document scale
ScenariosTypowana kolekcja menedżera scenariuszy What-If Każdy scenariusz posiada od jednej do 32 komórek wejściowych i obsługuje swoją nazwę, stany zablokowania i ukrycia, metadane użytkownika i komentarza, zapisane wartości, formaty liczb oraz flagi usunięcia i cofnięcia CurrentIndex, ShownIndexi SqRef udostępniają stan menedżera scenariuszy na poziomie arkusza
ScenariosXmlLegacy raw inner-XML fallback used only when the typed Scenarios collection is empty
SheetProtectAlgorithmName / SheetProtectHashValue / SheetProtectSaltValue / SheetProtectSpinCountCryptographic properties for modern sheet-protection password hashes
ShowFormulasShows formulas instead of values
ShowOutlineSymbolsShows outline group symbols
SortState / SortStateXmlTyped sorting criteria and verbatim sort XML contents
SummaryBelow / SummaryRightOutlines summary row and column position
UseFirstPageNumberUses explicit page numbering start
UsePrinterDefaultsUses printer-default DEVMODE settings
ZeroHeightHides newly inserted rows by default
ZoomNormal / ZoomPageLayout / ZoomSheetLayoutZoom level values for normal, page layout, and page break views
AddWordArtAdds a WordArt text shape control to the worksheet
BuildRowMajorCellOrderOptimizes cell storage sequentially for row-major iteration
ClearRawDrawingAnchorsClears all raw unmapped drawing shape XML anchors
CreateConditionalFormatEvaluatorInstantiates a conditional formatting evaluation utility engine
RawDrawingAnchor / RawDrawingAnchorCount / AddRawDrawingAnchorZarządza surowymi, niemapowanymi kotwicami XML kształtów rysunku AddRawDrawingAnchor dopisuje kompletny blok <xdr:...Anchor> zachowany verbatim dla round-tripu i zwraca nowy TXLSXDrawingObject
BringToFront / SendToBack / BringForward / SendBackwardZmienia kolejność obiektu rysunku w z-order arkusza: BringToFront przenosi go nad wszystkie pozostałe rysunki, SendToBack pod wszystkie, a warianty Forward / Backward przesuwają go o jedną pozycję
SaveAsPDFExports the worksheet to a PDF file or stream
TryGetOutlineNode / SetOutlineNodeCollapsed / SetOutlineDisplayLevelOdpytuje lub idempotentnie zmienia kierunkowe węzły podsumowań wierszy i kolumn przez współdzielony rzadki model konspektu; zobacz Sparse outline geometry
ToggleColGrouped / ToggleRowGroupedToggles column or row grouping collapsed state

Edycje reguł całych osi i kopie zakresów

Od wersji 2.384.77 obszary docelowe formatowania warunkowego i walidacji danych przyjmują całe wiersze i kolumny podczas edycji strukturalnych oraz klonowania zależności; edycje normalizują poprawne obszary, zachowują kompletne rozpiętości siatki i porzucają cele, których wiersze albo kolumny usunięto
Kopie komórek całego wiersza, całej kolumny i całego arkusza odwiedzają zapisane komórki, zachowują rzadkie czyszczenie celu i przechwytują zawartość źródła przed wyczyszczeniem nakładającego się celu; kopiowanie pustego zakresu całej osi nie materializuje jego pustych współrzędnych
Kopie między skoroszytami nadal przemapowują formatowanie i rich text przez wartość, a kompletne kontra częściowe kopie tablic CSE zachowują swoje dotychczasowe kontrakty formuł
Od wersji 2.384.78 kopie zakresów komórek przechwytują także przecinające się wirtualne nakładki stylów przed mutacją, przycinają jawne nakładki celu do kopiowanego prostokąta i przemapowują każdą skopiowaną część formatowania między skoroszytami, łącznie z jawnymi zerowaniami do indeksu zero
Domyślne cele całych osi pozostają zwarte i są maskowane wewnątrz kopiowanego prostokąta, zanim zostaną nałożone warstwy źródła; skopiowanie pustego źródła czyści wcześniejsze jawne formatowanie nakładkowe wewnątrz tego prostokąta, zachowuje formatowanie poza nim i nie tworzy komórki dla każdej pokrytej współrzędnej
Sklonowane reguły warunkowe i walidacji wymagają, aby wszystkie obszary docelowe mieściły się w prostokącie źródła; reguły, które go tylko przecinają, są pomijane, a cel wykraczający poza siatkę arkusza jest odrzucany przed kopiowaniem
Skończone powtórzone puste style zaimportowane z ODS wnoszą oba końce do używanego zakresu; domyślne nakładki stylów całego wiersza, całej kolumny i całego arkusza nie rozszerzają go tylko dlatego, że pokrywają puste współrzędne

Przykład

var
  ws: TXLSXWorksheet;
  scenario: TXLSXScenario;
begin
  ws := Workbook.Sheets.Add('Demo');

  ws.Cells.Item[1, 1].Value := 'Title';
  ws.MergeCells(1, 1, 1, 3);

  ws.ColWidth[1] := 24;          // widen column A
  ws.RowHeight[1] := 28;         // taller title row

  ws.Cells.Item[3, 1].Value := 'Visit losLab';
  ws.AddHyperlink(3, 1, 'https://www.loslab.com', 'losLab');

  ws.AddComment(3, 1, 'Vendor home page', 'Kevin');
  ws.AddTextBox('Standalone note', 2, 5, 5, 9);
  if ws.FindTextBoxAt(3, 6) <> nil then
    ws.DeleteTextBoxesInRange(2, 5, 5, 9);

  scenario := ws.Scenarios.Add('Baseline');
  scenario.User := 'Analyst';
  scenario.Comment := 'Approved assumptions';
  scenario.InputCells.Add('B2', '1250').NumberFormatId := 4;
  scenario.InputCells.Add('B3', '0.18');
  ws.Scenarios.SqRef := 'B2:B3';
end;
    

Zobacz również