TExportWorkSheet

Properties

NameTypeDescription
RowsTExportRowsRow list in the worksheet.
TitleOWideStringWorksheet title. Must be unique in the document.
HeaderTExportHeadersPrint header of the worksheet.
FooterTExportHeadersPrint footer of the worksheet.
PageSettingsTExportPageSettingsPage (printer) settings.
WindowSettingsTExportWindowSettingsWindow settings.
WindowSettingsTExportWindowSettingsWindow settings.
ProtectionTExportWorkSheetProtectionSheet protection information.
NewCell* are default properties for new created cells:
NewCellStringAlignmentTCellHAlignmentHorizontal alignment of new string cells
NewCellDateTimeAlignmentTCellHAlignmentHorizontal alignment of new date/time/datetime cells
NewCellNumberAlignmentTCellHAlignmentHorizontal alignment of new number/percent/formula cells
NewCellVAlignmentTCellVAlignmentVertical alignment of new cells
NewCellFontTExportFontFont of new cells
NewCellBordersTExportCellBordersBorder of new cells
NewCellWrapTextBooleanWord wrap of new cells
NewCellDateFormatOWideStringDefault date format for date/datetime cells.
The default value is your current OExportDateFormat value.
NewCellTimeFormatOWideStringDefault time format for time/datetime cells.
The default value is your current OExportTimeFormat value.
SaveOnTheFlyOnAddRowTExportAddRowEventThis event is called for every row when you use on-the-fly export.
SaveOnTheFlyRowsIntegerA write-only property you have to define when using on-the-fly export.
OnTheFlyParamPointerStore a user-definedobject here (e.g. a database query).

Functions & procedures

function AddRow: TExportRow;
Adds a new row in the worksheet.
function FindCell(const aColIndex, aRowIndex: Integer;
out aCell: TExportCell): Boolean;
Tries to get the cell from a row aRowIndex and column aColIndex. Returns True if cell exists and in this case aCell is set.
function FindCreateCell(const aColIndex, aRowIndex: Integer;
const aCellClass: TExportCellClass): TExportCell;
Returns the cell from a row aRowIndex and 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.
function FindRow(const aRowIndex: Integer;
out aRow: TExportRow): Boolean;
Tries to get the row with the index aRowIndex. Returns True if cell exists and in this case aRow is set.
function FindCreateRow(const aRowIndex: Integer): TExportRow);
Returns the row with the index aRowIndex. If the row doesn't exists, it will be automatically created.
procedure CalculateColWidthsRowHeights(const aColWidths, aRowHeights: TIntegerList);
This procedure calculates widths and heights of all cells in the worksheet and saves them in two integer lists. Row heights are calculated also for rows with default height - according to the font size of the cells.
procedure PositionToCell(const inCol, inColOffset, inRow, inRowOffset: Integer;
  out outCol, outColOffset, outRow, outRowOffset: Integer); overload;

procedure PositionToCell(
  const aColWidths, aRowHeights: TIntegerList;
  const inCol, inColOffset, inRow, inRowOffset: Integer;
  out outCol, outColOffset, outRow, outRowOffset: Integer); overload;
Calculates position in a worksheet. The input reference cell (inCol, inRow) and the pixel offsets (inColOffset, inRowOffset) are recalculated as out* parameters.
If you use this function more often, use CalculateColWidthsRowHeights to store aColWidths and aRowHeights.