HotXLS ドキュメント

TXLSXWorksheet クラス

Single worksheet inside a TXLSXWorkbook 内の単一のワークシートです。セルのコレクションに加えて、結合セル、ハイパーリンク、およびコメントのコレクションを所有します。 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 / WorkbookSets and exposes the workbook back-reference used by cell and workbook-shared helpers such as shared number formats, fills, borders, and shared-string lookups (English)
CellsCell collection. Use Cells.Item[Row, Col].Value See TXLSXCells / TXLSXCell
Calculateこのワークシートのコンテキストで Excel 数式文字列をコンパイルして評価します 先頭の = is accepted, and worksheet-local references, referenced formula cells, cross-sheet references, defined-name ranges, and supported text, date, workday, engineering/base-conversion, bitwise, statistical, aggregate, and math functions are resolved by the workbook shared formula evaluator (English)
GetCellVisibleFormat / Subtotal / SubtotalDefaultEnglishString / CheckDataValidationGetCellVisibleFormat は、空セルを作成せずに、指定座標の実効スタイルを解決します。 Subtotal は、ソート済みの矩形範囲を、絶対ワークシート列の変化を基準にグループ化し、Excel の SUBTOTAL 関数番号 (1〜11 または 101〜111) を受け付け、数式行とアウトライン行を挿入し、挿入した行数を返します。 SubtotalDefaultEnglishString maps a SUBTOTAL 関数番号を英語名へマッピングします (たとえば 1 to Average and 9 to Total). CheckDataValidation returns -1 妥当な候補に対する結果か、失敗した最初の規則の 1 始まりインデックスを返します。コミットが行われるのは SetIfValid is true and all applicable rules pass
ForEachCell / ForEachFormattedCell / ForEachRow / FindText / ReplaceText / WriteCells / WriteRows読み込み済みセル/行の走査、テキスト検索、テキスト置換、範囲への一括入力のためのヘルパー群です。 ForEachCell は、既存のセルを行順に、値と数式テキストとともに走査します。 ForEachFormattedCell は、表示形式を適用した各セルの表示テキストを渡しながら行/列順に値の入ったセルを走査し、コールバックによるキャンセルを尊重しつつ、訪問したセル数を返します。 ForEachRow 読み込み済みセルと行の走査、テキスト検索、テキスト置換、範囲への一括入力を行うヘルパー。 FindText は、既存のセルを行順に、値と数式テキストとともに走査します。 ReplaceText は既存の行を順に走査し、各行の最初と最後の読み込み済み列を報告します。 FindTextIn と ReplaceTextIn は、読み込み済みのテキストセルを行順に走査し、数式とテキスト以外の値をスキップします。大文字小文字を区別する一致も可能です WriteCells は、数値または A1 形式で指定された範囲の値を要求し、セルごとのスキップとキャンセルをサポートします。 WriteRows は、行ごとに Variant 配列を要求し、行単位のスキップとキャンセルをサポートします
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 / AddChartAnchored chart collection. See TXLSXChart / TXLSXCharts チャートの種類の列挙型は、縦棒、横棒、折れ線、円、面、ドーナツ、 散布図、バブル、レーダーの各チャートをサポートします ページ全体のチャートには Workbook.AddChartSheet(...)
AddTextBox / TextBoxCount / TextBox / FindTextBoxAtセルの矩形にアンカーされた独立した描画テキスト ボックスの 作成、列挙、検索、削除、クリアを行います IndexOfTextBoxAt and FindTextBoxAt locate the first text box containing a cell, while DeleteTextBoxAt, DeleteTextBoxesInRange, DeleteTextBox, and ClearTextBoxes remove individual or grouped text boxes without touching cell comments (English)
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 (English)
RowHidden / ColHiddenBoolean — drops the row or column from view (hidden="1")
RowCollapsed / ColCollapsedBoolean — marks a row / column whose grouping parent is collapsed (collapsed="1") (English)
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 (English)
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 (English)
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 (English)
SetIsSelected / IsSelectedWhen Trueを設定すると、シート タブが 選択状態 (強調表示) になります。複数のシートを 同時に選択できます。SaveAs の出力対象: tabSelected="1" on the matching <sheetView>
AutoFitColumn / AutoFitColumnsAutoFitColumn(Col, MinWidth, MaxWidth) measures every cell in the column and sets ColWidth[Col] を 最も幅の広い内容に合わせます (ASCII = 1 文字、CJK = 2 文字、Calibri 11pt 基準)。その後、省略可能な最小幅と最大幅の制限を適用します AutoFitColumns(Min, Max, MinWidth, MaxWidth) iterates the column range, clamped to the last cell-bearing column (English)
AutoFitRow / AutoFitRowsAutoFitRow(Row, MinHeight, MaxHeight) sets RowHeight[Row] を、その行で最も高いセル内容に (ポイント単位で) 合わせた後、省略可能な最小/最大の高さ制限を適用します AutoFitRows(Min, Max, MinHeight, MaxHeight) iterates the row range, clamped to the last cell-bearing row (English)
InsertRows / DeleteRowsInsertRows(BeforeRow, Count) shifts every row at BeforeRow or below down by Count. DeleteRows(StartRow, Count) removes rows [StartRow, StartRow+Count-1] and pulls the remainder up. Both cascade through cells, merged ranges, row heights, outline levels, hidden flags, hyperlinks, comments, freeze pane, and auto-filter / conditional-format / data-validation references, tables, cell formulas, conditional-format / data-validation formulas, internal hyperlink targets, print setup references, manual page breaks, auto-filter column criteria, chart series ranges, and defined names that point at the edited worksheet, image anchors, and chart anchors (English)
InsertCols / DeleteColsSame as InsertRows / DeleteRows but operating on columns. Column widths, outline levels, and hidden flags are also updated (English)
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 (English)
HasRowBreak / HasColBreak / IndexOfRowBreak / IndexOfColBreakQuery or locate a single manual break by its "before" index
RemoveRowBreak / RemoveColBreak / RemoveRowBreaksInRange / RemoveColBreaksInRangeRemove one manual break or all breaks in an inclusive row / column interval; range helpers accept reversed coordinates and return the number of removed breaks (English)
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 / KeepColLinkLevelWhen 0 , SaveAs emits
PrintGridlines / PrintHeadingsWhen True, SaveAs emits printGridLines="1" / printRowColHeadings="1" inside <printOptions> so row/column grid lines or headings appear on the printed page (English)
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 (English)
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 (English)
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 / ClearAutoFilterColumnsPer-column filter criteria attached to the auto-filter range. AddAutoFilterColumn(ColId, Op, Criteria) adds a single-criterion filter; the two-criteria overload adds an AND/OR pair AutoFilterColumns.FindByColId(ColId) returns an existing criteria object, and AutoFilterColumns.DeleteByColId(ColId) removes one without scanning Items manually, and AutoFilterColumns.ClearCriteria clears all column criteria while preserving the filter range ColId は、オートフィルター範囲内の 0 始まりのオフセットです (シートの列ではありません)。SaveAs の書き込み対象: <filterColumn> children inside <autoFilter>
AutoFilterRowVisible / PreviewAutoFilterRows / ApplyAutoFilterAutoFilterRowVisible(Row) evaluates the stored XLSX AutoFilter criteria for one data row. PreviewAutoFilterRows walks the data rows in AutoFilterRange、各行の表示状態をコールバックで報告し、通過した表示行数を返します。行の非表示フラグは変更しません。 ApplyAutoFilter applies the autofilter criteria, hides rows that do not match, and returns whether it succeeded (English)
Protect / UnProtect / IsProtectedオプションの 16 ビット旧形式パスワード ハッシュを伴うシート レベルの保護トグル。反映先: <sheetProtection>
AllowOption / SheetProtectionOptions15 fine-grained protection permission options (such as formatting cells, inserting rows/columns, sorting, auto-filtering, selecting locked/unlocked cells, etc.), corresponding to Excel's "Protect Sheet" permissions list (English)
PageSetupTouched / SheetProtectHashUse PageSetupTouched to inspect whether page setup values were explicitly modified, and SheetProtectHash to read/write the legacy 16-bit sheet protection hash text used by legacy XLS file formats (English)
AddPivotTable / AddPivotTableCopy / PivotSetDataFieldFormatピボットテーブルを作成、コピー、書式設定するメソッドです。AddPivotTable は 'Data!A1:C9' のような A1 形式のソース範囲からピボットテーブルを組み立て、1 ベースのセル DestRow, DestCol にアンカーします。ソースの形式が不正だったりアンカーがシート外だったりすると nil を返します。AddPivotTableCopy は、このワークブックまたは別のワークブックにある既存のピボットテーブルをディープ コピーして、このワークシート上の新しい 1 ベースのアンカーへ配置します(NewName を空にすると '<source> (2)' になります)。PivotSetDataFieldFormat はデータ フィールドに数値書式を登録し、その数値書式インデックスを返します
PivotTablesこのワークシートに定義されているピボットテーブルのコレクション
MarginLeftCM / MarginRightCM / MarginTopCM / MarginBottomCM / MarginHeaderCM / MarginFooterCMセンチメートル単位で表したページ設定の余白
TabColor / TabColorIsAutoExcel のワークシート タブの ARGB カラーです TabColor を代入すると TabColorIsAuto が False になり、 TabColorIsAuto = True (既定) では <sheetPr> の <tabColor> 子要素が出力されなくなります
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 (English)
ViewWorksheet view mode. Values are xlsxNormalView, xlsxPageBreakPreview, and xlsxPageLayoutView. SaveAs writes the corresponding view attribute on <sheetView>; Open reads it back (English)
ZoomSheet view zoom percentage (10–400; default 100, clamped on assignment). Emits zoomScale="N" inside <sheetView>; default is suppressed so untouched sheets stay clean (English)
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を指定すると、シートが 右から左のレイアウト (列 A が右側) で表示され、アラビア語や ヘブライ語のテキストに適した表示になります。出力対象: rightToLeft="1"
StandardWidthExcel の文字数単位による既定の列幅 (例: 8.43 = 組み込みの既定値)。> 0 の値を設定すると <sheetFormatPr defaultColWidth="..."/>0 = unset (element suppressed) (English)
StandardHeightポイント単位の既定の行の高さ (例: 15 = 組み込みの 既定値)。> 0 の値を設定すると defaultRowHeight="..." on <sheetFormatPr>0 = unset (English)
ClearRangeValues / CopyRange / CopyRangeTo / CopyFrom / MoveRange / SortRange / ClearRangeセル範囲操作です。CopyRange と CopyRangeTo は値、数式、スタイル インデックス、リッチテキスト payload を複製します。CopyFrom は、ワークシート全体の内容と設定 (結合セル、ページ設定、表示状態、オートフィルターなどを含む) を複製します。この 3 つはセルの内容だけをコピーするため、コメントは取り残されます。CloneRangeTo や Sheets.AddCopy はコメントをリッチテキスト run ごと運びます。MoveRange は移動先との重なりをスキップし、SortRange は矩形内の行全体を 1 つ以上の絶対キー列でソートします。ClearRange はセルを削除し、ClearRangeValues はスタイル インデックスを保ったまま値と数式をクリアします
Range / RCRange / UsedRangeReturn sheet-owned TXLSXRange A1 参照、1 始まりの数値座標、または値の入力済みワークシート範囲への ラッパー。 TXLSXRange.SaveAsHTML(FileName) and TXLSXRange.SaveAsHTML(Stream) export only the selected range as a UTF-8 HTML table. Range wrappers also provide batch values, formulas, style indexes, number formats, borders, protection flags, auto-fit, merge, offset, resize, multi-key sorting, built-in cell styles, copy/move, and whole-row or whole-column insert/delete helpers (English)
EntireRow / EntireColumnReturn full-row or full-column ranges for the specified index suitable for structural operations or style propagation (English)
MergeCells(R1, C1, R2, C2)結合された矩形を追加し、新しいエントリの インデックスを返します。座標は 1 始まりで、両端を含みます。対応する呼び出し: MergedCells.Add(R1, C1, R2, C2). For range-style code, Range['A1:C3'].Merge(True) writes one merged range per row, matching Excel's merge-across command (English)
FillMergedCellValuesAdds an external URL hyperlink to a single cell
FormControlsワークシートのフォーム コントロール (ボタン、チェック ボックス、オプション ボタン、コンボ ボックス、リスト ボックス) のコレクションです。これらは AddFormButton / AddFormCheckBox / AddFormRadioButton and AddFormComboBox are optional. Equivalent to AddFormListBox (English)
AddHyperlink overloadsAdds a comment to a single cell. Display is optional. Equivalent to Tooltip (English) Hyperlinks.Add(...)
AddComment overloadsAdds a comment to a single cell. Author is optional. Equivalent to Comments.Add(...)
ColWidth[Col]Excel 単位の列幅 (Excel の 列幅ダイアログと同じスケール)。未設定の列を読み取ると 0; assigning a value sets the width for that 1-based column. SaveAs emits one <col> entry per customized column; Open replays the <cols> block back into the map (English)
RowHeight[Row]ポイント単位の行の高さ (Excel の 行の高さダイアログと同じスケール)。未設定の行を読み取ると 0; assigning a value sets the height for that 1-based row. SaveAs writes the ht and customHeight="1" attributes on each <row> with a custom height, even rows that carry only a height with no cell data (English)
SetColWidth / SetRowHeightDirect setters used by the indexed properties above Provided as named methods for callers that prefer not to use the property syntax (English)
HasColWidth / HasRowHeight返します True を返します。ワークシートに 指定インデックスのカスタム幅または高さが設定されている場合です。この値で 「未設定」と意図的な 0 value (English)
ClearColWidths / ClearRowHeightsDrops every customized width or height back to the Excel default
ClearRowHidden / ClearColHidden / ClearRowCollapsed / ClearColCollapsedDrops every row or column hidden/collapsed override back to the default visible and expanded state (English)
ImagesImage collection. Use AddImage / AddImageFromFile as the convenience entry points. See TXLSXImage / TXLSXImages
HeaderFooterImages奇数ページ、偶数ページ、先頭ページのヘッダー/フッター画像スロットを型付きで提供します。位置、サイズ、余白、形式、データ、タイトルの各プロパティは独立しています。詳細は 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
IgnoredErrorsワークシートのエラー抑制メタデータ (型付き) 各 TXLSXIgnoredError は、空白区切りの マルチエリア SqRef (English)
AddImage / AddImageFromFileAdds an image anchored to a cell. AddImage takes the raw bytes plus a TXLSXImageFormat; AddImageFromFile はファイルを読み込み、拡張子から形式を推測します。対応する呼び出し: Images.Add on the collection (English)
AddConditionalFormat overloadsAdds a cellIs conditional-formatting rule Equivalent to ConditionalFormats.Add(...)
AddCondFormatExpression / text / rank / average / duplicate / blank / error helpers数式、テキストの一致、上位/下位ランク、平均以上/平均以下の値、重複または一意の値、空白、空白以外、エラー、エラー以外を対象とする特殊な条件付き書式ルールを追加します。戻り値のインデックスは ConditionalFormats[Index].Style to attach formatting (English)
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. (English)
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. (English)
ThreadedComments / AddThreadedComment / AddThreadedReplySupport modern threaded comment conversations (replies). AddThreadedComment creates a top-level threaded comment conversation, and AddThreadedReply appends a reply. (English)
AddAreaChart / AddBarChart / AddChartFromRange / AddColumnChart / AddLineChart / AddPieChartExcel charting shortcuts. AddChartFromRange creates an anchored chart directly from cell data. (English)
GetSheetProtectOption / SetSheetProtectOptionGet or set specific sheet protection permission flags programmatically.
PasteFromClipboardPastes contents from the clipboard directly starting at the specified coordinates (English)
AlignWithMargins指定します whether page margins align with worksheet contents
CodeName指定します 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
ScenariosWhat-If scenario XML contents CurrentIndex, ShownIndex, and SqRef は、ワークシート レベルのシナリオ マネージャーの状態を公開します
ScenariosXmlレガシーな生の inner-XML フォールバックです。使用されるのは、型付きの Scenarios Cryptographic properties for modern sheet-protection password hashes
SheetProtectAlgorithmName / SheetProtectHashValue / SheetProtectSaltValue / SheetProtectSpinCountShows formulas instead of values
ShowFormulasShows outline group symbols
ShowOutlineSymbolsTyped sorting criteria and verbatim sort XML contents
SortState / SortStateXmlOutlines summary row and column position
SummaryBelow / SummaryRightUses explicit page numbering start
UseFirstPageNumberUses printer-default DEVMODE settings
UsePrinterDefaultsHides newly inserted rows by default
ZeroHeightZoom level values for normal, page layout, and page break views
ZoomNormal / ZoomPageLayout / ZoomSheetLayoutAdds a WordArt text shape control to the worksheet
AddWordArtOptimizes cell storage sequentially for row-major iteration
BuildRowMajorCellOrderClears all raw unmapped drawing shape XML anchors
ClearRawDrawingAnchorsInstantiates a conditional formatting evaluation utility engine
CreateConditionalFormatEvaluatorManages raw unmapped drawing shape XML anchors
RawDrawingAnchor / RawDrawingAnchorCount / AddRawDrawingAnchorワークシートを PDF ファイルまたはストリームへエクスポートします AddRawDrawingAnchor appends a complete <xdr:...Anchor> ブロックをラウンドトリップ用にそのまま保持し、戻り値は新しい TXLSXDrawingObject
BringToFront / SendToBack / BringForward / SendBackwardシートの z-order 内で描画オブジェクトの順序を変更します BringToFront moves it above all other drawings, SendToBack below all others, and the Forward / Backward variants step it one position
SaveAsPDFワークシートを PDF ファイルまたはストリームへエクスポートします
TryGetOutlineNode / SetOutlineNodeCollapsed / SetOutlineDisplayLevel共有のスパース アウトライン モデルを通じて、方向を考慮した行/列の小計ノードを照会または冪等に変更します。詳細は Sparse outline geometry
ToggleColGrouped / ToggleRowGroupedToggles column or row grouping collapsed state

