TExportWorkSheet

Properties

NameTypeDescription
RowsTExportRowsRow list in the worksheet.
ColsTExportColsColumn list in the worksheet.
TitleOWideStringWorksheet title. Must be unique in the document.
CodeNameOWideStringWorksheet codename. Must be unique in the document. Used by VBA.
HeaderTExportHeadersPrint header of the worksheet.
FooterTExportHeadersPrint footer of the worksheet.
PageSettingsTExportPageSettingsPage (printer) settings.
WindowSettingsTExportWindowSettingsWindow settings.
StyleTExportCellStyleStyle of the sheet.
ExcelNumberFormatOWideStringDefault number format of sheet cells.
NamedCellsTExportNamedCellsThe named cells with sheet validity.
ProtectionTExportWorkSheetProtectionSheet protection information.
VisibilityTExportWorkSheetVisibility (ewvVisible, ewvHidden, ewvVeryHidden). ewvVeryHidden cannot be enabled in user interface (supported only in Excel).
ConditionalFormattingListList of all conditional formatting objects with the ranges in the sheet.
DataValidationListList of all data validation objects with the ranges in the sheet.
NewCell* are default properties for new created cells:
NewCellStringAlignmentTCellHAlignmentHorizontal alignment of new string cells
NewCellStringFormatOWideStringDefault format for string cells.
NewCellStringUseSharedStringsBooleanDefault UseSharedStrings property for 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; const aTransform: Boolean = True): 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 and aTransform is True.
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: TDoubleList);
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: TDoubleList;
  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.
Categories