TExportRow

Properties

NameTypeDescription
CellsTExportCellsCell list in the row.
HeightIntegerRow height. Use -1 for default height (see CalculateRowHeight below). Use 0 to hide the row.
CalculateRowHeightTExportCalculateRowHeight Settings for row height calculation:
  • erhSingleLine - old behaviour (only single line will be calculated; pretty accurate)
  • erhMultiLine - height of cells with word wrap and multiple lines will be calculated (VCL on Windows pretty accurate, otherwise only approximate). Works on cells with ColSpan.
  • erhForceAuto - don't calculate anything, let Excel / Calc handle the row height automatically. Works both with multi and single lines. Please note that charts and images may be placed inaccurately when using erhForceAuto.
CalculateRowHeight is relevant only if Height is set to -1. Furthermore row height can be calculated only for cells with RowSpan of 1.
Important: Column width and row height calculation works also for single-line cells with rich formatting. Multi-line cells with rich formatting are calculated like they were without formatting.
See code snippet: Row Height Calculation.
PageBreakBeforeBooleanIf true, a manual page break will be placed before this row.
HiddenBooleanIf true, this row is hidden.
GroupLevelTExportGroupLevelThe group level of this row.
It's better practice not to use this property directly, bug group/ungroup rows with the {GetAnschor:13|TExportRows.GroupRows, TExportRows.UnGroupRows} procedures.
StyleTExportCellStyleFormatting style of the row.
ExcelNumberFormatOWideStringThe default custom number format of cells.

Functions & procedures

function AddCellString(const aText: OWideString = ''): TExportCellString;
Adds a new string cell in the row.
function AddCellNumber(const aValue: Double = 0; const aFormat: TNumberFormat = 2): TExportCellNumber;
Adds a new number cell in the row. aFormat shows the decimal places in the number.
function AddCellPercent(const aValue: Double = 0; const aFormat: TNumberFormat = 2): TExportCellPercent;
Adds a new percent cell in the row. aFormat has the same meaning as in AddCellNumber.
Please note that the values 2 and 0.05 will be formatted as 200% and 5%, respectively.
function AddCellFormulaNumber(const aFormula: OWideString; const aFormat: TNumberFormat = 2): TExportCellFormulaNumber;
Adds a new formula cell in the row. The result is formatted as a number. aFormat has the same meaning as in AddCellNumber. See more information about formulas in Number cells.
function AddCellFormulaPercent(const aFormula: OWideString; const aFormat: TNumberFormat = 2): TExportCellFormulaPercent;
Adds a new formula cell in the row. The result is formatted as a percent. aFormat has the same meaning as in AddCellNumber. See more information about formulas in Number cells.
function AddCellDate(const aDate: TDateTime): TExportCellDate;
Adds a new date cell in the row. Example date formatting: 01.12.2012 (exact format is system-dependent).
function AddCellDateTime(const aDate: TDateTime): TExportCellDateTime;
Adds a new datetime cell in the row. Example date formatting: 01.12.2012 12:54:13 (exact format is system-dependent).
function AddCellDateTimeWS(const aDate: TDateTime): TExportCellDateTimeWS;
Adds a new datetime cell in the row. The time will be formatted without seconds. Example date formatting: 01.12.2012 12:54 (exact format is system-dependent).
function AddCellTime(const aDate: TDateTime): TExportCellTime;
Adds a new time cell in the row. Example date formatting: 12:54:13 (exact format is system-dependent).
function AddCellTimeWS(const aDate: TDateTime): TExportCellTimeWS;
Adds a new time cell in the row. The time will be formatted without seconds. Example time formatting: 12:54 (exact format is system-dependent).
function AddCellEmpty: TExportCellEmpty;
Adds a new empty cell in the row.
function AddCellCustom(const aCellClass: TExportCellClass): TExportCell;
Adds a new cell of type aCellClass in the row. Normally you shouldn't need to use AddCellCustom - but it can be helpful if you define your own cell types.
function FindCell(const aColIndex: Integer;
out aCell: TExportCell): Boolean;
Tries to get the cell from a column with the index aColIndex. Returns True if cell exists and in this case aCell is set.
function FindCreateCell(const aColIndex: Integer;
const aCellClass: TExportCellClass; const aTransform: Boolean = True): TExportCell;
Returns the cell from the column aColIndex. The cell will be created if it does not exist or transformed to the aCellClass type if the cell is of a different type and aTransform is True.
Categories