全軸ルール編集と範囲コピー

2.384.77 から、条件付き書式とデータ検証のターゲット領域は、構造編集と依存クローンの際に行全体と列全体を受け付けます。編集は有効な領域を正規化し、グリッド全体の範囲を保ち、行や列が削除されたターゲットは取り除きます
行全体・列全体・シート全体のセル コピーは保存されたセルだけを訪問し、スパースな宛先クリアを保ち、重なる宛先をクリアする前にコピー元の内容を取り込みます。空白の全軸範囲をコピーしても、空の座標は実体化しません
ワークブック間コピーは引き続き書式とリッチテキストを値で再マップし、完全と部分の CSE 配列コピーは既存の数式契約を保ちます
2.384.78 から、セル範囲コピーは変更前に交差する仮想スタイル オーバーレイも取り込み、明示的な宛先オーバーレイをコピーした矩形へクリップし、コピーした各書式パーツをインデックス 0 への明示的リセットも含めてワークブック間で再マップします
全軸の宛先既定値はコンパクトなまま保たれ、ソースのレイヤーを適用する前に、コピーした矩形の内側でマスクされます。空白のソースをコピーすると、その矩形の内側にある以前の明示的オーバーレイ書式はクリアされ、外側の書式は保持され、カバーされる座標ごとにセルは作られません
クローンされた条件付き書式と検証ルールは、すべてのターゲット領域がコピー元の矩形に含まれていることを要求します。交差だけのルールはスキップされ、ワークシート グリッドを超える宛先はコピーの前に拒否されます
ODS から取り込んだ有限の繰り返し空白スタイルは、使用範囲に両端を寄与します。行全体・列全体・シート全体の既定スタイル オーバーレイは、空の座標をカバーしているというだけで使用範囲を広げません

例

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;
    

関連項目