All Units

Name Description
fpsallformats

Unit fpsallformats quickly adds all supported fpspreadsheet format readers/writers to the project.

AUTHORS: Felipe Monteiro de Carvalho
fpsChart

fpsConditionalFormat

Unit fpsConditionalFormat implements conditional formatting for Excel and OpenDocument spreadsheet documents.

AUTHORS: Werner Pamler

LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus distribution, for details about the license.
fpsCurrency

Unit fpsCurrency provides a variety of utility functions related to currency values.

Currency symbols are the key to detection of currency values. In order to reckognize strings as currency symbols they have to be registered in the internal CurrencyList.

LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus distribution, for details about the license.
fpsImages

Unit fpsImages implements basic routines for embedding images in worksheets.

AUTHORS: Werner Pamler

LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus distribution, for details about the license.
fpsNumFormat

Unit fpsNumFormat contains classes and procedures to analyze and process number formats.

AUTHORS: Werner Pamler

LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus distribution, for details about the license.
fpSpreadsheet

Unit fpspreadsheet implements spreadsheet documents and their properties and methods.

AUTHORS: Felipe Monteiro de Carvalho, Reinier Olislagers, Werner Pamler

LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus distribution, for details about the license.
fpspreadsheetctrls

Unit fpspreadsheetctrls implements some visual controls which help to create a spreadsheet application without writing too much code.

AUTHORS: Werner Pamler

LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus distribution, for details about the license.

EXAMPLE OF USAGE:

  • Add a WorkbookSource component to the form.

  • Add a WorksheetTabControl

  • Add a WorksheetGrid (from unit fpspreadsheetgrid)

  • Link their WorkbookSource properties to the added WorkbookSource component

  • Set the property FileName of the WorkbookSource to a spreadsheet file.

As a result, the WorksheetTabControl displays tabs for each worksheet in the file, and the WorksheetGrid displays the worksheet according to the selected tab.
fpspreadsheetgrid

Unit fpSpreadsheetGrid implements a grid component which can load and write data from/to FPSpreadsheet documents.

Can either be used alone or in combination with a TsWorkbookSource component. The latter method requires less written code.

AUTHORS: Felipe Monteiro de Carvalho, Werner Pamler

LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus distribution, for details about the license.
fpsRPN

The unit fpsRPN contains methods for simple creation of an RPNFormula array to be used in fpSpreadsheet.

AUTHORS: Werner Pamler

LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus distribution, for details about the license.
fpsTypes

Unit fpsTypes collects the most fundamental declarations used throughout the fpspreadsheet library. It is very likey that this unit must be added to the uses clause of the application.

AUTHORS: Werner Pamler

LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus distribution, for details about the license.
fpsUtils

Unit fpsUtils provides a variety of utility functions used throughout the fpspreadsheet library.

LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus distribution, for details about the license.
Generated by PasDoc 0.16.0-snapshot.


fpsallformats

Unit fpsallformats

Description
Uses
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Constants
Variables

Description

Unit fpsallformats quickly adds all supported fpspreadsheet format readers/writers to the project.

AUTHORS: Felipe Monteiro de Carvalho


fpsChart

Unit fpsChart

Description
Uses
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Constants
Variables

Description

This item has no description.

Overview

Classes, Interfaces, Objects and Records

Name | Description
Record TsChartColor |
Class TsChartLine |
Record TsChartGradientStep |
Class TsChartGradient |
Class TsChartGradientList |
Record TSngPoint |
Class TsChartHatch |
Class TsChartHatchList |
Class TsChartImage |
Class TsChartImagelist |
Class TsChartFill |
Record TsChartLineSegment |
Class TsChartLineStyle |
Class TsChartLineStyleList |
Class TsChartCellAddr |
Class TsChartRange |
Class TsChartElement |
Class TsChartFillElement |
Class TsChartText |
Class TsChartAxis |
Class TsChartLegend |
Class TsChartDataPointStyle |
Class TsChartDataPointStyleList |
Class TsTrendlineEquation |
Class TsChartTrendline |
Class TsChartErrorBars |
Class TsChartSeries |
Class TsAreaSeries |
Class TsBarSeries |
Class TsCustomLineSeries |
Class TsLineSeries |
Class TsPieSeries |
Class TsRadarSeries |
Class TsFilledRadarSeries |
Class TsCustomScatterSeries |
Class TsScatterSeries |
Class TsBubbleSeries |
Class TsStockSeries |
Class TsChartSeriesList |
Class TsChart |
Class TsChartList |

Functions and Procedures

function ChartColor(AColor: TsColor; ATransparency: Single = 0.0): TsChartColor;

Types

TsBubbleSizeMode = (...);
TsChartAxisAlignment = (...);
TsChartAxisLink = (...);
TsChartAxisPosition = (...);
TsChartAxisTick = (...);
TsChartAxisTicks = set of TsChartAxisTick;
TsChartDataLabel = (...);
TsChartDataLabels = set of TsChartDataLabel;
TsChartErrorBarKind = (...);
TsChartFillStyle = (...);
TsChartGradientSteps = array of TsChartGradientStep;
TsChartGradientStyle = (...);
TsChartHatchStyle = (...);
TsChartInterpolation = (...);
TsChartLabelCalloutShape = (...);
TsChartLabelPosition = (...);
TsChartLegendPosition = (...);
TsChartSeriesClass = class of TsChartSeries;
TsChartSeriesSymbol = (...);
TsChartStackMode = (...);
TsChartType = (...);
TsSliceOrder = (...);
TsTrendlineType = (...);

Constants

clsNoLine = -2;
clsSolid = -1;
DEFAULT_CHART_FONT = 'Arial';
DEFAULT_CHART_LINEWIDTH = 0.75;
DEFAULT_SERIES_COLORS: array[0..7] of TsColor = ( scRed, scBlue, scGreen, scMagenta, scPurple, scTeal, scBlack, scGray );
sccTransparent: TsChartColor = (Transparency: 255; Color: 0);

Variables

clsDash: Integer = -1;
clsDashDot: Integer = -1;
clsDot: Integer = -1;
clsFineDot: Integer = -1;
clsLongDash: Integer = -1;
clsLongDashDot: Integer = -1;
clsLongDashDotDot: Integer = -1;

Description

Functions and Procedures

function ChartColor(AColor: TsColor; ATransparency: Single = 0.0): TsChartColor;

This item has no description.

Types

TsBubbleSizeMode = (...);

This item has no description.

Values
  • bsmRadius
  • bsmArea
TsChartAxisAlignment = (...);

This item has no description.

Values
  • caaLeft
  • caaTop
  • caaRight
  • caaBottom
TsChartAxisLink = (...);

This item has no description.

Values
  • calPrimary
  • calSecondary
TsChartAxisPosition = (...);

This item has no description.

Values
  • capStart
  • capEnd
  • capValue
TsChartAxisTick = (...);

This item has no description.

Values
  • catInside
  • catOutside
TsChartAxisTicks = set of TsChartAxisTick;

This item has no description.

TsChartDataLabel = (...);

This item has no description.

Values
  • cdlValue
  • cdlPercentage
  • cdlCategory
  • cdlSeriesName
  • cdlSymbol
  • cdlLeaderLines
TsChartDataLabels = set of TsChartDataLabel;

This item has no description.

TsChartErrorBarKind = (...);

This item has no description.

Values
  • cebkNone
  • cebkConstant
  • cebkPercentage
  • cebkCellRange
TsChartFillStyle = (...);

This item has no description.

Values
  • cfsNoFill
  • cfsSolid
  • cfsGradient
  • cfsHatched
  • cfsSolidHatched
  • cfsImage
TsChartGradientSteps = array of TsChartGradientStep;

This item has no description.

TsChartGradientStyle = (...);

This item has no description.

Values
  • cgsLinear
  • cgsAxial
  • cgsRadial
  • cgsElliptic
  • cgsSquare
  • cgsRectangular
  • cgsShape
TsChartHatchStyle = (...);

This item has no description.

Values
  • chsDot
  • chsSingle
  • chsDouble
  • chsTriple
TsChartInterpolation = (...);

This item has no description.

Values
  • ciLinear
  • ciCubicSpline
  • ciBSpline
  • ciStepStart
  • ciStepEnd
  • ciStepCenterX
  • ciStepCenterY
TsChartLabelCalloutShape = (...);

This item has no description.

Values
  • lcsRectangle
  • lcsRoundRect
  • lcsEllipse
  • lcsLeftArrow
  • lcsUpArrow
  • lcsRightArrow
  • lcsDownArrow
  • lcsRectangleWedge
  • lcsRoundRectWedge
  • lcsEllipseWedge
TsChartLabelPosition = (...);

This item has no description.

Values
  • lpDefault
  • lpOutside
  • lpInside
  • lpCenter
  • lpAbove
  • lpBelow
  • lpNearOrigin
TsChartLegendPosition = (...);

This item has no description.

Values
  • lpRight
  • lpTop
  • lpBottom
  • lpLeft
TsChartSeriesClass = class of TsChartSeries;

This item has no description.

TsChartSeriesSymbol = (...);

This item has no description.

Values
  • cssRect
  • cssDiamond
  • cssTriangle
  • cssTriangleDown
  • cssTriangleLeft
  • cssTriangleRight
  • cssCircle
  • cssStar
  • cssX
  • cssPlus
  • cssAsterisk
  • cssDash
  • cssDot
TsChartStackMode = (...);

This item has no description.

Values
  • csmDefault
  • csmStacked
  • csmStackedPercentage
TsChartType = (...);

This item has no description.

Values
  • ctEmpty
  • ctBar
  • ctLine
  • ctArea
  • ctBarLine
  • ctScatter
  • ctBubble
  • ctRadar
  • ctFilledRadar
  • ctPie
  • ctRing
  • ctStock
TsSliceOrder = (...);

This item has no description.

Values
  • soCCW
  • soCW
TsTrendlineType = (...);

This item has no description.

Values
  • tltNone
  • tltLinear
  • tltLogarithmic
  • tltExponential
  • tltPower
  • tltPolynomial

Constants

clsNoLine = -2;

This item has no description.

clsSolid = -1;

This item has no description.

DEFAULT_CHART_FONT = 'Arial';

This item has no description.

DEFAULT_CHART_LINEWIDTH = 0.75;

This item has no description.

DEFAULT_SERIES_COLORS: array[0..7] of TsColor = ( scRed, scBlue, scGreen, scMagenta, scPurple, scTeal, scBlack, scGray );

This item has no description.

sccTransparent: TsChartColor = (Transparency: 255; Color: 0);

This item has no description.

Variables

clsDash: Integer = -1;

This item has no description.

clsDashDot: Integer = -1;

This item has no description.

clsDot: Integer = -1;

This item has no description.

clsFineDot: Integer = -1;

Pre-defined chart line styles given as indexes into the chart's LineStyles list. Get their value in the constructor of TsChart. Default here to -1 which is the code for a solid line, just in case that something goes wrong

clsLongDash: Integer = -1;

This item has no description.

clsLongDashDot: Integer = -1;

This item has no description.

clsLongDashDotDot: Integer = -1;

This item has no description.


fpsChart: Record TsChartColor

Record TsChartColor

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartColor = record

Description

This item has no description.

Overview

Fields

Public | Transparency: single;
Public | Red: Byte
Public | Green: Byte
Public | Blue: Byte
Public | SystemColorIndex: Byte
Public | Color: TsColor

Description

Fields

Public Transparency: single;

This item has no description.

Public Red: Byte

This item has no description.

Public Green: Byte

This item has no description.

Public Blue: Byte

This item has no description.

Public SystemColorIndex: Byte

This item has no description.

Public Color: TsColor

This item has no description.


fpsChart: Class TsChartLine

Class TsChartLine

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartLine = class(TObject)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartLine

Overview

Fields

Public | Style: Integer;
Public | Width: Double;
Public | Color: TsChartColor;
Public | Transparency: Double;

Methods

Public | constructor CreateSolid(AColor: TsChartColor; AWidth: Double);
Public | procedure CopyFrom(ALine: TsChartLine);

Description

Fields

Public Style: Integer;

This item has no description.

Public Width: Double;

This item has no description.

Public Color: TsChartColor;

This item has no description.

Public Transparency: Double;

This item has no description.

Methods

Public constructor CreateSolid(AColor: TsChartColor; AWidth: Double);

This item has no description.

Public procedure CopyFrom(ALine: TsChartLine);

This item has no description.


fpsChart: Record TsChartGradientStep

Record TsChartGradientStep

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartGradientStep = record

Description

This item has no description.

Overview

Fields

Public | Value: Double;
Public | Color: TsChartColor;
Public | Intensity: Double;

Description

Fields

Public Value: Double;

This item has no description.

Public Color: TsChartColor;

This item has no description.

Public Intensity: Double;

This item has no description.


fpsChart: Class TsChartGradient

Class TsChartGradient

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartGradient = class(TObject)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartGradient

Overview

Fields

Public | Name: String;
Public | Style: TsChartGradientStyle;
Public | Border: Double;
Public | CenterX: Double;
Public | CenterY: Double;
Public | Angle: Double;

Methods

Public | constructor Create;
Public | destructor Destroy; override;
Public | function NumSteps: Integer;
Public | procedure AddStep(AValue: Double; AColor: TsChartColor; AIntensity: Single = 1.0);
Public | procedure CopyFrom(ASource: TsChartGradient);

Properties

Public | property EndColor: TsChartColor index 1 read GetColor;
Public | property EndIntensity: Double index 1 read GetIntensity;
Public | property StartColor: TsChartColor index 0 read GetColor;
Public | property StartIntensity: Double index 0 read GetIntensity;
Public | property Steps[AIndex: Integer]: TsChartGradientStep read GetSteps;

Description

Fields

Public Name: String;

This item has no description.

Public Style: TsChartGradientStyle;

This item has no description.

Public Border: Double;

This item has no description.

Public CenterX: Double;

This item has no description.

Public CenterY: Double;

This item has no description.

Public Angle: Double;

This item has no description.

Methods

Public constructor Create;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public function NumSteps: Integer;

This item has no description.

Public procedure AddStep(AValue: Double; AColor: TsChartColor; AIntensity: Single = 1.0);

This item has no description.

Public procedure CopyFrom(ASource: TsChartGradient);

This item has no description.

Properties

Public property EndColor: TsChartColor index 1 read GetColor;

This item has no description.

Public property EndIntensity: Double index 1 read GetIntensity;

This item has no description.

Public property StartColor: TsChartColor index 0 read GetColor;

This item has no description.

Public property StartIntensity: Double index 0 read GetIntensity;

This item has no description.

Public property Steps[AIndex: Integer]: TsChartGradientStep read GetSteps;

This item has no description.


fpsChart: Class TsChartGradientList

Class TsChartGradientList

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartGradientList = class(TFPObjectList)

Description

This item has no description.

Hierarchy

  • TObject
  • TFPObjectList
  • TsChartGradientList

Overview

Methods

Public | function AddAxialGradient(AName: String; AStartColor, AEndColor: TsChartColor; AStartIntensity, AEndIntensity: Double; ABorder, AAngle: Double): Integer;
Public | function AddEllipticGradient(AName: String; AStartColor, AEndColor: TsChartColor; AStartIntensity, AEndIntensity: Double; ABorder, ACenterX, ACenterY, AAngle: Double): Integer;
Public | function AddGradient(AName: String; AGradient: TsChartGradient): Integer;
Public | function AddGradient(AName: String; AStyle: TsChartGradientStyle; AStartColor, AEndColor: TsChartColor; AStartIntensity, AEndIntensity: Double; ABorder, ACenterX, ACenterY, AAngle: Double): Integer;
Public | function AddLinearGradient(AName: String; AStartColor, AEndColor: TsChartColor; AStartIntensity, AEndIntensity: Double; ABorder, AAngle: Double): Integer;
Public | function AddRadialGradient(AName: String; AStartColor, AEndColor: TsChartColor; AStartIntensity, AEndIntensity: Double; ABorder, ACenterX, ACenterY: Double): Integer;
Public | function AddRectangularGradient(AName: String; AStartColor, AEndColor: TsChartColor; AStartIntensity, AEndIntensity: Double; ABorder, ACenterX, ACenterY, AAngle: Double): Integer;
Public | function AddSquareGradient(AName: String; AStartColor, AEndColor: TsChartColor; AStartIntensity, AEndIntensity: Double; ABorder, ACenterX, ACenterY, AAngle: Double): Integer;
Public | function FindByName(AName: String): TsChartGradient;
Public | function IndexOfName(AName: String): Integer;

Properties

Public property Items[AIndex: Integer]: TsChartGradient read GetItem write SetItem;

Description

Methods

Public function AddAxialGradient(AName: String; AStartColor, AEndColor: TsChartColor; AStartIntensity, AEndIntensity: Double; ABorder, AAngle: Double): Integer;

This item has no description.

Public function AddEllipticGradient(AName: String; AStartColor, AEndColor: TsChartColor; AStartIntensity, AEndIntensity: Double; ABorder, ACenterX, ACenterY, AAngle: Double): Integer;

This item has no description.

Public function AddGradient(AName: String; AGradient: TsChartGradient): Integer;

This item has no description.

Public function AddGradient(AName: String; AStyle: TsChartGradientStyle; AStartColor, AEndColor: TsChartColor; AStartIntensity, AEndIntensity: Double; ABorder, ACenterX, ACenterY, AAngle: Double): Integer;

This item has no description.

Public function AddLinearGradient(AName: String; AStartColor, AEndColor: TsChartColor; AStartIntensity, AEndIntensity: Double; ABorder, AAngle: Double): Integer;

This item has no description.

Public function AddRadialGradient(AName: String; AStartColor, AEndColor: TsChartColor; AStartIntensity, AEndIntensity: Double; ABorder, ACenterX, ACenterY: Double): Integer;

This item has no description.

Public function AddRectangularGradient(AName: String; AStartColor, AEndColor: TsChartColor; AStartIntensity, AEndIntensity: Double; ABorder, ACenterX, ACenterY, AAngle: Double): Integer;

This item has no description.

Public function AddSquareGradient(AName: String; AStartColor, AEndColor: TsChartColor; AStartIntensity, AEndIntensity: Double; ABorder, ACenterX, ACenterY, AAngle: Double): Integer;

This item has no description.

Public function FindByName(AName: String): TsChartGradient;

This item has no description.

Public function IndexOfName(AName: String): Integer;

This item has no description.

Properties

Public property Items[AIndex: Integer]: TsChartGradient read GetItem write SetItem;

This item has no description.


fpsChart: Record TSngPoint

Record TSngPoint

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TSngPoint = record

Description

This item has no description.

Overview

Fields

Public | X: Single;
Public | Y: Single;

Description

Fields

Public X: Single;

This item has no description.

Public Y: Single;

This item has no description.


fpsChart: Class TsChartHatch

Class TsChartHatch

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartHatch = class(TObject)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartHatch

Overview

Fields

Public | Name: String;
Public | Style: TsChartHatchStyle;
Public | PatternColor: TsChartColor;
Public | PatternWidth: Double;
Public | PatternHeight: Double;
Public | PatternAngle: Double;
Public | NumDots: Integer;
Public | DotPos: Array of TSngPoint;
Public | LineWidth: Single;

Methods

Public | destructor Destroy; override;
Public | procedure CopyFrom(ASource: TsChartHatch);

Description

Fields

Public Name: String;

This item has no description.

Public Style: TsChartHatchStyle;

This item has no description.

Public PatternColor: TsChartColor;

This item has no description.

Public PatternWidth: Double;

This item has no description.

Public PatternHeight: Double;

This item has no description.

Public PatternAngle: Double;

This item has no description.

Public NumDots: Integer;

This item has no description.

Public DotPos: Array of TSngPoint;

This item has no description.

Public LineWidth: Single;

This item has no description.

Methods

Public destructor Destroy; override;

This item has no description.

Public procedure CopyFrom(ASource: TsChartHatch);

This item has no description.


fpsChart: Class TsChartHatchList

Class TsChartHatchList

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartHatchList = class(TFPObjectList)

Description

This item has no description.

Hierarchy

  • TObject
  • TFPObjectList
  • TsChartHatchList

Overview

Methods

Public | function AddDotHatch(AName: String; ADotColor: TsChartColor; APatternWidth, APatternHeight: Integer; ADots: String): Integer;
Public | function AddDotHatch(AName: String; ADotColor: TsChartColor; APatternWidth, APatternHeight: Double; ANumDots: Integer; const ADots: array of single): Integer;
Public | function AddLineHatch(AName: String; AStyle: TsChartHatchStyle; ALineColor: TsChartColor; ALineDistance, ALineWidth, ALineAngle: Double): Integer;
Public | function FindByName(AName: String): TsChartHatch;
Public | function IndexOfName(AName: String): Integer;
Protected | function NewPattern(AName: String): Integer;

Properties

Public property Items[AIndex: Integer]: TsChartHatch read GetItem write SetItem;

Description

Methods

Public function AddDotHatch(AName: String; ADotColor: TsChartColor; APatternWidth, APatternHeight: Integer; ADots: String): Integer;

This item has no description.

Public function AddDotHatch(AName: String; ADotColor: TsChartColor; APatternWidth, APatternHeight: Double; ANumDots: Integer; const ADots: array of single): Integer;

This item has no description.

Public function AddLineHatch(AName: String; AStyle: TsChartHatchStyle; ALineColor: TsChartColor; ALineDistance, ALineWidth, ALineAngle: Double): Integer;

This item has no description.

Public function FindByName(AName: String): TsChartHatch;

This item has no description.

Public function IndexOfName(AName: String): Integer;

This item has no description.

Protected function NewPattern(AName: String): Integer;

This item has no description.

Properties

Public property Items[AIndex: Integer]: TsChartHatch read GetItem write SetItem;

This item has no description.


fpsChart: Class TsChartImage

Class TsChartImage

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartImage = class(TObject)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartImage

Overview

Fields

Public | Name: String;
Public | Image: TFPCustomImage;
Public | Width: Double;
Public | Height: Double;

Methods

Public | destructor Destroy; override;
Public | procedure CopyFrom(ASource: TsChartImage);

Description

Fields

Public Name: String;

This item has no description.

Public Image: TFPCustomImage;

This item has no description.

Public Width: Double;

This item has no description.

Public Height: Double;

This item has no description.

Methods

Public destructor Destroy; override;

This item has no description.

Public procedure CopyFrom(ASource: TsChartImage);

This item has no description.


fpsChart: Class TsChartImagelist

Class TsChartImagelist

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartImagelist = class(TFPObjectList)

Description

This item has no description.

Hierarchy

  • TObject
  • TFPObjectList
  • TsChartImagelist

Overview

Methods

Public | function AddImage(AName: String; AImage: TFPCustomImage): Integer;
Public | function FindByName(AName: String): TsChartImage;
Public | function IndexOfName(AName: String): Integer;

Properties

Public property Items[Aindex: Integer]: TsChartImage read GetItem write SetItem;

Description

Methods

Public function AddImage(AName: String; AImage: TFPCustomImage): Integer;

This item has no description.

Public function FindByName(AName: String): TsChartImage;

This item has no description.

Public function IndexOfName(AName: String): Integer;

This item has no description.

Properties

Public property Items[Aindex: Integer]: TsChartImage read GetItem write SetItem;

This item has no description.


fpsChart: Class TsChartFill

Class TsChartFill

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartFill = class(TObject)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartFill

Overview

Fields

Public | Style: TsChartFillStyle;
Public | Color: TsChartColor;
Public | Gradient: Integer;
Public | Hatch: Integer;
Public | Image: Integer;

Methods

Public | constructor CreateHatchFill(AHatchIndex: Integer; ABkColor: TsChartColor);
Public | constructor CreateSolidFill(AColor: TsChartColor);
Public | procedure CopyFrom(AFill: TsChartFill);

Description

Fields

Public Style: TsChartFillStyle;

This item has no description.

Public Color: TsChartColor;

This item has no description.

Public Gradient: Integer;

This item has no description.

Public Hatch: Integer;

This item has no description.

Public Image: Integer;

This item has no description.

Methods

Public constructor CreateHatchFill(AHatchIndex: Integer; ABkColor: TsChartColor);

This item has no description.

Public constructor CreateSolidFill(AColor: TsChartColor);

This item has no description.

Public procedure CopyFrom(AFill: TsChartFill);

This item has no description.


fpsChart: Record TsChartLineSegment

Record TsChartLineSegment

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartLineSegment = record

Description

This item has no description.

Overview

Fields

Public | Length: Double;
Public | Count: Integer;

Description

Fields

Public Length: Double;

This item has no description.

Public Count: Integer;

This item has no description.


fpsChart: Class TsChartLineStyle

Class TsChartLineStyle

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartLineStyle = class(TObject)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartLineStyle

Overview

Fields

Public | Name: String;
Public | Segment1: TsChartLineSegment;
Public | Segment2: TsChartLineSegment;
Public | Distance: Double;
Public | RelativeToLineWidth: Boolean;

Methods

Public | function GetID: String;
Public | procedure CopyFrom(ASource: TsChartLineStyle);

Description

Fields

Public Name: String;

This item has no description.

Public Segment1: TsChartLineSegment;

This item has no description.

Public Segment2: TsChartLineSegment;

This item has no description.

Public Distance: Double;

This item has no description.

Public RelativeToLineWidth: Boolean;

This item has no description.

Methods

Public function GetID: String;

This item has no description.

Public procedure CopyFrom(ASource: TsChartLineStyle);

This item has no description.


fpsChart: Class TsChartLineStyleList

Class TsChartLineStyleList

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartLineStyleList = class(TFPObjectList)

Description

This item has no description.

Hierarchy

  • TObject
  • TFPObjectList
  • TsChartLineStyleList

Overview

Methods

Public | function Add(AName: String; ASeg1Length: Double; ASeg1Count: Integer; ASeg2Length: Double; ASeg2Count: Integer; ADistance: Double; ARelativeToLineWidth: Boolean): Integer;
Public | function IndexOfName(AName: String): Integer;

Properties

Public property Items[AIndex: Integer]: TsChartLineStyle read GetItem write SetItem;

Description

Methods

Public function Add(AName: String; ASeg1Length: Double; ASeg1Count: Integer; ASeg2Length: Double; ASeg2Count: Integer; ADistance: Double; ARelativeToLineWidth: Boolean): Integer;

This item has no description.

Public function IndexOfName(AName: String): Integer;

This item has no description.

Properties

Public property Items[AIndex: Integer]: TsChartLineStyle read GetItem write SetItem;

This item has no description.


fpsChart: Class TsChartCellAddr

Class TsChartCellAddr

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartCellAddr = class(TObject)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartCellAddr

Overview

Fields

Public | Sheet: String;
Public | Row: Cardinal;
Public | Col: Cardinal;

Methods

Public | constructor Create(AChart: TsChart);
Public | function GetSheetName: String;
Public | function IsUsed: Boolean;
Public | procedure CopyFrom(ASource: TsChartCellAddr);

Properties

Public property Chart: TsChart read FChart;

Description

Fields

Public Sheet: String;

This item has no description.

Public Row: Cardinal;

This item has no description.

Public Col: Cardinal;

This item has no description.

Methods

Public constructor Create(AChart: TsChart);

This item has no description.

Public function GetSheetName: String;

This item has no description.

Public function IsUsed: Boolean;

This item has no description.

Public procedure CopyFrom(ASource: TsChartCellAddr);

This item has no description.

Properties

Public property Chart: TsChart read FChart;

This item has no description.


fpsChart: Class TsChartRange

Class TsChartRange

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartRange = class(TObject)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartRange

Overview

Fields

Public | Sheet1: String;
Public | Sheet2: String;
Public | Row1: Cardinal;
Public | Col1: Cardinal;
Public | Row2: Cardinal;
Public | Col2: Cardinal;

Methods

Public | constructor Create(AChart: TsChart);
Public | function GetSheet1Name: String;
Public | function GetSheet2Name: String;
Public | function IsEmpty: Boolean;
Public | function NumCells: Integer;
Public | procedure CopyFrom(ASource: TsChartRange);

Properties

Public property Chart: TsChart read FChart;

Description

Fields

Public Sheet1: String;

This item has no description.

Public Sheet2: String;

This item has no description.

Public Row1: Cardinal;

This item has no description.

Public Col1: Cardinal;

This item has no description.

Public Row2: Cardinal;

This item has no description.

Public Col2: Cardinal;

This item has no description.

Methods

Public constructor Create(AChart: TsChart);

This item has no description.

Public function GetSheet1Name: String;

This item has no description.

Public function GetSheet2Name: String;

This item has no description.

Public function IsEmpty: Boolean;

This item has no description.

Public function NumCells: Integer;

This item has no description.

Public procedure CopyFrom(ASource: TsChartRange);

This item has no description.

Properties

Public property Chart: TsChart read FChart;

This item has no description.


fpsChart: Class TsChartElement

Class TsChartElement

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartElement = class(TObject)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartElement

Overview

Methods

Public | constructor Create(AChart: TsChart);
Protected | function GetVisible: Boolean; virtual;
Public | procedure CopyFrom(ASource: TsChartElement); virtual;
Protected | procedure SetVisible(AValue: Boolean); virtual;

Properties

Public | property Chart: TsChart read FChart;
Public | property Visible: Boolean read GetVisible write SetVisible;

Description

Methods

Public constructor Create(AChart: TsChart);

This item has no description.

Protected function GetVisible: Boolean; virtual;

This item has no description.

Public procedure CopyFrom(ASource: TsChartElement); virtual;

This item has no description.

Protected procedure SetVisible(AValue: Boolean); virtual;

This item has no description.

Properties

Public property Chart: TsChart read FChart;

This item has no description.

Public property Visible: Boolean read GetVisible write SetVisible;

This item has no description.


fpsChart: Class TsChartFillElement

Class TsChartFillElement

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartFillElement = class(TsChartElement)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartElement
  • TsChartFillElement

Overview

Methods

Public | constructor Create(AChart: TsChart);
Public | destructor Destroy; override;
Public | procedure CopyFrom(ASource: TsChartElement); override;

Properties

Public | property Background: TsChartFill read FBackground write FBackground;
Public | property Border: TsChartLine read FBorder write FBorder;

Description

Methods

Public constructor Create(AChart: TsChart);

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public procedure CopyFrom(ASource: TsChartElement); override;

This item has no description.

Properties

Public property Background: TsChartFill read FBackground write FBackground;

This item has no description.

Public property Border: TsChartLine read FBorder write FBorder;

This item has no description.


fpsChart: Class TsChartText

Class TsChartText

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartText = class(TsChartFillElement)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartElement
  • TsChartFillElement
  • TsChartText

Overview

Methods

Public | constructor Create(AChart: TsChart);
Public | destructor Destroy; override;
Public | procedure CopyFrom(ASource: TsChartElement); override;

Properties

Public | property Caption: String read FCaption write FCaption;
Public | property Font: TsFont read FFont write FFont;
Public | property PosX: Double read FPosX write FPosX;
Public | property PosY: Double read FPosY write FPosY;
Public | property RotationAngle: single read FRotationAngle write FRotationAngle;
Public | property Visible;

Description

Methods

Public constructor Create(AChart: TsChart);

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public procedure CopyFrom(ASource: TsChartElement); override;

This item has no description.

Properties

Public property Caption: String read FCaption write FCaption;

This item has no description.

Public property Font: TsFont read FFont write FFont;

This item has no description.

Public property PosX: Double read FPosX write FPosX;

This item has no description.

Public property PosY: Double read FPosY write FPosY;

This item has no description.

Public property RotationAngle: single read FRotationAngle write FRotationAngle;

This item has no description.

Public property Visible;

This item has no description.


fpsChart: Class TsChartAxis

Class TsChartAxis

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartAxis = class(TsChartFillElement)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartElement
  • TsChartFillElement
  • TsChartAxis

Overview

Methods

Public | constructor Create(AChart: TsChart);
Public | destructor Destroy; override;
Public | function GetOtherAxis: TsChartAxis;
Public | function GetRotatedAxis: TsChartAxis;
Public | procedure CopyFrom(ASource: TsChartElement); override;
Public | procedure SetCategoryRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);
Public | procedure SetCategoryRange(ARow1, ACol1, ARow2, ACol2: Cardinal);

Properties

Public | property Alignment: TsChartAxisAlignment read FAlignment write FAlignment;
Public | property AutomaticMajorInterval: Boolean read FAutomaticMajorInterval write FAutomaticMajorInterval;
Public | property AutomaticMax: Boolean read FAutomaticMax write FAutomaticMax;
Public | property AutomaticMin: Boolean read FAutomaticMin write FAutomaticMin;
Public | property AutomaticMinorInterval: Boolean read FAutomaticMinorInterval write FAutomaticMinorInterval;
Public | property AutomaticMinorSteps: Boolean read FAutomaticMinorSteps write FAutomaticMinorSteps;
Public | property AxisLine: TsChartLine read FAxisLine write FAxisLine;
Public | property CategoryRange: TsChartRange read FCategoryRange write FCategoryRange;
Public | property DateTime: Boolean read FDateTime write FDateTime;
Public | property DefaultTitleRotation: Boolean read FDefaultTitleRotation write FDefaultTitleRotation;
Public | property Inverted: Boolean read FInverted write FInverted;
Public | property LabelFont: TsFont read FLabelFont write FLabelFont;
Public | property LabelFormat: String read FLabelFormat write FLabelFormat;
Public | property LabelFormatDateTime: String read FLabelFormatDateTime write FLabelFormatDateTime;
Public | property LabelFormatFromSource: Boolean read FLabelFormatFromSource write FLabelFormatFromSource;
Public | property LabelFormatPercent: String read FLabelFormatPercent write FLabelFormatPercent;
Public | property LabelRotation: Single read FLabelRotation write FLabelRotation;
Public | property Logarithmic: Boolean read FLogarithmic write FLogarithmic;
Public | property LogBase: Double read FLogBase write FLogBase;
Public | property MajorGridLines: TsChartLine read FMajorGridLines write FMajorGridLines;
Public | property MajorInterval: Double read FMajorInterval write SetMajorInterval;
Public | property MajorTicks: TsChartAxisTicks read FMajorTicks write FMajorTicks;
Public | property Max: Double read FMax write SetMax;
Public | property Min: Double read FMin write SetMin;
Public | property MinorCount: Integer read FMinorCount write SetMinorCount;
Public | property MinorGridLines: TsChartLine read FMinorGridLines write FMinorGridLines;
Public | property MinorInterval: Double read FMinorInterval write SetMinorInterval;
Public | property MinorTicks: TsChartAxisTicks read FMinorTicks write FMinorTicks;
Public | property Position: TsChartAxisPosition read FPosition write FPosition;
Public | property PositionValue: Double read FPositionValue write FPositionValue;
Public | property ShowLabels: Boolean read FShowLabels write FShowLabels;
Public | property Title: TsChartText read FTitle write FTitle;
Public | property TitleRotationAngle: Single read GetTitleRotationAngle;
Public | property Visible;

Description

Methods

Public constructor Create(AChart: TsChart);

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public function GetOtherAxis: TsChartAxis;

Returns the other axis in the same direction, i.e. when the axis is the primary x axis the function returns the secondary x axis, etc.

Public function GetRotatedAxis: TsChartAxis;

Returns the axis in the other direction when the chart is rotate.

Public procedure CopyFrom(ASource: TsChartElement); override;

This item has no description.

Public procedure SetCategoryRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);

This item has no description.

Public procedure SetCategoryRange(ARow1, ACol1, ARow2, ACol2: Cardinal);

This item has no description.

Properties

Public property Alignment: TsChartAxisAlignment read FAlignment write FAlignment;

This item has no description.

Public property AutomaticMajorInterval: Boolean read FAutomaticMajorInterval write FAutomaticMajorInterval;

This item has no description.

Public property AutomaticMax: Boolean read FAutomaticMax write FAutomaticMax;

This item has no description.

Public property AutomaticMin: Boolean read FAutomaticMin write FAutomaticMin;

This item has no description.

Public property AutomaticMinorInterval: Boolean read FAutomaticMinorInterval write FAutomaticMinorInterval;

This item has no description.

Public property AutomaticMinorSteps: Boolean read FAutomaticMinorSteps write FAutomaticMinorSteps;

This item has no description.

Public property AxisLine: TsChartLine read FAxisLine write FAxisLine;

This item has no description.

Public property CategoryRange: TsChartRange read FCategoryRange write FCategoryRange;

This item has no description.

Public property DateTime: Boolean read FDateTime write FDateTime;

This item has no description.

Public property DefaultTitleRotation: Boolean read FDefaultTitleRotation write FDefaultTitleRotation;

This item has no description.

Public property Inverted: Boolean read FInverted write FInverted;

This item has no description.

Public property LabelFont: TsFont read FLabelFont write FLabelFont;

This item has no description.

Public property LabelFormat: String read FLabelFormat write FLabelFormat;

This item has no description.

Public property LabelFormatDateTime: String read FLabelFormatDateTime write FLabelFormatDateTime;

This item has no description.

Public property LabelFormatFromSource: Boolean read FLabelFormatFromSource write FLabelFormatFromSource;

This item has no description.

Public property LabelFormatPercent: String read FLabelFormatPercent write FLabelFormatPercent;

This item has no description.

Public property LabelRotation: Single read FLabelRotation write FLabelRotation;

This item has no description.

Public property Logarithmic: Boolean read FLogarithmic write FLogarithmic;

This item has no description.

Public property LogBase: Double read FLogBase write FLogBase;

This item has no description.

Public property MajorGridLines: TsChartLine read FMajorGridLines write FMajorGridLines;

This item has no description.

Public property MajorInterval: Double read FMajorInterval write SetMajorInterval;

This item has no description.

Public property MajorTicks: TsChartAxisTicks read FMajorTicks write FMajorTicks;

This item has no description.

Public property Max: Double read FMax write SetMax;

This item has no description.

Public property Min: Double read FMin write SetMin;

This item has no description.

Public property MinorCount: Integer read FMinorCount write SetMinorCount;

This item has no description.

Public property MinorGridLines: TsChartLine read FMinorGridLines write FMinorGridLines;

This item has no description.

Public property MinorInterval: Double read FMinorInterval write SetMinorInterval;

This item has no description.

Public property MinorTicks: TsChartAxisTicks read FMinorTicks write FMinorTicks;

This item has no description.

Public property Position: TsChartAxisPosition read FPosition write FPosition;

This item has no description.

Public property PositionValue: Double read FPositionValue write FPositionValue;

This item has no description.

Public property ShowLabels: Boolean read FShowLabels write FShowLabels;

This item has no description.

Public property Title: TsChartText read FTitle write FTitle;

This item has no description.

Public property TitleRotationAngle: Single read GetTitleRotationAngle;

This item has no description.

Public property Visible;

This item has no description.


fpsChart: Class TsChartLegend

Class TsChartLegend

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartLegend = class(TsChartFillElement)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartElement
  • TsChartFillElement
  • TsChartLegend

Overview

Methods

Public | constructor Create(AChart: TsChart);
Public | destructor Destroy; override;
Public | procedure CopyFrom(ASource: TsChartElement); override;

Properties

Public | property CanOverlapPlotArea: Boolean read FCanOverlapPlotArea write FCanOverlapPlotArea;
Public | property Font: TsFont read FFont write FFont;
Public | property Position: TsChartLegendPosition read FPosition write FPosition;
Public | property PosX: Double read FPosX write FPosX;
Public | property PosY: Double read FPosY write FPosY;

Description

Methods

Public constructor Create(AChart: TsChart);

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public procedure CopyFrom(ASource: TsChartElement); override;

This item has no description.

Properties

Public property CanOverlapPlotArea: Boolean read FCanOverlapPlotArea write FCanOverlapPlotArea;

This item has no description.

Public property Font: TsFont read FFont write FFont;

This item has no description.

Public property Position: TsChartLegendPosition read FPosition write FPosition;

This item has no description.

Public property PosX: Double read FPosX write FPosX;

This item has no description.

Public property PosY: Double read FPosY write FPosY;

This item has no description.


fpsChart: Class TsChartDataPointStyle

Class TsChartDataPointStyle

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartDataPointStyle = class(TsChartFillElement)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartElement
  • TsChartFillElement
  • TsChartDataPointStyle

Overview

Methods

Public procedure CopyFrom(ASource: TsChartElement);

Properties

Public | property DataPointIndex: Integer read FDataPointIndex write FDataPointIndex;
Public | property PieOffset: Integer read FPieOffset write FPieOffset;

Description

Methods

Public procedure CopyFrom(ASource: TsChartElement);

This item has no description.

Properties

Public property DataPointIndex: Integer read FDataPointIndex write FDataPointIndex;

This item has no description.

Public property PieOffset: Integer read FPieOffset write FPieOffset;

This item has no description.


fpsChart: Class TsChartDataPointStyleList

Class TsChartDataPointStyleList

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartDataPointStyleList = class(TFPObjectList)

Description

This item has no description.

Hierarchy

  • TObject
  • TFPObjectList
  • TsChartDataPointStyleList

Overview

Methods

Public | constructor Create(AChart: TsChart);
Public | function AddFillAndLine(ADataPointIndex: Integer; AFill: TsChartFill; ALine: TsChartline; APieOffset: Integer = 0): Integer;
Public | function AddSolidFill(ADataPointIndex: Integer; AColor: TsChartColor; ALine: TsChartLine = nil; APieOffset: Integer = 0): Integer;
Public | function IndexOfDataPoint(ADataPointIndex: Integer): Integer;

Properties

Public property Items[AIndex: Integer]: TsChartDataPointStyle read GetItem write SetItem;

Description

Methods

Public constructor Create(AChart: TsChart);

This item has no description.

Public function AddFillAndLine(ADataPointIndex: Integer; AFill: TsChartFill; ALine: TsChartline; APieOffset: Integer = 0): Integer;

This item has no description.

Public function AddSolidFill(ADataPointIndex: Integer; AColor: TsChartColor; ALine: TsChartLine = nil; APieOffset: Integer = 0): Integer;

This item has no description.

Public function IndexOfDataPoint(ADataPointIndex: Integer): Integer;

This item has no description.

Properties

Public property Items[AIndex: Integer]: TsChartDataPointStyle read GetItem write SetItem;

This item has no description.


fpsChart: Class TsTrendlineEquation

Class TsTrendlineEquation

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsTrendlineEquation = class(TObject)

Description

This item has no description.

Hierarchy

  • TObject
  • TsTrendlineEquation

Overview

Fields

Public | Fill: TsChartFill;
Public | Font: TsFont;
Public | Border: TsChartLine;
Public | NumberFormat: String;
Public | Left: Double;
Public | Top: Double;
Public | XName: String;
Public | YName: String;

Methods

Public | constructor Create;
Public | destructor Destroy; override;
Public | function DefaultBorder: Boolean;
Public | function DefaultFill: Boolean;
Public | function DefaultFont: Boolean;
Public | function DefaultNumberFormat: Boolean;
Public | function DefaultPosition: Boolean;
Public | function DefaultXName: Boolean;
Public | function DefaultYName: Boolean;

Description

Fields

Public Fill: TsChartFill;

This item has no description.

Public Font: TsFont;

This item has no description.

Public Border: TsChartLine;

This item has no description.

Public NumberFormat: String;

This item has no description.

Public Left: Double;

This item has no description.

Public Top: Double;

This item has no description.

Public XName: String;

This item has no description.

Public YName: String;

This item has no description.

Methods

Public constructor Create;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public function DefaultBorder: Boolean;

This item has no description.

Public function DefaultFill: Boolean;

This item has no description.

Public function DefaultFont: Boolean;

This item has no description.

Public function DefaultNumberFormat: Boolean;

This item has no description.

Public function DefaultPosition: Boolean;

This item has no description.

Public function DefaultXName: Boolean;

This item has no description.

Public function DefaultYName: Boolean;

This item has no description.


fpsChart: Class TsChartTrendline

Class TsChartTrendline

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartTrendline = class(TObject)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartTrendline

Overview

Fields

Public | Title: String;
Public | TrendlineType: TsTrendlineType;
Public | ExtrapolateForwardBy: Double;
Public | ExtrapolateBackwardBy: Double;
Public | ForceYIntercept: Boolean;
Public | YInterceptValue: Double;
Public | PolynomialDegree: Integer;
Public | DisplayEquation: Boolean;
Public | DisplayRSquare: Boolean;
Public | Equation: TsTrendlineEquation;
Public | Line: TsChartLine;

Methods

Public | constructor Create;
Public | destructor Destroy; override;

Description

Fields

Public Title: String;

This item has no description.

Public TrendlineType: TsTrendlineType;

This item has no description.

Public ExtrapolateForwardBy: Double;

This item has no description.

Public ExtrapolateBackwardBy: Double;

This item has no description.

Public ForceYIntercept: Boolean;

This item has no description.

Public YInterceptValue: Double;

This item has no description.

Public PolynomialDegree: Integer;

This item has no description.

Public DisplayEquation: Boolean;

This item has no description.

Public DisplayRSquare: Boolean;

This item has no description.

Public Equation: TsTrendlineEquation;

This item has no description.

Public Line: TsChartLine;

This item has no description.

Methods

Public constructor Create;

This item has no description.

Public destructor Destroy; override;

This item has no description.


fpsChart: Class TsChartErrorBars

Class TsChartErrorBars

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartErrorBars = class(TsChartElement)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartElement
  • TsChartErrorBars

Overview

Methods

Public | constructor Create(ASeries: TsChartSeries);
Public | destructor Destroy; override;
Protected | function GetVisible: Boolean; override;
Public | procedure CopyFrom(ASource: TsChartElement); override;
Public | procedure SetErrorBarRangeNeg(ARow1, ACol1, ARow2, ACol2: Cardinal);
Public | procedure SetErrorBarRangeNeg(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);
Public | procedure SetErrorBarRangePos(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);
Public | procedure SetErrorBarRangePos(ARow1, ACol1, ARow2, ACol2: Cardinal);
Protected | procedure SetVisible(AValue: Boolean); override;

Properties

Public | property Kind: TsChartErrorBarKind read FKind write SetKind;
Public | property Line: TsChartLine read FLine write SetLine;
Public | property RangeNeg: TsChartRange index 1 read GetRange write SetRange;
Public | property RangePos: TsChartRange index 0 read GetRange write SetRange;
Public | property Series: TsChartSeries read FSeries;
Public | property ShowEndCap: Boolean read FShowEndCap write FShowEndCap;
Public | property ShowNeg: Boolean index 1 read GetShow write SetShow;
Public | property ShowPos: Boolean index 0 read GetShow write SetShow;
Public | property ValueNeg: Double index 1 read GetValue write SetValue;
Public | property ValuePos: Double index 0 read GetValue write SetValue;

Description

Methods

Public constructor Create(ASeries: TsChartSeries);

This item has no description.

Public destructor Destroy; override;

This item has no description.

Protected function GetVisible: Boolean; override;

This item has no description.

Public procedure CopyFrom(ASource: TsChartElement); override;

This item has no description.

Public procedure SetErrorBarRangeNeg(ARow1, ACol1, ARow2, ACol2: Cardinal);

This item has no description.

Public procedure SetErrorBarRangeNeg(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);

This item has no description.

Public procedure SetErrorBarRangePos(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);

This item has no description.

Public procedure SetErrorBarRangePos(ARow1, ACol1, ARow2, ACol2: Cardinal);

This item has no description.

Protected procedure SetVisible(AValue: Boolean); override;

This item has no description.

Properties

Public property Kind: TsChartErrorBarKind read FKind write SetKind;

This item has no description.

Public property Line: TsChartLine read FLine write SetLine;

This item has no description.

Public property RangeNeg: TsChartRange index 1 read GetRange write SetRange;

This item has no description.

Public property RangePos: TsChartRange index 0 read GetRange write SetRange;

This item has no description.

Public property Series: TsChartSeries read FSeries;

This item has no description.

Public property ShowEndCap: Boolean read FShowEndCap write FShowEndCap;

This item has no description.

Public property ShowNeg: Boolean index 1 read GetShow write SetShow;

This item has no description.

Public property ShowPos: Boolean index 0 read GetShow write SetShow;

This item has no description.

Public property ValueNeg: Double index 1 read GetValue write SetValue;

This item has no description.

Public property ValuePos: Double index 0 read GetValue write SetValue;

This item has no description.


fpsChart: Class TsChartSeries

Class TsChartSeries

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartSeries = class(TsChartElement)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartElement
  • TsChartSeries

Overview

Fields

Protected | FLine: TsChartLine;
Protected | FFill: TsChartFill;

Methods

Public | constructor Create(AChart: TsChart); virtual;
Public | destructor Destroy; override;
Public | function GetCount: Integer;
Public | function GetXAxis: TsChartAxis;
Public | function GetXCount: Integer;
Public | function GetYAxis: TsChartAxis;
Public | function GetYCount: Integer;
Public | function HasLabels: Boolean;
Public | function HasXValues: Boolean;
Public | function HasYValues: Boolean;
Public | function LabelsInCol: Boolean;
Public | function XValuesInCol: Boolean;
Public | function YValuesInCol: Boolean;
Protected | function GetChartType: TsChartType; virtual;
Public | procedure SetFillColorRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);
Public | procedure SetFillColorRange(ARow1, ACol1, ARow2, ACol2: Cardinal);
Public | procedure SetLabelRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);
Public | procedure SetLabelRange(ARow1, ACol1, ARow2, ACol2: Cardinal);
Public | procedure SetLineColorRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);
Public | procedure SetLineColorRange(ARow1, ACol1, ARow2, ACol2: Cardinal);
Public | procedure SetTitleAddr(ASheet: String; ARow, ACol: Cardinal);
Public | procedure SetTitleAddr(ARow, ACol: Cardinal);
Public | procedure SetXRange(ARow1, ACol1, ARow2, ACol2: Cardinal);
Public | procedure SetXRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);
Public | procedure SetYRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);
Public | procedure SetYRange(ARow1, ACol1, ARow2, ACol2: Cardinal);

Properties

Public | property ChartType: TsChartType read GetChartType;
Public | property Count: Integer read GetCount;
Public | property DataLabelCalloutShape: TsChartLabelCalloutShape read FDataLabelCalloutShape write FDataLabelCalloutShape;
Public | property DataLabels: TsChartDataLabels read FDataLabels write FDataLabels;
Public | property DataPointStyles: TsChartDatapointStyleList read FDataPointStyles;
Public | property Fill: TsChartFill read FFill write FFill;
Public | property FillColorRange: TsChartRange read FFillColorRange write FFillColorRange;
Public | property GroupIndex: Integer read FGroupIndex write FGroupIndex;
Public | property LabelBackground: TsChartFill read FLabelBackground write FLabelBackground;
Public | property LabelBorder: TsChartLine read FLabelBorder write FLabelBorder;
Public | property LabelFont: TsFont read FLabelFont write FLabelFont;
Public | property LabelFormat: String read FLabelFormat write FLabelFormat;
Public | property LabelFormatPercent: String read FLabelFormatPercent write FLabelFormatPercent;
Public | property LabelPosition: TsChartLabelPosition read FLabelPosition write FLabelPosition;
Public | property LabelRange: TsChartRange read FLabelRange write FLabelRange;
Public | property LabelSeparator: string read FLabelSeparator write FLabelSeparator;
Public | property Line: TsChartLine read FLine write FLine;
Public | property LineColorRange: TsChartRange read FLineColorRange write FLineColorRange;
Public | property Order: Integer read FOrder write FOrder;
Public | property SupportsTrendline: Boolean read FSupportsTrendline;
Public | property TitleAddr: TsChartCellAddr read FTitleAddr write FTitleAddr;
Protected | property Trendline: TsChartTrendline read FTrendline write FTrendline;
Public | property XAxis: TsChartAxisLink read FXAxis write FXAxis;
Public | property XErrorBars: TsChartErrorBars read FXErrorBars write SetXErrorBars;
Public | property XRange: TsChartRange read FXRange write FXRange;
Public | property YAxis: TsChartAxisLink read FYAxis write FYAxis;
Public | property YErrorBars: TsChartErrorBars read FYErrorBars write SetYErrorBars;
Public | property YRange: TsChartRange read FYRange write FYRange;

Description

Fields

Protected FLine: TsChartLine;

This item has no description.

Protected FFill: TsChartFill;

This item has no description.

Methods

Public constructor Create(AChart: TsChart); virtual;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public function GetCount: Integer;

This item has no description.

Public function GetXAxis: TsChartAxis;

This item has no description.

Public function GetXCount: Integer;

This item has no description.

Public function GetYAxis: TsChartAxis;

This item has no description.

Public function GetYCount: Integer;

This item has no description.

Public function HasLabels: Boolean;

This item has no description.

Public function HasXValues: Boolean;

This item has no description.

Public function HasYValues: Boolean;

This item has no description.

Public function LabelsInCol: Boolean;

This item has no description.

Public function XValuesInCol: Boolean;

This item has no description.

Public function YValuesInCol: Boolean;

This item has no description.

Protected function GetChartType: TsChartType; virtual;

This item has no description.

Public procedure SetFillColorRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);

This item has no description.

Public procedure SetFillColorRange(ARow1, ACol1, ARow2, ACol2: Cardinal);

This item has no description.

Public procedure SetLabelRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);

This item has no description.

Public procedure SetLabelRange(ARow1, ACol1, ARow2, ACol2: Cardinal);

This item has no description.

Public procedure SetLineColorRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);

This item has no description.

Public procedure SetLineColorRange(ARow1, ACol1, ARow2, ACol2: Cardinal);

This item has no description.

Public procedure SetTitleAddr(ASheet: String; ARow, ACol: Cardinal);

This item has no description.

Public procedure SetTitleAddr(ARow, ACol: Cardinal);

This item has no description.

Public procedure SetXRange(ARow1, ACol1, ARow2, ACol2: Cardinal);

This item has no description.

Public procedure SetXRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);

This item has no description.

Public procedure SetYRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);

This item has no description.

Public procedure SetYRange(ARow1, ACol1, ARow2, ACol2: Cardinal);

This item has no description.

Properties

Public property ChartType: TsChartType read GetChartType;

This item has no description.

Public property Count: Integer read GetCount;

This item has no description.

Public property DataLabelCalloutShape: TsChartLabelCalloutShape read FDataLabelCalloutShape write FDataLabelCalloutShape;

This item has no description.

Public property DataLabels: TsChartDataLabels read FDataLabels write FDataLabels;

This item has no description.

Public property DataPointStyles: TsChartDatapointStyleList read FDataPointStyles;

This item has no description.

Public property Fill: TsChartFill read FFill write FFill;

This item has no description.

Public property FillColorRange: TsChartRange read FFillColorRange write FFillColorRange;

This item has no description.

Public property GroupIndex: Integer read FGroupIndex write FGroupIndex;

This item has no description.

Public property LabelBackground: TsChartFill read FLabelBackground write FLabelBackground;

This item has no description.

Public property LabelBorder: TsChartLine read FLabelBorder write FLabelBorder;

This item has no description.

Public property LabelFont: TsFont read FLabelFont write FLabelFont;

This item has no description.

Public property LabelFormat: String read FLabelFormat write FLabelFormat;

This item has no description.

Public property LabelFormatPercent: String read FLabelFormatPercent write FLabelFormatPercent;

This item has no description.

Public property LabelPosition: TsChartLabelPosition read FLabelPosition write FLabelPosition;

This item has no description.

Public property LabelRange: TsChartRange read FLabelRange write FLabelRange;

This item has no description.

Public property LabelSeparator: string read FLabelSeparator write FLabelSeparator;

This item has no description.

Public property Line: TsChartLine read FLine write FLine;

This item has no description.

Public property LineColorRange: TsChartRange read FLineColorRange write FLineColorRange;

This item has no description.

Public property Order: Integer read FOrder write FOrder;

This item has no description.

Public property SupportsTrendline: Boolean read FSupportsTrendline;

This item has no description.

Public property TitleAddr: TsChartCellAddr read FTitleAddr write FTitleAddr;

This item has no description.

Protected property Trendline: TsChartTrendline read FTrendline write FTrendline;

This item has no description.

Public property XAxis: TsChartAxisLink read FXAxis write FXAxis;

This item has no description.

Public property XErrorBars: TsChartErrorBars read FXErrorBars write SetXErrorBars;

This item has no description.

Public property XRange: TsChartRange read FXRange write FXRange;

This item has no description.

Public property YAxis: TsChartAxisLink read FYAxis write FYAxis;

This item has no description.

Public property YErrorBars: TsChartErrorBars read FYErrorBars write SetYErrorBars;

This item has no description.

Public property YRange: TsChartRange read FYRange write FYRange;

This item has no description.


fpsChart: Class TsAreaSeries

Class TsAreaSeries

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsAreaSeries = class(TsChartSeries)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartElement
  • TsChartSeries
  • TsAreaSeries

Overview

Methods

Public constructor Create(AChart: TsChart); override;

Properties

Public property Trendline;

Description

Methods

Public constructor Create(AChart: TsChart); override;

This item has no description.

Properties

Public property Trendline;

This item has no description.


fpsChart: Class TsBarSeries

Class TsBarSeries

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsBarSeries = class(TsChartSeries)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartElement
  • TsChartSeries
  • TsBarSeries

Overview

Methods

Public constructor Create(AChart: TsChart); override;

Properties

Public property Trendline;

Description

Methods

Public constructor Create(AChart: TsChart); override;

This item has no description.

Properties

Public property Trendline;

This item has no description.


fpsChart: Class TsCustomLineSeries

Class TsCustomLineSeries

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsCustomLineSeries = class(TsChartSeries)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartElement
  • TsChartSeries
  • TsCustomLineSeries

Overview

Methods

Public | constructor Create(AChart: TsChart); override;
Public | destructor Destroy; override;

Properties

Protected | property Interpolation: TsChartInterpolation read FInterpolation write FInterpolation;
Protected | property ShowLines: Boolean read FShowLines write FShowLines;
Protected | property ShowSymbols: Boolean read FShowSymbols write FShowSymbols;
Protected | property Symbol: TsChartSeriesSymbol read FSymbol write FSymbol;
Protected | property SymbolBorder: TsChartLine read FSymbolBorder write FSymbolBorder;
Protected | property SymbolFill: TsChartFill read FSymbolFill write FSymbolFill;
Protected | property SymbolHeight: double read FSymbolHeight write FSymbolHeight;
Protected | property SymbolWidth: double read FSymbolWidth write FSymbolWidth;

Description

Methods

Public constructor Create(AChart: TsChart); override;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Properties

Protected property Interpolation: TsChartInterpolation read FInterpolation write FInterpolation;

This item has no description.

Protected property ShowLines: Boolean read FShowLines write FShowLines;

This item has no description.

Protected property ShowSymbols: Boolean read FShowSymbols write FShowSymbols;

This item has no description.

Protected property Symbol: TsChartSeriesSymbol read FSymbol write FSymbol;

This item has no description.

Protected property SymbolBorder: TsChartLine read FSymbolBorder write FSymbolBorder;

This item has no description.

Protected property SymbolFill: TsChartFill read FSymbolFill write FSymbolFill;

This item has no description.

Protected property SymbolHeight: double read FSymbolHeight write FSymbolHeight;

This item has no description.

Protected property SymbolWidth: double read FSymbolWidth write FSymbolWidth;

This item has no description.


fpsChart: Class TsLineSeries

Class TsLineSeries

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsLineSeries = class(TsCustomLineSeries)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartElement
  • TsChartSeries
  • TsCustomLineSeries
  • TsLineSeries

Overview

Methods

Public constructor Create(AChart: TsChart); override;

Properties

Public | property Interpolation;
Public | property ShowLines;
Public | property ShowSymbols;
Public | property Symbol;
Public | property SymbolBorder;
Public | property SymbolFill;
Public | property SymbolHeight;
Public | property SymbolWidth;
Public | property Trendline;

Description

Methods

Public constructor Create(AChart: TsChart); override;

This item has no description.

Properties

Public property Interpolation;

This item has no description.

Public property ShowLines;

This item has no description.

Public property ShowSymbols;

This item has no description.

Public property Symbol;

This item has no description.

Public property SymbolBorder;

This item has no description.

Public property SymbolFill;

This item has no description.

Public property SymbolHeight;

This item has no description.

Public property SymbolWidth;

This item has no description.

Public property Trendline;

This item has no description.


fpsChart: Class TsPieSeries

Class TsPieSeries

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsPieSeries = class(TsChartSeries)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartElement
  • TsChartSeries
  • TsPieSeries

Overview

Methods

Public | constructor Create(AChart: TsChart); override;
Protected | function GetChartType: TsChartType; override;

Properties

Public | property InnerRadiusPercent: Integer read FInnerRadiusPercent write FInnerRadiusPercent;
Public | property SliceOffset[ASliceIndex: Integer]: Integer read GetSliceOffset;
Public | property SliceOrder: TsSliceOrder read FSliceOrder write FSliceOrder;
Public | property StartAngle: Integer read FStartAngle write FStartAngle;

Description

Methods

Public constructor Create(AChart: TsChart); override;

This item has no description.

Protected function GetChartType: TsChartType; override;

This item has no description.

Properties

Public property InnerRadiusPercent: Integer read FInnerRadiusPercent write FInnerRadiusPercent;

This item has no description.

Public property SliceOffset[ASliceIndex: Integer]: Integer read GetSliceOffset;

This item has no description.

Public property SliceOrder: TsSliceOrder read FSliceOrder write FSliceOrder;

This item has no description.

Public property StartAngle: Integer read FStartAngle write FStartAngle;

This item has no description.


fpsChart: Class TsRadarSeries

Class TsRadarSeries

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsRadarSeries = class(TsLineSeries)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartElement
  • TsChartSeries
  • TsCustomLineSeries
  • TsLineSeries
  • TsRadarSeries

Overview

Methods

Public constructor Create(AChart: TsChart); override;

Description

Methods

Public constructor Create(AChart: TsChart); override;

This item has no description.


fpsChart: Class TsFilledRadarSeries

Class TsFilledRadarSeries

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsFilledRadarSeries = class(TsRadarSeries)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartElement
  • TsChartSeries
  • TsCustomLineSeries
  • TsLineSeries
  • TsRadarSeries
  • TsFilledRadarSeries

Overview

Methods

Public constructor Create(AChart: TsChart); override;

Description

Methods

Public constructor Create(AChart: TsChart); override;

This item has no description.


fpsChart: Class TsCustomScatterSeries

Class TsCustomScatterSeries

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsCustomScatterSeries = class(TsCustomLineSeries)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartElement
  • TsChartSeries
  • TsCustomLineSeries
  • TsCustomScatterSeries

Overview

Methods

Public constructor Create(AChart: TsChart); override;

Properties

Public property Trendline;

Description

Methods

Public constructor Create(AChart: TsChart); override;

This item has no description.

Properties

Public property Trendline;

This item has no description.


fpsChart: Class TsScatterSeries

Class TsScatterSeries

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsScatterSeries = class(TsCustomScatterSeries)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartElement
  • TsChartSeries
  • TsCustomLineSeries
  • TsCustomScatterSeries
  • TsScatterSeries

Overview

Properties

Public | property Interpolation;
Public | property ShowLines;
Public | property ShowSymbols;
Public | property Symbol;
Public | property SymbolBorder;
Public | property SymbolFill;
Public | property SymbolHeight;
Public | property SymbolWidth;

Description

Properties

Public property Interpolation;

This item has no description.

Public property ShowLines;

This item has no description.

Public property ShowSymbols;

This item has no description.

Public property Symbol;

This item has no description.

Public property SymbolBorder;

This item has no description.

Public property SymbolFill;

This item has no description.

Public property SymbolHeight;

This item has no description.

Public property SymbolWidth;

This item has no description.


fpsChart: Class TsBubbleSeries

Class TsBubbleSeries

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsBubbleSeries = class(TsCustomScatterSeries)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartElement
  • TsChartSeries
  • TsCustomLineSeries
  • TsCustomScatterSeries
  • TsBubbleSeries

Overview

Methods

Public | constructor Create(AChart: TsChart); override;
Public | destructor Destroy; override;
Public | procedure SetBubbleRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);
Public | procedure SetBubbleRange(ARow1, ACol1, ARow2, ACol2: Cardinal);

Properties

Public | property BubbleRange: TsChartRange read FBubbleRange;
Public | property BubbleScale: Double read FBubbleScale write FBubbleScale;
Public | property BubbleSizeMode: TsBubbleSizeMode read FBubbleSizeMode write FBubbleSizeMode;

Description

Methods

Public constructor Create(AChart: TsChart); override;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public procedure SetBubbleRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);

This item has no description.

Public procedure SetBubbleRange(ARow1, ACol1, ARow2, ACol2: Cardinal);

This item has no description.

Properties

Public property BubbleRange: TsChartRange read FBubbleRange;

This item has no description.

Public property BubbleScale: Double read FBubbleScale write FBubbleScale;

This item has no description.

Public property BubbleSizeMode: TsBubbleSizeMode read FBubbleSizeMode write FBubbleSizeMode;

This item has no description.


fpsChart: Class TsStockSeries

Class TsStockSeries

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsStockSeries = class(TsChartSeries)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartElement
  • TsChartSeries
  • TsStockSeries

Overview

Methods

Public | constructor Create(AChart: TsChart); override;
Public | destructor Destroy; override;
Public | procedure SetCloseRange(ARow1, ACol1, ARow2, ACol2: Cardinal);
Public | procedure SetCloseRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);
Public | procedure SetHighRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);
Public | procedure SetHighRange(ARow1, ACol1, ARow2, ACol2: Cardinal);
Public | procedure SetLowRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);
Public | procedure SetLowRange(ARow1, ACol1, ARow2, ACol2: Cardinal);
Public | procedure SetOpenRange(ARow1, ACol1, ARow2, ACol2: Cardinal);
Public | procedure SetOpenRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);

Properties

Public | property CandleStick: Boolean read FCandleStick write FCandleStick;
Public | property CandleStickDownBorder: TsChartLine read FCandleStickDownBorder write FCandleStickDownBorder;
Public | property CandleStickDownFill: TsChartFill read FCandleStickDownFill write FCandleStickDownFill;
Public | property CandleStickUpBorder: TsChartLine read FCandleStickUpBorder write FCandleStickUpBorder;
Public | property CandleStickUpFill: TsChartFill read FCandleStickUpFill write FCandleStickUpFill;
Public | property CloseRange: TsChartRange read FYRange;
Public | property HighRange: TsChartRange read FHighRange;
Public | property LowRange: TsChartRange read FLowRange;
Public | property OpenRange: TsChartRange read FOpenRange;
Public | property RangeLine: TsChartLine read FRangeLine write FRangeLine;
Public | property TickWidthPercent: Integer read FTickWidthPercent write FTickWidthPercent;

Description

Methods

Public constructor Create(AChart: TsChart); override;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public procedure SetCloseRange(ARow1, ACol1, ARow2, ACol2: Cardinal);

This item has no description.

Public procedure SetCloseRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);

This item has no description.

Public procedure SetHighRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);

This item has no description.

Public procedure SetHighRange(ARow1, ACol1, ARow2, ACol2: Cardinal);

This item has no description.

Public procedure SetLowRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);

This item has no description.

Public procedure SetLowRange(ARow1, ACol1, ARow2, ACol2: Cardinal);

This item has no description.

Public procedure SetOpenRange(ARow1, ACol1, ARow2, ACol2: Cardinal);

This item has no description.

Public procedure SetOpenRange(ASheet1: String; ARow1, ACol1: Cardinal; ASheet2: String; ARow2, ACol2: Cardinal);

This item has no description.

Properties

Public property CandleStick: Boolean read FCandleStick write FCandleStick;

This item has no description.

Public property CandleStickDownBorder: TsChartLine read FCandleStickDownBorder write FCandleStickDownBorder;

This item has no description.

Public property CandleStickDownFill: TsChartFill read FCandleStickDownFill write FCandleStickDownFill;

This item has no description.

Public property CandleStickUpBorder: TsChartLine read FCandleStickUpBorder write FCandleStickUpBorder;

This item has no description.

Public property CandleStickUpFill: TsChartFill read FCandleStickUpFill write FCandleStickUpFill;

This item has no description.

Public property CloseRange: TsChartRange read FYRange;

This item has no description.

Public property HighRange: TsChartRange read FHighRange;

This item has no description.

Public property LowRange: TsChartRange read FLowRange;

This item has no description.

Public property OpenRange: TsChartRange read FOpenRange;

This item has no description.

Public property RangeLine: TsChartLine read FRangeLine write FRangeLine;

This item has no description.

Public property TickWidthPercent: Integer read FTickWidthPercent write FTickWidthPercent;

This item has no description.


fpsChart: Class TsChartSeriesList

Class TsChartSeriesList

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartSeriesList = class(TFPObjectList)

Description

This item has no description.

Hierarchy

  • TObject
  • TFPObjectList
  • TsChartSeriesList

Overview

Properties

Public property Items[AIndex: Integer]: TsChartSeries read GetItem write SetItem;

Description

Properties

Public property Items[AIndex: Integer]: TsChartSeries read GetItem write SetItem;

This item has no description.


fpsChart: Class TsChart

Class TsChart

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChart = class(TsChartFillElement)

Description

This item has no description.

Hierarchy

  • TObject
  • TsChartElement
  • TsChartFillElement
  • TsChart

Overview

Methods

Public | constructor Create;
Public | destructor Destroy; override;
Public | function GetChartType: TsChartType;
Public | function GetLineStyle(AIndex: Integer): TsChartLineStyle;
Public | function IsScatterChart: Boolean;
Public | function NumLineStyles: Integer;
Protected | function AddSeries(ASeries: TsChartSeries): Integer; virtual;
Public | procedure DeleteSeries(AIndex: Integer);

Properties

Public | property Background: TsChartFill read FBackground write FBackground;
Public | property BarGapWidthPercent: Integer read FBarGapWidthPercent write FBarGapWidthPercent;
Public | property BarOverlapPercent: Integer read FBarOverlapPercent write FBarOverlapPercent;
Public | property Border: TsChartLine read FBorder write FBorder;
Public | property CategoryLabelRange: TsChartRange read GetCategoryLabelRange;
Public | property Col: Cardinal read FCol write FCol;
Public | property Floor: TsChartFillElement read FFloor write FFloor;
Public | property Gradients: TsChartGradientList read FGradients;
Public | property Hatches: TsChartHatchList read FHatches;
Public | property Height: double read FHeight write FHeight;
Public | property Images: TsChartImageList read FImages;
Public | property Index: Integer read FIndex write FIndex;
Public | property Interpolation: TsChartInterpolation read FInterpolation write FInterpolation;
Public | property Legend: TsChartLegend read FLegend write FLegend;
Public | property LineStyles: TsChartLineStyleList read FLineStyles;
Public | property Name: String read FName write FName;
Public | property OffsetX: double read FOffsetX write FOffsetX;
Public | property OffsetY: double read FOffsetY write FOffsetY;
Public | property PlotArea: TsChartFillElement read FPlotArea write FPlotArea;
Public | property RotatedAxes: Boolean read FRotatedAxes write FRotatedAxes;
Public | property Row: Cardinal read FRow write FRow;
Public | property Series: TsChartSeriesList read FSeriesList write FSeriesList;
Public | property StackMode: TsChartStackMode read FStackMode write FStackMode;
Public | property Subtitle: TsChartText read FSubtitle write FSubTitle;
Public | property Title: TsChartText read FTitle write FTitle;
Public | property Width: double read FWidth write FWidth;
Public | property Workbook: TsBasicWorkbook read FWorkbook write FWorkbook;
Public | property Worksheet: TsBasicWorksheet read FWorksheet write FWorksheet;
Public | property X2Axis: TsChartAxis read FX2Axis write FX2Axis;
Public | property XAxis: TsChartAxis read FXAxis write FXAxis;
Public | property Y2Axis: TsChartAxis read FY2Axis write FY2Axis;
Public | property YAxis: TsChartAxis read FYAxis write FYAxis;

Description

Methods

Public constructor Create;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public function GetChartType: TsChartType;

This item has no description.

Public function GetLineStyle(AIndex: Integer): TsChartLineStyle;

This item has no description.

Public function IsScatterChart: Boolean;

This item has no description.

Public function NumLineStyles: Integer;

This item has no description.

Protected function AddSeries(ASeries: TsChartSeries): Integer; virtual;

This item has no description.

Public procedure DeleteSeries(AIndex: Integer);

This item has no description.

Properties

Public property Background: TsChartFill read FBackground write FBackground;

This item has no description.

Public property BarGapWidthPercent: Integer read FBarGapWidthPercent write FBarGapWidthPercent;

This item has no description.

Public property BarOverlapPercent: Integer read FBarOverlapPercent write FBarOverlapPercent;

This item has no description.

Public property Border: TsChartLine read FBorder write FBorder;

This item has no description.

Public property CategoryLabelRange: TsChartRange read GetCategoryLabelRange;

This item has no description.

Public property Col: Cardinal read FCol write FCol;

This item has no description.

Public property Floor: TsChartFillElement read FFloor write FFloor;

This item has no description.

Public property Gradients: TsChartGradientList read FGradients;

This item has no description.

Public property Hatches: TsChartHatchList read FHatches;

This item has no description.

Public property Height: double read FHeight write FHeight;

This item has no description.

Public property Images: TsChartImageList read FImages;

This item has no description.

Public property Index: Integer read FIndex write FIndex;

This item has no description.

Public property Interpolation: TsChartInterpolation read FInterpolation write FInterpolation;

This item has no description.

Public property Legend: TsChartLegend read FLegend write FLegend;

This item has no description.

Public property LineStyles: TsChartLineStyleList read FLineStyles;

This item has no description.

Public property Name: String read FName write FName;

This item has no description.

Public property OffsetX: double read FOffsetX write FOffsetX;

This item has no description.

Public property OffsetY: double read FOffsetY write FOffsetY;

This item has no description.

Public property PlotArea: TsChartFillElement read FPlotArea write FPlotArea;

This item has no description.

Public property RotatedAxes: Boolean read FRotatedAxes write FRotatedAxes;

This item has no description.

Public property Row: Cardinal read FRow write FRow;

This item has no description.

Public property Series: TsChartSeriesList read FSeriesList write FSeriesList;

This item has no description.

Public property StackMode: TsChartStackMode read FStackMode write FStackMode;

This item has no description.

Public property Subtitle: TsChartText read FSubtitle write FSubTitle;

This item has no description.

Public property Title: TsChartText read FTitle write FTitle;

This item has no description.

Public property Width: double read FWidth write FWidth;

This item has no description.

Public property Workbook: TsBasicWorkbook read FWorkbook write FWorkbook;

This item has no description.

Public property Worksheet: TsBasicWorksheet read FWorksheet write FWorksheet;

This item has no description.

Public property X2Axis: TsChartAxis read FX2Axis write FX2Axis;

This item has no description.

Public property XAxis: TsChartAxis read FXAxis write FXAxis;

This item has no description.

Public property Y2Axis: TsChartAxis read FY2Axis write FY2Axis;

This item has no description.

Public property YAxis: TsChartAxis read FYAxis write FYAxis;

This item has no description.


fpsChart: Class TsChartList

Class TsChartList

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsChart

Declaration

type TsChartList = class(TObjectList)

Description

This item has no description.

Hierarchy

  • TObject
  • TList
  • TObjectList
  • TsChartList

Overview

Properties

Public property Items[AIndex: Integer]: TsChart read GetItem write SetItem;

Description

Properties

Public property Items[AIndex: Integer]: TsChart read GetItem write SetItem;

This item has no description.


fpsConditionalFormat

Unit fpsConditionalFormat

Description
Uses
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Constants
Variables

Description

Unit fpsConditionalFormat implements conditional formatting for Excel and OpenDocument spreadsheet documents.

AUTHORS: Werner Pamler

LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus distribution, for details about the license.

Overview

Classes, Interfaces, Objects and Records

Name | Description
Class TsCFRule |
Class TsCFCellRule |
Class TsCFColorRangeRule |
Class TsCFDatabarRule |
Class TsCFIconSetRule |
Class TsCFRules |
Class TsConditionalFormat |
Class TsConditionalFormatList |

Functions and Procedures

function GetCFIconCount(AIconSet: TsCFIconSet): Integer;

Types

TsCFCondition = (...);
TsCFIconSet = (...);
TsCFValueKind = (...);

Description

Functions and Procedures

function GetCFIconCount(AIconSet: TsCFIconSet): Integer;

Determines the count of icons available in the specified icon set for conditional formatting.

Parameters
AIconSet
Icon set to be checked
Returns

Number of icons in the icon set.

Types

TsCFCondition = (...);

Enumeration of the available conditions to be fulfilled by a cell value in conditional formatting

Values
  • cfcEqual
  • cfcNotEqual
  • cfcGreaterThan
  • cfcLessThan
  • cfcGreaterEqual
  • cfcLessEqual
  • cfcBetween
  • cfcNotBetween
  • cfcAboveAverage
  • cfcBelowAverage
  • cfcAboveEqualAverage
  • cfcBelowEqualAverage
  • cfcTop
  • cfcBottom
  • cfcTopPercent
  • cfcBottomPercent
  • cfcDuplicate
  • cfcUnique
  • cfcBeginsWith
  • cfcEndsWith
  • cfcContainsText
  • cfcNotContainsText
  • cfcContainsErrors
  • cfcNotContainsErrors
  • cfcYesterday
  • cfcToday
  • cfcTomorrow
  • cfcLast7Days
  • cfcLastWeek
  • cfcThisWeek
  • cfcNextWeek
  • cfcLastMonth
  • cfcThisMonth
  • cfcNextMonth
  • cfcLastYear
  • cfcThisYear
  • cfcNextYear
  • cfcExpression
TsCFIconSet = (...);

Enumeration of the icon sets available for conditional formatting

Values
  • is3Arrows
  • is3ArrowsGray
  • is3Flags
  • is3TrafficLights1
  • is3TrafficLights2
  • is3Signs
  • is3Symbols
  • is3Symbols2
  • is3Smilies
  • is3Stars
  • is3Triangles
  • is3ColorSmilies
  • is4Arrows
  • is4ArrowsGray
  • is4RedToBlack
  • is4Rating
  • is4TrafficLights
  • is5Arrows
  • is5ArrowsGray
  • is5Rating
  • is5Quarters
  • is5Boxes
TsCFValueKind = (...);

Enumeration of the criteria to be fulfilled by the values used in "color range" and "data bar" conditional formatting.

Values
  • vkNone
  • vkMin
  • vkMax
  • vkPercent
  • vkPercentile
  • vkValue


fpsConditionalFormat: Class TsCFRule

Class TsCFRule

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsConditionalFormat

Declaration

type TsCFRule = class(TObject)

Description

This item has no description.

Hierarchy

  • TObject
  • TsCFRule

Overview

Methods

Public procedure Assign(ASource: TsCFRule); virtual; abstract;

Description

Methods

Public procedure Assign(ASource: TsCFRule); virtual; abstract;

This item has no description.


fpsConditionalFormat: Class TsCFCellRule

Class TsCFCellRule

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsConditionalFormat

Declaration

type TsCFCellRule = class(TsCFRule)

Description

This item has no description.

Hierarchy

  • TObject
  • TsCFRule
  • TsCFCellRule

Overview

Fields

Public | Condition: TsCFCondition;
Public | Operand1: Variant;
Public | Operand2: Variant;
Public | FormatIndex: Integer;

Methods

Public procedure Assign(ASource: TsCFRule); override;

Description

Fields

Public Condition: TsCFCondition;

This item has no description.

Public Operand1: Variant;

This item has no description.

Public Operand2: Variant;

This item has no description.

Public FormatIndex: Integer;

This item has no description.

Methods

Public procedure Assign(ASource: TsCFRule); override;

This item has no description.


fpsConditionalFormat: Class TsCFColorRangeRule

Class TsCFColorRangeRule

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsConditionalFormat

Declaration

type TsCFColorRangeRule = class(TsCFRule)

Description

This item has no description.

Hierarchy

  • TObject
  • TsCFRule
  • TsCFColorRangeRule

Overview

Fields

Public | StartValueKind: TsCFValueKind;
Public | CenterValueKind: TsCFValueKind;
Public | EndValueKind: TsCFValueKind;
Public | StartValue: Double;
Public | CenterValue: Double;
Public | EndValue: Double;
Public | StartColor: TsColor;
Public | CenterColor: TsColor;
Public | EndColor: TsColor;
Public | ThreeColors: Boolean;

Methods

Public | constructor Create;
Public | procedure Assign(ASource: TsCFRule); override;
Public | procedure SetupCenter(AColor: TsColor; AKind: TsCFValueKind; AValue: Double);
Public | procedure SetupEnd(AColor: TsColor; AKind: TsCFValueKind; AValue: Double);
Public | procedure SetupStart(AColor: TsColor; AKind: TsCFValueKind; AValue: Double);

Description

Fields

Public StartValueKind: TsCFValueKind;

This item has no description.

Public CenterValueKind: TsCFValueKind;

This item has no description.

Public EndValueKind: TsCFValueKind;

This item has no description.

Public StartValue: Double;

This item has no description.

Public CenterValue: Double;

This item has no description.

Public EndValue: Double;

This item has no description.

Public StartColor: TsColor;

This item has no description.

Public CenterColor: TsColor;

This item has no description.

Public EndColor: TsColor;

This item has no description.

Public ThreeColors: Boolean;

This item has no description.

Methods

Public constructor Create;

This item has no description.

Public procedure Assign(ASource: TsCFRule); override;

This item has no description.

Public procedure SetupCenter(AColor: TsColor; AKind: TsCFValueKind; AValue: Double);

This item has no description.

Public procedure SetupEnd(AColor: TsColor; AKind: TsCFValueKind; AValue: Double);

This item has no description.

Public procedure SetupStart(AColor: TsColor; AKind: TsCFValueKind; AValue: Double);

This item has no description.


fpsConditionalFormat: Class TsCFDatabarRule

Class TsCFDatabarRule

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsConditionalFormat

Declaration

type TsCFDatabarRule = class(TsCFRule)

Description

This item has no description.

Hierarchy

  • TObject
  • TsCFRule
  • TsCFDatabarRule

Overview

Fields

Public | StartValueKind: TsCFValueKind;
Public | EndValueKind: TsCFValueKind;
Public | StartValue: Double;
Public | EndValue: Double;
Public | Color: TsColor;

Methods

Public | constructor Create;
Public | procedure Assign(ASource: TsCFRule); override;

Description

Fields

Public StartValueKind: TsCFValueKind;

This item has no description.

Public EndValueKind: TsCFValueKind;

This item has no description.

Public StartValue: Double;

This item has no description.

Public EndValue: Double;

This item has no description.

Public Color: TsColor;

This item has no description.

Methods

Public constructor Create;

This item has no description.

Public procedure Assign(ASource: TsCFRule); override;

This item has no description.


fpsConditionalFormat: Class TsCFIconSetRule

Class TsCFIconSetRule

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsConditionalFormat

Declaration

type TsCFIconSetRule = class(TsCFRule)

Description

This item has no description.

Hierarchy

  • TObject
  • TsCFRule
  • TsCFIconSetRule

Overview

Methods

Public | constructor Create;
Public | procedure Assign(ASource: TsCFRule); override;

Properties

Public | property IconCount: Integer read GetIconCount;
Public | property IconSet: TsCFIconSet read FIconSet write SetIconSet;
Public | property Reverse: Boolean read FReverse write FReverse;
Public | property ShowValue: Boolean read FShowValue write FShowValue;
Public | property ValueKinds[AIndex: Integer]: TsCFValueKind read GetValueKinds write SetValueKinds;
Public | property Values[AIndex: Integer]: Double read GetValues write SetValues;

Description

Methods

Public constructor Create;

This item has no description.

Public procedure Assign(ASource: TsCFRule); override;

This item has no description.

Properties

Public property IconCount: Integer read GetIconCount;

This item has no description.

Public property IconSet: TsCFIconSet read FIconSet write SetIconSet;

This item has no description.

Public property Reverse: Boolean read FReverse write FReverse;

This item has no description.

Public property ShowValue: Boolean read FShowValue write FShowValue;

This item has no description.

Public property ValueKinds[AIndex: Integer]: TsCFValueKind read GetValueKinds write SetValueKinds;

This item has no description.

Public property Values[AIndex: Integer]: Double read GetValues write SetValues;

This item has no description.


fpsConditionalFormat: Class TsCFRules

Class TsCFRules

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsConditionalFormat

Declaration

type TsCFRules = class(TFPObjectList)

Description

Rule for a conditional format

Hierarchy

  • TObject
  • TFPObjectList
  • TsCFRules

Overview

Properties

Public | property Items[AIndex: Integer]: TsCFRule read GetItem write SetItem;
Public | property Priority[AIndex: Integer]: Integer read GetPriority;

Description

Properties

Public property Items[AIndex: Integer]: TsCFRule read GetItem write SetItem;

This item has no description.

Public property Priority[AIndex: Integer]: Integer read GetPriority;

This item has no description.


fpsConditionalFormat: Class TsConditionalFormat

Class TsConditionalFormat

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsConditionalFormat

Declaration

type TsConditionalFormat = class(TObject)

Description

Conditional format item. These items are stored in an instance of TsConditionalFormatList.

Hierarchy

  • TObject
  • TsConditionalFormat

Overview

Methods

Public | constructor Create(AWorksheet: TsBasicWorksheet; ACellRange: TsCellRange);
Public | destructor Destroy; override;
Public | procedure DeleteCol(ACol: Cardinal);
Public | procedure DeleteRow(ARow: Cardinal);
Public | procedure InsertCol(ACol: Cardinal);
Public | procedure InsertRow(ARow: Cardinal);

Properties

Public | property CellRange: TsCellRange read FCellRange;
Public | property Rules[AIndex: Integer]: TsCFRule read GetRules;
Public | property RulesCount: Integer read GetRulesCount;
Public | property Worksheet: TsBasicWorksheet read FWorksheet;

Description

Methods

Public constructor Create(AWorksheet: TsBasicWorksheet; ACellRange: TsCellRange);

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public procedure DeleteCol(ACol: Cardinal);

This item has no description.

Public procedure DeleteRow(ARow: Cardinal);

This item has no description.

Public procedure InsertCol(ACol: Cardinal);

This item has no description.

Public procedure InsertRow(ARow: Cardinal);

This item has no description.

Properties

Public property CellRange: TsCellRange read FCellRange;

This item has no description.

Public property Rules[AIndex: Integer]: TsCFRule read GetRules;

This item has no description.

Public property RulesCount: Integer read GetRulesCount;

This item has no description.

Public property Worksheet: TsBasicWorksheet read FWorksheet;

This item has no description.


fpsConditionalFormat: Class TsConditionalFormatList

Class TsConditionalFormatList

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsConditionalFormat

Declaration

type TsConditionalFormatList = class(TFPObjectList)

Description

List of conditional formats. Maintained by the workbook.

Hierarchy

  • TObject
  • TFPObjectList
  • TsConditionalFormatList

Overview

Methods

Public | function AddCellRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; ACondition: TsCFCondition; AParam: Variant; ACellFormatIndex: Integer): Integer; overload;
Public | function AddCellRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; ACondition: TsCFCondition; AParam1, AParam2: Variant; ACellFormatIndex: Integer): Integer; overload;
Public | function AddCellRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; ACondition: TsCFCondition; ACellFormatIndex: Integer): Integer; overload;
Public | function AddColorRangeRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; AStartColor: TsColor; AStartKind: TsCFValueKind; AStartValue: Double; AEndColor: TsColor; AEndKind: TsCFValueKind; AEndValue: Double): Integer; overload;
Public | function AddColorRangeRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; AStartColor: TsColor; AStartKind: TsCFValueKind; AStartValue: Double; ACenterColor: TsColor; ACenterKind: TsCFValueKind; ACenterValue: Double; AEndColor: TsColor; AEndKind: TsCFValueKind; AEndValue: Double): Integer; overload;
Public | function AddColorRangeRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; AStartColor, ACenterColor, AEndColor: TsColor): Integer; overload;
Public | function AddColorRangeRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; AStartColor, AEndColor: TsColor): Integer; overload;
Public | function AddDataBarRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; ABarColor: TsColor; AStartKind: TsCFValueKind; AStartValue: Double; AEndKind: TsCFValueKind; AEndValue: Double): Integer; overload;
Public | function AddDataBarRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; ABarColor: TsColor): Integer; overload;
Public | function AddIconSetRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; AIconSet: TsCFIconSet; AValueKind1: TsCFValueKind; AValue1: Double; AValueKind2: TsCFValueKind; AValue2: Double; AValueKind3: TsCFValueKind; AValue3: Double; AHideValue: Boolean = false; AReverse: Boolean = false): Integer; overload;
Public | function AddIconSetRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; AIconSet: TsCFIconSet; AValueKind1: TsCFValueKind; AValue1: Double; AValueKind2: TsCFValueKind; AValue2: Double; AValueKind3: TsCFValueKind; AValue3: Double; AValueKind4: TsCFValueKind; AValue4: Double; AHideValue: Boolean = false; AReverse: Boolean = false): Integer; overload;
Public | function AddIconSetRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; AIconSet: TsCFIconSet; AValueKind1: TsCFValueKind; AValue1: Double; AValueKind2: TsCFValueKind; AValue2: Double; AHideValue: Boolean = false; AReverse: Boolean = false): Integer; overload;
Public | function AddIconSetRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; AIconSet: TsCFIconSet; AHideValue: Boolean = false; AReverse: Boolean = false): Integer; overload;
Public | function Find(ASheet: TsBasicWorksheet; ARange: TsCellRange): Integer;
Protected | function AddRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; ARule: TsCFRule): Integer;
Public | procedure Delete(AIndex: Integer);
Public | procedure DeleteRowOrCol(ASheet: TsBasicWorksheet; AIndex: Cardinal; IsRow: Boolean);
Public | procedure InsertRowOrCol(ASheet: TsBasicWorksheet; AIndex: Cardinal; IsRow: Boolean);

Description

Methods

Public function AddCellRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; ACondition: TsCFCondition; AParam: Variant; ACellFormatIndex: Integer): Integer; overload;

This item has no description.

Public function AddCellRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; ACondition: TsCFCondition; AParam1, AParam2: Variant; ACellFormatIndex: Integer): Integer; overload;

This item has no description.

Public function AddCellRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; ACondition: TsCFCondition; ACellFormatIndex: Integer): Integer; overload;

This item has no description.

Public function AddColorRangeRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; AStartColor: TsColor; AStartKind: TsCFValueKind; AStartValue: Double; AEndColor: TsColor; AEndKind: TsCFValueKind; AEndValue: Double): Integer; overload;

This item has no description.

Public function AddColorRangeRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; AStartColor: TsColor; AStartKind: TsCFValueKind; AStartValue: Double; ACenterColor: TsColor; ACenterKind: TsCFValueKind; ACenterValue: Double; AEndColor: TsColor; AEndKind: TsCFValueKind; AEndValue: Double): Integer; overload;

This item has no description.

Public function AddColorRangeRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; AStartColor, ACenterColor, AEndColor: TsColor): Integer; overload;

This item has no description.

Public function AddColorRangeRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; AStartColor, AEndColor: TsColor): Integer; overload;

This item has no description.

Public function AddDataBarRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; ABarColor: TsColor; AStartKind: TsCFValueKind; AStartValue: Double; AEndKind: TsCFValueKind; AEndValue: Double): Integer; overload;

This item has no description.

Public function AddDataBarRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; ABarColor: TsColor): Integer; overload;

This item has no description.

Public function AddIconSetRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; AIconSet: TsCFIconSet; AValueKind1: TsCFValueKind; AValue1: Double; AValueKind2: TsCFValueKind; AValue2: Double; AValueKind3: TsCFValueKind; AValue3: Double; AHideValue: Boolean = false; AReverse: Boolean = false): Integer; overload;

IconSet conditional format for 4 icons, i.e. 3 values

Public function AddIconSetRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; AIconSet: TsCFIconSet; AValueKind1: TsCFValueKind; AValue1: Double; AValueKind2: TsCFValueKind; AValue2: Double; AValueKind3: TsCFValueKind; AValue3: Double; AValueKind4: TsCFValueKind; AValue4: Double; AHideValue: Boolean = false; AReverse: Boolean = false): Integer; overload;

Iconset conditional format for 5 icons, i.e. 4 values

Public function AddIconSetRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; AIconSet: TsCFIconSet; AValueKind1: TsCFValueKind; AValue1: Double; AValueKind2: TsCFValueKind; AValue2: Double; AHideValue: Boolean = false; AReverse: Boolean = false): Integer; overload;

IconSet conditional format for 3 icons, ie. 2 values

Public function AddIconSetRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; AIconSet: TsCFIconSet; AHideValue: Boolean = false; AReverse: Boolean = false): Integer; overload;

This item has no description.

Public function Find(ASheet: TsBasicWorksheet; ARange: TsCellRange): Integer;

The conditional format list must be unique regarding cell ranges. This function searches all format item whether a given cell ranges is already listed.

Protected function AddRule(ASheet: TsBasicWorksheet; ARange: TsCellRange; ARule: TsCFRule): Integer;

Adds a new conditional format to the list. The format is specified by the cell range to which it is applied and by the rule describing the format. The rules are grouped for the same cell ranges.

Public procedure Delete(AIndex: Integer);

Deletes the conditional format at the given index from the list. Iterates also through all cell in the range of the CF and removes the format index from the cell's ConditionalFormatIndex array.

Public procedure DeleteRowOrCol(ASheet: TsBasicWorksheet; AIndex: Cardinal; IsRow: Boolean);

A row or column is deleted from the specified worksheet. Call this method to update the range of the conditional formats.

Public procedure InsertRowOrCol(ASheet: TsBasicWorksheet; AIndex: Cardinal; IsRow: Boolean);

A row or column is inserted in the specified worksheet. Call this method to update the range of the conditional formats.


fpsCurrency

Unit fpsCurrency

Description
Uses
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Constants
Variables

Description

Unit fpsCurrency provides a variety of utility functions related to currency values.

Currency symbols are the key to detection of currency values. In order to reckognize strings as currency symbols they have to be registered in the internal CurrencyList.

LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus distribution, for details about the license.

Overview

Functions and Procedures

function CurrencyRegistered(ACurrencySymbol: String): Boolean;
procedure GetRegisteredCurrencies(AList: TStrings);
function IsNegative(var AText: String): Boolean;
procedure RegisterCurrencies(AList: TStrings; AReplace: Boolean);
procedure RegisterCurrency(ACurrencySymbol: String);
function RemoveCurrencySymbol(ACurrencySymbol: String; var AText: String): Boolean;
function TryStrToCurrency(AText: String; out ANumber: Double; out ACurrencySymbol:String; const AFormatSettings: TFormatSettings): boolean;
procedure UnregisterCurrency(ACurrencySymbol: String);

Description

Functions and Procedures

function CurrencyRegistered(ACurrencySymbol: String): Boolean;

Checks whether a string is registered as valid currency symbol string

Parameters
ACurrencySymbol
The currency symbol to be checked.
Returns

True of the currency symbol is registered, False otherwise.

procedure GetRegisteredCurrencies(AList: TStrings);

Writes all registered currency symbols to a string list

Parameters
AList
List to which all the registered currency symbols are copied.
function IsNegative(var AText: String): Boolean;

Checks whether the given number string is a negative value. In case of currency values, this can be indicated by brackets, or a minus sign at string start or end.

Parameters
AText
String to be analyzed. Brackets or minus sign will be removed if the string is found to correspond to a negative value.
Returns

True when the input string was detected to be a negative number, False otherwise.

procedure RegisterCurrencies(AList: TStrings; AReplace: Boolean);

RegisterCurrencies() registers the currency strings contained in the string list If AReplace is true, the list replaces the currently registered list.

Parameters
AList
A list containing the strings to be registered as currency symbols.
AReplace
When this is True the currently registered symbols are deleted, otherwise the strings are registered as additional currency symbols.
procedure RegisterCurrency(ACurrencySymbol: String);

Registers a currency symbol UTF8 string for usage by fpspreadsheet

Currency symbols are the key for detection of currency values. In order to reckognize strings as currency symbols they have to be registered in the internal CurrencyList.

Registration occurs automatically for USD, "$", the currencystring defined in the DefaultFormatSettings and for the currency symbols used explicitly when calling WriteCurrency or WriteNumerFormat.

Parameters
ACurrencySymbol
A string symbol which identifies the currency, e.g. '$'
function RemoveCurrencySymbol(ACurrencySymbol: String; var AText: String): Boolean;

Checks wheter a specified currency symbol is contained in a string, removes the currency symbol and returns the remaining string.

Parameters
ACurrencySymbol
The currency symbol to be detected.
AText
String to be checked. On output, the currency symbol will be removed from the string if found.
Returns

True if the input string did contain a currency symbol, False otherwise.

function TryStrToCurrency(AText: String; out ANumber: Double; out ACurrencySymbol:String; const AFormatSettings: TFormatSettings): boolean;

Checks whether a string is a number with attached currency symbol. Looks also for negative values in brackets.

Parameters
AText
String which is to be converted to a currency value.
ANumber
Returns the numeric value of the string
ACurrencySymbol
Returns the currency symbol found.
AFormatSettings
Contains the decimal separator used in the input string.
Returns

True if the string could be converted to a number successfully, False otherwise.

procedure UnregisterCurrency(ACurrencySymbol: String);

Removes registration of a currency symbol string for usage by fpspreadsheet

Parameters
ACurrencySymbol
The currency symbol which is to be un-registered.


fpsImages

Unit fpsImages

Description
Uses
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Constants
Variables

Description

Unit fpsImages implements basic routines for embedding images in worksheets.

AUTHORS: Werner Pamler

LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus distribution, for details about the license.

Overview

Classes, Interfaces, Objects and Records

Name | Description
Class TsEmbeddedObj |

Functions and Procedures

function GetImageInfo(AStream: TStream; out AWidth, AHeight: DWord; out dpiX, dpiY: Double; AImageType: TsImageType = itUnknown): TsImageType; overload;
function GetImageInfo(AStream: TStream; out AWidthInches, AHeightInches: Double; AImageType: TsImageType = itUnknown): TsImageType; overload;
function GetImageMimeType(AImageType: TsImageType): String;
function GetImageTypeExt(AImageType: TsImageType): String;
function GetImageTypeFromFileName(const AFilename: String): TsImageType;
function RegisterImageType(AMimeType, AExt: String; AGetImageSize: TGetImageSizeFunc): TsImageType;

Types

TGetImageSizeFunc = function (AStream: TStream; out AWidth, AHeight: DWord; out dpiX, dpiY: Double): Boolean;
TsImageType = integer;

Constants

itUnknown = -1;

Variables

itBMP: TsImageType;
itEMF: TsImageType;
itGIF: TsImageType;
itJPEG: TsImageType;
itPCX: TsImageType;
itPNG: TsImageType;
itSVG: TsImageType;
itTIFF: TsImageType;
itWMF: TsImageType;

Description

Functions and Procedures

function GetImageInfo(AStream: TStream; out AWidth, AHeight: DWord; out dpiX, dpiY: Double; AImageType: TsImageType = itUnknown): TsImageType; overload;

Returns the width and height of the image loaded into the specified stream.

Parameters
AStream
Stream containing the image to be analyzed. It is assumed that the image begins at stream start.
AWidth
Image width, in pixels
AHeight
Image height, in pixels
dpiX
Pixel density in x direction, per inch
dpiY
Pixel density in y direction, per inch
AImageType
Type of the image to be assumed. If this parameter is missing or itUnknown then the image type is determined from the file header.
Returns

Image type code found from the file header.

See also
RegisterImageType
function GetImageInfo(AStream: TStream; out AWidthInches, AHeightInches: Double; AImageType: TsImageType = itUnknown): TsImageType; overload;

Returns the width and height of the image loaded into the specified stream.

Parameters
AStream
Stream containing the image to be analyzed. It is assumed that the image begins at stream start.
AWidthInches
Image width, in inches
AHeightInches
Image height, in inches
AImageType
Type of the image to be assumed. If this parameter is missing or itUnknown then the image type is determined from the file header.
Returns

Image type code found from the file header.

See also
RegisterImageType
function GetImageMimeType(AImageType: TsImageType): String;

Returns the MimeType of the specified image type

Parameters
AImageType
Format code of the image type as returned from the image registration procedure
Returns

MimeType of the file format as string

function GetImageTypeExt(AImageType: TsImageType): String;

Returns the file extension belonging the specified image type. If there are several extensions the first one is selected. The extension is returned without a leading period.

Parameters
AImageType
Format code of the image type as returned from the image registration procedure
Returns

String with the file extension used by this image type (without leading dot).

function GetImageTypeFromFileName(const AFilename: String): TsImageType;

Extracts the image file type identifier from the extension of the specified file name.

Parameters
AFileName
Name of the file to be analyzed
Returns

Format code value as returned from the image registration procedure

See also
RegisterImageType
function RegisterImageType(AMimeType, AExt: String; AGetImageSize: TGetImageSizeFunc): TsImageType;

Registers an image type for usage in fpspreadsheet

Parameters
AExt
Extension(s) of the file format. Separate by "|" if a file format can use several extensions.
AMimeType
MimeType of the file format, for usage by ods
AGetImageSize
Function which can extract the image size and pixel density. It should only read the file header.
Returns

Identifier of the image type (consecutive number)

Types

TGetImageSizeFunc = function (AStream: TStream; out AWidth, AHeight: DWord; out dpiX, dpiY: Double): Boolean;

This item has no description.

TsImageType = integer;

This item has no description.

Constants

itUnknown = -1;

Identifier for unknown image type

Variables

itBMP: TsImageType;

Identifier for the BMP image type (value 3)

itEMF: TsImageType;

Identifier for the EMF image type (value 7)

itGIF: TsImageType;

Identifier for the GIF image type (value 4)

itJPEG: TsImageType;

Identifier for the JPEG image type (value 1)

itPCX: TsImageType;

Identifier for the PCX image type (value 8)

itPNG: TsImageType;

Identifier for the PNG image type (value 0)

itSVG: TsImageType;

Identifier for the SVG image type (value 5)

itTIFF: TsImageType;

Identifier for the TIFF image type (value 2)

itWMF: TsImageType;

Identifier for the WMF image type (value 6)


fpsImages: Class TsEmbeddedObj

Class TsEmbeddedObj

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsImages

Declaration

type TsEmbeddedObj = class(TObject)

Description

This item has no description.

Hierarchy

  • TObject
  • TsEmbeddedObj

Overview

Methods

Public | destructor Destroy; override;
Public | function LoadFromFile(const AFileName: String): Boolean;
Public | function LoadFromStream(AStream: TStream; AName: String; ASize: Int64 = -1): Boolean;
Protected | function CheckStream(AImageType: TsImageType): Boolean;

Properties

Public | property FileName: String read FFileName;
Public | property ImageHeight: Double read FHeight write FHeight;
Public | property ImageType: TsImagetype read FImageType;
Public | property ImageWidth: Double read FWidth write FWidth;
Public | property Stream: TMemoryStream read FStream;

Description

Methods

Public destructor Destroy; override;

This item has no description.

Public function LoadFromFile(const AFileName: String): Boolean;

This item has no description.

Public function LoadFromStream(AStream: TStream; AName: String; ASize: Int64 = -1): Boolean;

This item has no description.

Protected function CheckStream(AImageType: TsImageType): Boolean;

This item has no description.

Properties

Public property FileName: String read FFileName;

This item has no description.

Public property ImageHeight: Double read FHeight write FHeight;

This item has no description.

Public property ImageType: TsImagetype read FImageType;

This item has no description.

Public property ImageWidth: Double read FWidth write FWidth;

This item has no description.

Public property Stream: TMemoryStream read FStream;

This item has no description.


fpsNumFormat

Unit fpsNumFormat

Description
Uses
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Constants
Variables

Description

Unit fpsNumFormat contains classes and procedures to analyze and process number formats.

AUTHORS: Werner Pamler

LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus distribution, for details about the license.

Overview

Classes, Interfaces, Objects and Records

Name | Description
Record TsNumFormatElement |
Record TsNumFormatSection |
Class TsNumFormatParams |
Class TsNumFormatList |
Class TsNumFormatParser |

Functions and Procedures

function AddAMPM(const ATimeFormatString: String; const AFormatSettings: TFormatSettings): String;
function AddIntervalBrackets(AFormatString: String): String;
function ApplyTextFormat(AText: String; AParams: TsNumFormatParams): String;
procedure BuildCurrencyFormatList(AList: TStrings; APositive: Boolean; AValue: Double; const ACurrencySymbol: String);
function BuildCurrencyFormatString(ANumberFormat: TsNumberFormat; const AFormatSettings: TFormatSettings; ADecimals, APosCurrFmt, ANegCurrFmt: Integer; ACurrencySymbol: String; Accounting: Boolean = false): String;
function BuildDateTimeFormatString(ANumberFormat: TsNumberFormat; const AFormatSettings: TFormatSettings; AFormatString: String = ''): String;
function BuildFormatStringFromSection(const ASection: TsNumFormatSection; AllowLocalizedAMPM: Boolean = true): String;
function BuildFractionFormatString(AMixedFraction: Boolean; ANumeratorDigits, ADenominatorDigits: Integer): String;
function BuildNumberFormatString(ANumberFormat: TsNumberFormat; const AFormatSettings: TFormatSettings; ADecimals: Integer = -1; AMinIntDigits: Integer = 1): String;
function ConvertFloatToStr(AValue: Double; AParams: TsNumFormatParams; AFormatSettings: TFormatSettings): String;
function CountDecs(AFormatString: String; ADecChars: TsDecsChars = ['0']): Byte;
function CreateNumFormatParams(ANumFormatStr: String; const AFormatSettings: TFormatSettings): TsNumFormatParams;
function GeneralFormatFloat(AValue: Double; AFormatSettings: TFormatSettings): String; inline;
procedure InitFormatSettings(out AFormatSettings: TFormatSettings);
function IsBoolValue(const AText, ATrueText, AFalseText: String; out AValue: Boolean): Boolean;
function IsCurrencyFormat(AFormat: TsNumberFormat): Boolean; overload;
function IsCurrencyFormat(ANumFormat: TsNumFormatParams): Boolean; overload;
function IsDateFormat(ANumFormat: TsNumFormatParams): Boolean;
function IsDateTimeFormat(AFormat: TsNumberFormat): Boolean; overload;
function IsDateTimeFormat(AFormatStr: String): Boolean; overload;
function IsDateTimeFormat(ANumFormat: TsNumFormatParams): Boolean; overload;
function IsDateTimeValue(AText: String; const AFormatSettings: TFormatSettings; out ADateTime: TDateTime; out ANumFormat: TsNumberFormat): Boolean;
function IsLongTimeFormat(AFormatStr: String; ATimeSeparator: char): Boolean; overload;
function IsNumberValue(AText: String; AutoDetectNumberFormat: Boolean; const AFormatSettings: TFormatSettings; out ANumber: Double; out ANumFormat: TsNumberFormat; out ADecimals: Integer; out ACurrencySymbol, AWarning: String): Boolean;
function IsTextFormat(ANumFormat: TsNumFormatParams): Boolean;
function IsTimeFormat(AFormatStr: String): Boolean; overload;
function IsTimeFormat(AFormat: TsNumberFormat): Boolean; overload;
function IsTimeFormat(ANumFormat: TsNumFormatParams): Boolean; overload;
function IsTimeIntervalFormat(ANumFormat: TsNumFormatParams): Boolean;
function MakeLongDateFormat(ADateFormat: String): String;
function MakeShortDateFormat(ADateFormat: String): String;
procedure MakeTimeIntervalMask(Src: String; var Dest: String);
function ParamsOfNumFormatStr(ANumFormatStr: String; const AFormatSettings: TFormatSettings; var AResult: TsNumFormatParams): Integer;
procedure ReplaceFormatSettings(var AFormatSettings: TFormatSettings; const ADefaultFormats: TFormatSettings);
function StripAMPM(const ATimeFormatString: String): String;

Types

PsNumFormatSection = ˆTsNumFormatSection;
TsDecsChars = set of char;
TsNumFormatElements = array of TsNumFormatElement;
TsNumFormatKind = (...);
TsNumFormatKinds = set of TsNumFormatKind;
TsNumFormatParamsClass = class of TsNumFormatParams;
TsNumFormatSections = array of TsNumFormatSection;
TsNumFormatToken = (...);

Constants

psAmbiguousSymbol = 13;
psErrConditionalFormattingNotSupported = 4;
psErrGeneralExpected = 12;
psErrMultipleCurrSymbols = 9;
psErrMultipleExpChars = 11;
psErrMultipleFracSymbols = 10;
psErrNoUsableFormat = 5;
psErrNoValidColorIndex = 1;
psErrNoValidCompareNumber = 2;
psErrNoValidDateTimeFormat = 7;
psErrNoValidNumberFormat = 6;
psErrNoValidTextFormat = 14;
psErrQuoteExpected = 8;
psErrUnknownInfoInBrackets = 3;
psOK = 0;

Description

Functions and Procedures

function AddAMPM(const ATimeFormatString: String; const AFormatSettings: TFormatSettings): String;

Adds an AM/PM format code to a pre-built time formatting string.

Example: ATimeFormatString = 'hh:nn' ==> 'hh:nn AM/PM'

Parameters
ATimeFormatString
String of time formatting codes (such as 'hh:nn')
AFormatSettings
FormatSettings for locale-dependent information
Returns

Formatting string with AM/PM option activated.

function AddIntervalBrackets(AFormatString: String): String;

The given format string is assumed to represent a time interval, i.e. its first time symbol must be enclosed by square brackets. Checks if this is true, and adds the brackes if not.

Parameters
AFormatString
String with time formatting codes
Returns

Unchanged format string if its first time code is in square brackets (as in '[h]:nn:ss'). If not, the first time code is enclosed in square brackets.

function ApplyTextFormat(AText: String; AParams: TsNumFormatParams): String;

Applies a text format to a text. The text placeholder is @. Supports appending and prepending text.

procedure BuildCurrencyFormatList(AList: TStrings; APositive: Boolean; AValue: Double; const ACurrencySymbol: String);

Builds a string list with samples of the predefined currency formats

Parameters
AList
String list in which the format samples are stored
APositive
If True, samples are built for positive currency values, otherwise for negative values
AValue
Currency value to be used when calculating the sample strings
ACurrencySymbol
Currency symbol string to be used in the samples
function BuildCurrencyFormatString(ANumberFormat: TsNumberFormat; const AFormatSettings: TFormatSettings; ADecimals, APosCurrFmt, ANegCurrFmt: Integer; ACurrencySymbol: String; Accounting: Boolean = false): String;

Builds a currency format string. The presentation of negative values (brackets, or minus signs) is taken from the provided format settings. The format string consists of three sections, separated by semicolons.

Example: '"$"#,##0.00;("$"#,##0.00);"$"0.00'

Parameters
ANumberFormat
Identifier of the built-in number format for which the format string is to be generated.
AFormatSettings
FormatSettings to be applied (used to extract default values for the parameters following)
ADecimals
number of decimal places. If < 0, the CurrencyDecimals of the FormatSettings is used.
APosCurrFmt
Identifier for the order of currency symbol, value and spaces of positive values - see pcfXXXX constants in fpsTypes.pas. If < 0, the CurrencyFormat of the FormatSettings is used.
ANegCurrFmt
Identifier for the order of currency symbol, value and spaces of negative values. Specifies also usage of (). - see ncfXXXX constants in fpsTypes.pas. If < 0, the NegCurrFormat of the FormatSettings is used.
ACurrencySymbol
String to identify the currency, like $ or USD. If ? the CurrencyString of the FormatSettings is used.
Accounting
If true, adds spaces for alignment of decimals
Returns

String of formatting codes

function BuildDateTimeFormatString(ANumberFormat: TsNumberFormat; const AFormatSettings: TFormatSettings; AFormatString: String = ''): String;

Builds a date/time format string from the number format code.

Parameters
ANumberFormat
Built-in number format identifier
AFormatSettings
Format settings from which locale-dependent information like day-month-year order is taken.
AFormatString
Optional pre-built formatting string. It is used only for the format nfInterval where square brackets are added to the first time code field.
Returns

String of date/time formatting code constructed from the built-in format information.

function BuildFormatStringFromSection(const ASection: TsNumFormatSection; AllowLocalizedAMPM: Boolean = true): String;

Creates a format string for the specified parsed number format section. The format string is created according to Excel convention (which is understood by ODS as well).

Parameters
ASection
Parsed section of number format elements as created by the number format parser
AllowLocalizedAMPM
Replaces "AMPM" in a time format string by "AM/PM". "AMPM" is allowed by FPS, but not by Excel. When converting a time to string it is replaced by the localized strings FormatSettings.TimeAMString/.TimePMString.
Returns

Excel-compatible format string

function BuildFractionFormatString(AMixedFraction: Boolean; ANumeratorDigits, ADenominatorDigits: Integer): String;

Builds a number format string for fraction formatting from the number format code and the count of numerator and denominator digits.

Parameters
AMixedFraction
If True, fraction is presented as mixed fraction
ANumeratorDigits
Count of numerator digits
ADenominatorDigits
Count of denominator digits. If the value is negative then its absolute value is inserted literally as as denominator.
Returns

String of formatting code, here something like: '##/##' or '# ##/##'

function BuildNumberFormatString(ANumberFormat: TsNumberFormat; const AFormatSettings: TFormatSettings; ADecimals: Integer = -1; AMinIntDigits: Integer = 1): String;

Builds a number format string from the number format code and the count of decimal places.

Example: ANumberFormat = nfFixedTh, ADecimals = 2 –> '#,##0.00'

Parameters
ANumberFormat
Identifier of the built-in numberformat for which a format string is to be generated
AFormatSettings
FormatSettings for default parameters
ADecimals
Number of decimal places. If < 0 the CurrencyDecimals value of the FormatSettings is used. In case of a fraction format "ADecimals" refers to the maximum count digits of the denominator.
AMinIntDigits
Minimum count of integer digits, i.e. count of '0' in the format string before the decimal separator
Returns

String of formatting codes

function ConvertFloatToStr(AValue: Double; AParams: TsNumFormatParams; AFormatSettings: TFormatSettings): String;

Converts a floating point number to a string as determined by the specified number format parameters

Parameters
AValue
Value to be converted to a string
AParams
Number format parameters which will be applied in the conversion. The number format params are obtained by the number format parser from the number format string.
AFormatSettings
Format settings needed by the number format parser for the conversion
Returns

Converted string

function CountDecs(AFormatString: String; ADecChars: TsDecsChars = ['0']): Byte;

Counts how many decimal places are coded into a given number format string.

Parameters
AFormatString
String with number format codes, such as '0.000'
ADecChars
Characters which are considered as symbols for decimals. For the fixed decimals, this is the '0'. Optional decimals are encoced as '#'.
Returns

Count of decimal places found

function CreateNumFormatParams(ANumFormatStr: String; const AFormatSettings: TFormatSettings): TsNumFormatParams;

This item has no description.

function GeneralFormatFloat(AValue: Double; AFormatSettings: TFormatSettings): String; inline;

This item has no description.

procedure InitFormatSettings(out AFormatSettings: TFormatSettings);

Initializes the FormatSettings of file a import/export parameters record to default values which can be replaced by the FormatSettings of the workbook's FormatSettings

function IsBoolValue(const AText, ATrueText, AFalseText: String; out AValue: Boolean): Boolean;

Checks whether the specified text corresponds to a boolean value. For this, it must match the specified True and False text phrases.

function IsCurrencyFormat(AFormat: TsNumberFormat): Boolean; overload;

Checks whether the given number format code is for currency, i.e. requires a currency symbol.

Parameters
AFormat
Built-in number format identifier to be checked
Returns

True if AFormat is nfCurrency or nfCurrencyRed, False otherwise.

function IsCurrencyFormat(ANumFormat: TsNumFormatParams): Boolean; overload;

Checks whether the specified number format parameters apply to currency values.

Parameters
ANumFormat
Number format parameters
Returns

True if Kind of the 1st format parameter section contains the nfkCurrency elements; False otherwise

function IsDateFormat(ANumFormat: TsNumFormatParams): Boolean;

Checks whether the specified number format parameters apply to a date value.

Parameters
ANumFormat
Number format parameters
Returns

True if Kind of the 1st format parameter section contains the nfkDate, but no nfkTime tags; False otherwise

function IsDateTimeFormat(AFormat: TsNumberFormat): Boolean; overload;

Checks whether the given number format code is for date/time values.

Parameters
AFormat
Built-in number format identifier to be checked
Returns

True if AFormat is a date/time format (such as nfShortTime), False otherwise

function IsDateTimeFormat(AFormatStr: String): Boolean; overload;

Checks whether the given string with formatting codes is for date/time values.

Parameters
AFormatStr
String with formatting codes to be checked.
Returns

True if AFormatStr is a date/time format string (such as 'hh:nn'), False otherwise

function IsDateTimeFormat(ANumFormat: TsNumFormatParams): Boolean; overload;

Checks whether the specified number format parameters apply to date/time values.

Parameters
ANumFormat
Number format parameters
Returns

True if Kind of the 1st format parameter section contains the nfkDate or nfkTime elements; False otherwise

function IsDateTimeValue(AText: String; const AFormatSettings: TFormatSettings; out ADateTime: TDateTime; out ANumFormat: TsNumberFormat): Boolean;

Checks whether the specified text corresponds to a date/time value and returns True, its numerical value and its built-in numberformat if it is.

function IsLongTimeFormat(AFormatStr: String; ATimeSeparator: char): Boolean; overload;

Returns True if the specified format string represents a long time format, i.e. it contains two TimeSeparators.

function IsNumberValue(AText: String; AutoDetectNumberFormat: Boolean; const AFormatSettings: TFormatSettings; out ANumber: Double; out ANumFormat: TsNumberFormat; out ADecimals: Integer; out ACurrencySymbol, AWarning: String): Boolean;

Checks whether the specified text corresponds to a numerical value. If it is then the function result is True, and the number value and its formatting parameters are returned.

function IsTextFormat(ANumFormat: TsNumFormatParams): Boolean;

This item has no description.

function IsTimeFormat(AFormatStr: String): Boolean; overload;

Checks whether the given string with formatting codes is for time values.

Parameters
AFormatStr
String with formatting codes to be checked
Returns

True if AFormatStr represents a time-format, false otherwise

function IsTimeFormat(AFormat: TsNumberFormat): Boolean; overload;

Checks whether the given built-in number format code is for time values.

Parameters
AFormat
Built-in number format identifier to be checked
Returns

True if AFormat represents to a time-format, False otherwise

function IsTimeFormat(ANumFormat: TsNumFormatParams): Boolean; overload;

Checks whether the specified number format parameters apply to time values.

Parameters
ANumFormat
Number format parameters
Returns

True if Kind of the 1st format parameter section contains the nfkTime, but no nfkDate elements; False otherwise

function IsTimeIntervalFormat(ANumFormat: TsNumFormatParams): Boolean;

Checks whether the specified number format parameters is a time interval format.

Parameters
ANumFormat
Number format parameters
Returns

True if Kind of the 1st format parameter section contains the nfkTimeInterval elements; False otherwise

function MakeLongDateFormat(ADateFormat: String): String;

Creates a long date format string out of a short date format string. Retains the order of year-month-day and the separators, but uses 4 digits for year and 3 digits of month.

Parameters
ADateFormat
String with date formatting code representing a "short" date, such as 'dd/mm/yy'
Returns

Format string modified to represent a "long" date, such as 'dd/mmm/yyyy'

function MakeShortDateFormat(ADateFormat: String): String;

Modifies the short date format such that it has a two-digit year and a two-digit month. Retains the order of year-month-day and the separators.

Parameters
ADateFormat
String with date formatting codes representing a "long" date, such as 'dd/mmm/yyyy'
Returns

Format string modified to represent a "short" date, such as 'dd/mm/yy'

procedure MakeTimeIntervalMask(Src: String; var Dest: String);

Creates a "time interval" format string having the first time code identifier in square brackets.

Parameters
Src
Source format string, must be a time format string, like 'hh:nn'
Dest
Destination format string, will have the first time code element of the src format string in square brackets, like '[hh]:nn'.
function ParamsOfNumFormatStr(ANumFormatStr: String; const AFormatSettings: TFormatSettings; var AResult: TsNumFormatParams): Integer;

This item has no description.

procedure ReplaceFormatSettings(var AFormatSettings: TFormatSettings; const ADefaultFormats: TFormatSettings);

Replaces in AFormatSettings all members marked as having default values (#0, 1, '') by the corresponding values of the ADefaultFormats record

function StripAMPM(const ATimeFormatString: String): String;

Removes an AM/PM formatting code from a given time formatting string. Variants of "AM/PM" are considered as well. The string is left unchanged if it does not contain AM/PM codes.

Parameters
ATimeFormatString
String of time formatting codes (such as 'hh:nn AM/PM')
Returns

Formatting string with AM/PM being removed (–> 'hh:nn')

Types

PsNumFormatSection = ˆTsNumFormatSection;

Pointer to a parsed number format section

TsDecsChars = set of char;

Set of characters

TsNumFormatElements = array of TsNumFormatElement;

Array of parsed number format elements

TsNumFormatKind = (...);

Summary information classifying a number format section

Values
  • nfkPercent
  • nfkExp
  • nfkCurrency
  • nfkFraction
  • nfkDate
  • nfkTime
  • nfkTimeInterval
  • nfkText
  • nfkHasColor
  • nfkHasThSep
  • nfkHasFactor
TsNumFormatKinds = set of TsNumFormatKind;

Set of summary elements classifying and describing a number format section

TsNumFormatParamsClass = class of TsNumFormatParams;

Class of number format parameters

TsNumFormatSections = array of TsNumFormatSection;

Array of parsed number format sections

TsNumFormatToken = (...);

Tokens used by the elements of the number format parser. If, e.g. a format string is "0.000" then the number format parser detects the following three tokens

nftIntZeroDigit with integer value 1 (i.e. 1 zero-digit for the integer part) nftDecSep (i.e. decimal separator) ntZeroDecs with integer value 2 (i.e. 3 decimal places.

Values
  • nftGeneral
  • nftText
  • nftThSep
  • nftDecSep
  • nftYear
  • nftMonth
  • nftDay
  • nftHour
  • nftMinute
  • nftSecond
  • nftMilliseconds
  • nftAMPM
  • nftMonthMinute
  • nftDateTimeSep
  • nftSign
  • nftSignBracket
  • nftIntOptDigit
  • nftIntZeroDigit
  • nftIntSpaceDigit
  • nftIntTh
  • nftZeroDecs
  • nftOptDecs
  • nftSpaceDecs
  • nftExpChar
  • nftExpSign
  • nftExpDigits
  • nftPercent
  • nftFactor
  • nftFracSymbol
  • nftFracNumOptDigit
  • nftFracNumSpaceDigit
  • nftFracNumZeroDigit
  • nftFracDenomOptDigit
  • nftFracDenomSpaceDigit
  • nftFracDenomZeroDigit
  • nftFracDenom
  • nftCurrSymbol
  • nftCountry
  • nftColor
  • nftCompareOp
  • nftCompareValue
  • nftSpace
  • nftEscaped
  • nftRepeat
  • nftEmptyCharWidth
  • nftTextFormat

Constants

psAmbiguousSymbol = 13;

This item has no description.

psErrConditionalFormattingNotSupported = 4;

This item has no description.

psErrGeneralExpected = 12;

This item has no description.

psErrMultipleCurrSymbols = 9;

This item has no description.

psErrMultipleExpChars = 11;

This item has no description.

psErrMultipleFracSymbols = 10;

This item has no description.

psErrNoUsableFormat = 5;

This item has no description.

psErrNoValidColorIndex = 1;

This item has no description.

psErrNoValidCompareNumber = 2;

This item has no description.

psErrNoValidDateTimeFormat = 7;

This item has no description.

psErrNoValidNumberFormat = 6;

This item has no description.

psErrNoValidTextFormat = 14;

This item has no description.

psErrQuoteExpected = 8;

This item has no description.

psErrUnknownInfoInBrackets = 3;

This item has no description.

psOK = 0;

This item has no description.


fpsNumFormat: Record TsNumFormatElement

Record TsNumFormatElement

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsNumFormat

Declaration

type TsNumFormatElement = record

Description

Element of the parsed number format sequence. Each element is identified by a token and has optional parameters stored as integer, float, and/or text.

Overview

Fields

Public | Token: TsNumFormatToken;
Public | IntValue: Integer;
Public | FloatValue: Double;
Public | TextValue: String;

Description

Fields

Public Token: TsNumFormatToken;

Identifies the number format element

Public IntValue: Integer;

Integer value associated with the number format element

Public FloatValue: Double;

Floating point value associated with the number format element

Public TextValue: String;

String value associated with the number format element


fpsNumFormat: Record TsNumFormatSection

Record TsNumFormatSection

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsNumFormat

Declaration

type TsNumFormatSection = record

Description

Number format string can be composed of several parts separated by a semicolon. The number format parser extracts the format information into individual sections for each part

Overview

Fields

Public | Elements: TsNumFormatElements;
Public | Kind: TsNumFormatKinds;
Public | NumFormat: TsNumberFormat;
Public | Decimals: Byte;
Public | MinIntDigits: Byte;
Public | Factor: Double;
Public | FracInt: Integer;
Public | FracNumerator: Integer;
Public | FracDenominator: Integer;
Public | CurrencySymbol: String;
Public | Color: TsColor;

Description

Fields

Public Elements: TsNumFormatElements;

Parser number format elements used by this section

Public Kind: TsNumFormatKinds;

Summary information describing the section

Public NumFormat: TsNumberFormat;

Reconstructed number format identifier for the built-in fps formats

Public Decimals: Byte;

Number of decimal places used by the format string

Public MinIntDigits: Byte;

Minimum number of digits before the decimal separator

Public Factor: Double;

Factor by which a number will be multiplied before converting to string

Public FracInt: Integer;

Digits to be used for the integer part of a fraction

Public FracNumerator: Integer;

Digits to be used for the numerator part of a fraction

Public FracDenominator: Integer;

Digits to be used for the denominator part of a fraction

Public CurrencySymbol: String;

Currency string to be used in case of currency/accounting formats

Public Color: TsColor;

Color to be used when displaying the converted string


fpsNumFormat: Class TsNumFormatParams

Class TsNumFormatParams

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsNumFormat

Declaration

type TsNumFormatParams = class(TObject)

Description

Describes a parsed number format and provides all the information to convert a number value to a number or date/time string. These data are created by the number format parser from a format string.

Hierarchy

  • TObject
  • TsNumFormatParams

Overview

Fields

Public Sections: TsNumFormatSections;

Methods

Public | constructor Create;
Public | function SectionsEqualTo(ASections: TsNumFormatSections): Boolean;
Protected | function GetNumFormat: TsNumberFormat; virtual;
Protected | function GetNumFormatStr: String; virtual;
Public | procedure DeleteElement(ASectionIndex, AElementIndex: Integer);
Public | procedure InsertElement(ASectionIndex, AElementIndex: Integer; AToken: TsNumFormatToken);
Public | procedure SetCurrSymbol(AValue: String);
Public | procedure SetDecimals(AValue: Byte);
Public | procedure SetNegativeRed(AEnable: Boolean);
Public | procedure SetThousandSep(AEnable: Boolean);

Properties

Public | property AllowLocalizedAMPM: boolean read FAllowLocalizedAMPM write FAllowLocalizedAMPM;
Public | property NumFormat: TsNumberFormat read GetNumFormat;
Public | property NumFormatStr: String read GetNumFormatStr;

Description

Fields

Public Sections: TsNumFormatSections;

Array of the format sections

Methods

Public constructor Create;

This item has no description.

Public function SectionsEqualTo(ASections: TsNumFormatSections): Boolean;

Checks whether the parsed format sections passed as a parameter are identical to the interal section array.

Parameters
ASections
Array of parsed format sections to be compared with the internal format sections
Protected function GetNumFormat: TsNumberFormat; virtual;

Creates the built-in number format identifier from the parsed number format sections and elements

Returns

Built-in number format identifer if the format is built into fpspreadsheet, or nfCustom otherwise

See also
TsNumberFormat
Protected function GetNumFormatStr: String; virtual;

Constructs the number format string from the parsed sections and elements. The format symbols are selected according to Excel syntax.

Returns

Excel-compatible number format string.

Public procedure DeleteElement(ASectionIndex, AElementIndex: Integer);

Deletes a parsed number format element from the specified format section.

Parameters
ASectionIndex
Index of the format section containing the element to be deleted
AElementIndex
Index of the format element to be deleted
Public procedure InsertElement(ASectionIndex, AElementIndex: Integer; AToken: TsNumFormatToken);

Inserts a parsed format token into the specified format section before the specified element.

Parameters
ASectionIndex
Index of the parsed format section into which the token is to be inserted
AElementIndex
Index of the format element before which the token is to be inserted
AToken
Parsed format token to be inserted
See also
TsNumFormatToken
Public procedure SetCurrSymbol(AValue: String);

Defines the currency symbol used in the format params sequence

Parameters
AValue
String containing the currency symbol to be used in the converted numbers
Public procedure SetDecimals(AValue: Byte);

Adds or modifies parsed format tokens such that the specified number of decimal places is displayed

Parameters
AValue
Number of decimal places to be shown
Public procedure SetNegativeRed(AEnable: Boolean);

If AEnable is true a format section for negative numbers is added (or an existing one is modified) such that negative numbers are displayed in red. If AEnable is false the format tokens are modified such that negative values are displayed in default color.

Parameters
AEnable
The format tokens are modified such as to display negative values in red if AEnable is true.
Public procedure SetThousandSep(AEnable: Boolean);

Inserts a thousand separator token into the format elements at the appropriate position, or removes it

Parameters
AEnable
A thousand separator is inserted if AEnable is True, or else deleted.

Properties

Public property AllowLocalizedAMPM: boolean read FAllowLocalizedAMPM write FAllowLocalizedAMPM;

This item has no description.

Public property NumFormat: TsNumberFormat read GetNumFormat;

This item has no description.

Public property NumFormatStr: String read GetNumFormatStr;

This item has no description.


fpsNumFormat: Class TsNumFormatList

Class TsNumFormatList

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsNumFormat

Declaration

type TsNumFormatList = class(TFPList)

Description

List containing parsed number format parameters

Hierarchy

  • TObject
  • TFPList
  • TsNumFormatList

Overview

Fields

Public | FOwnsData: Boolean;
Protected | FFormatSettings: TFormatSettings;
Protected | FClass: TsNumFormatParamsClass;

Methods

Public | constructor Create(AFormatSettings: TFormatSettings; AOwnsData: Boolean);
Public | destructor Destroy; override;
Public | function AddFormat(AFormatStr: String): Integer; overload;
Public | function AddFormat(ASections: TsNumFormatSections): Integer; overload;
Public | function Find(ASections: TsNumFormatSections): Integer; overload;
Public | function Find(AFormatstr: String): Integer; overload;
Public | function GetItem(AIndex: Integer): TsNumFormatParams;
Public | procedure Clear;
Public | procedure Delete(AIndex: Integer);
Public | procedure SetItem(AIndex: Integer; const AValue: TsNumFormatParams);
Protected | procedure AddBuiltinFormats; virtual;

Properties

Public property Items[AIndex: Integer]: TsNumFormatParams read GetItem write SetItem;

Description

Fields

Public FOwnsData: Boolean;

This item has no description.

Protected FFormatSettings: TFormatSettings;

This item has no description.

Protected FClass: TsNumFormatParamsClass;

This item has no description.

Methods

Public constructor Create(AFormatSettings: TFormatSettings; AOwnsData: Boolean);

Constructor of the number format list class.

Parameters
AFormatSettings
Format settings needed internally by the number format parser (currency symbol, etc.)
AOwnsData
If True then the list is responsible to destroy the list items
Public destructor Destroy; override;

Destructor of the number format list class.

Clears the list items if the list "owns" the data.

Public function AddFormat(AFormatStr: String): Integer; overload;

Adds a number format as specified by a format string to the list Uses the number format parser to convert the format string to format sections and elements.

Duplicates are not checked before adding the format item.

Parameters
AFormatStr
Excel-like format string describing the format to be added
Returns

Index of the format item in the list

Public function AddFormat(ASections: TsNumFormatSections): Integer; overload;

Adds the specified sections of a parsed number format to the list. Duplicates are not checked before adding the format item.

Parameters
ASections
Array of number format sections as obtained by the number format parser for a given format string
Returns

Index of the format item in the list.

Public function Find(ASections: TsNumFormatSections): Integer; overload;

Checks whether a parsed format item having the specified format sections is contained in the list and returns its index if found, or -1 if not found.

Parameters
ASections
Array of number format sections as obtained by the number format parser for a given format string
Returns

Index of the found format item, or -1 if not found

Public function Find(AFormatstr: String): Integer; overload;

Checks whether a format item corresponding to the specified format string is contained in the list and returns its index if found, or -1 if not.

Should be called before adding a format to the list to avoid duplicates.

Parameters
AFormatStr
Number format string of the format item which is seeked
Returns

Index of the found format item, or -1 if not found

See also
TsNumFormatList.AddFormat
Public function GetItem(AIndex: Integer): TsNumFormatParams;

Getter function returning the correct type of the list items (i.e., TsNumFormatParams which are parsed format descriptions).

Parameters
AIndex
Index of the format item
Returns

Pointer to the list item at the specified index, cast to the type TsNumFormatParams

Public procedure Clear;

Clears the list. If the list "owns" the format items they are destroyed.

See also
TsNumFormatList.Create
Public procedure Delete(AIndex: Integer);

Deletes the number format item having the specified index in the list. If the list "owns" the format items, the item is destroyed.

Parameters
AIndex
Index of the format item to be deleted
See also
TsNumformatList.Create
Public procedure SetItem(AIndex: Integer; const AValue: TsNumFormatParams);

Setter function for the list items

Parameters
AIndex
Index of the format item
AValue
Pointer to the parsed format description to be stored in the list at the specified index.
Protected procedure AddBuiltinFormats; virtual;

Adds the number formats to the list which are built into the file format.

Does nothing here. Must be overridden by derived classes for each file format.

Properties

Public property Items[AIndex: Integer]: TsNumFormatParams read GetItem write SetItem;

This item has no description.


fpsNumFormat: Class TsNumFormatParser

Class TsNumFormatParser

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsNumFormat

Declaration

type TsNumFormatParser = class(TObject)

Description

This item has no description.

Hierarchy

  • TObject
  • TsNumFormatParser

Overview

Fields

Protected | FFormatSettings: TFormatSettings;
Protected | FSections: TsNumFormatSections;

Methods

Public | constructor Create(const AFormatString: String; const AFormatSettings: TFormatSettings);
Public | destructor Destroy; override;
Public | function GetDateTimeCode(ASection: Integer): String;
Public | function IsDateTimeFormat: Boolean;
Public | function IsTimeFormat: Boolean;
Protected | function AnalyzeCurrency(const AValue: String): Boolean;
Protected | function BuildFormatString: String; virtual;
Protected | function NextToken: Char;
Protected | function PrevToken: Char;
Public | procedure ClearAll;
Public | procedure LimitDecimals;
Protected | procedure AddElement(AToken: TsNumFormatToken; AText: String); overload;
Protected | procedure AddElement(AToken: TsNumFormatToken; AFloatValue: Double); overload;
Protected | procedure AddElement(AToken: TsNumFormatToken; AIntValue: Integer=0; AText: String = ''); overload;
Protected | procedure AddSection;
Protected | procedure AnalyzeColor(AValue: String);
Protected | procedure CheckSection(ASection: Integer);
Protected | procedure CheckSections;
Protected | procedure DeleteElement(ASection, AIndex: Integer);
Protected | procedure FixMonthMinuteToken(var ASection: TsNumFormatSection);
Protected | procedure InsertElement(ASection, AIndex: Integer; AToken: TsNumFormatToken; AFloatValue: Double); overload;
Protected | procedure InsertElement(ASection, AIndex: Integer; AToken: TsNumFormatToken; AIntValue: Integer); overload;
Protected | procedure InsertElement(ASection, AIndex: Integer; AToken: TsNumFormatToken; AText: String); overload;
Protected | procedure Parse(const AFormatString: String);
Protected | procedure ScanAMPM;
Protected | procedure ScanAndCount(ATestChar: Char; out ACount: Integer);
Protected | procedure ScanBrackets;
Protected | procedure ScanCondition(AFirstChar: Char);
Protected | procedure ScanCurrSymbol;
Protected | procedure ScanDateTime;
Protected | procedure ScanFormat;
Protected | procedure ScanGeneral;
Protected | procedure ScanNumber;
Protected | procedure ScanQuotedText;

Properties

Public | property CurrencySymbol: String read GetCurrencySymbol;
Public | property Decimals: Byte read GetDecimals write SetDecimals;
Public | property FormatString: String read GetFormatString;
Public | property FracDenominator: Integer read GetFracDenominator;
Public | property FracInt: Integer read GetFracInt;
Public | property FracNumerator: Integer read GetFracNumerator;
Public | property NumFormat: TsNumberFormat read GetNumFormat;
Public | property ParsedSectionCount: Integer read GetParsedSectionCount;
Public | property ParsedSections[AIndex: Integer]: TsNumFormatSection read GetParsedSections;
Public | property Status: Integer read FStatus;

Description

Fields

Protected FFormatSettings: TFormatSettings;

This item has no description.

Protected FSections: TsNumFormatSections;

This item has no description.

Methods

Public constructor Create(const AFormatString: String; const AFormatSettings: TFormatSettings);

Creates a number format parser for analyzing a formatstring that has been read from a spreadsheet file.

If ALocalized is true then the formatstring contains localized decimal separator etc.

Public destructor Destroy; override;

This item has no description.

Public function GetDateTimeCode(ASection: Integer): String;

Creates a string which summarizes the date/time formats in the given section. The string contains a 'y' for a nftYear, a 'm' for a nftMonth, a 'd' for a nftDay, a 'h' for a nftHour, a 'n' for a nftMinute, a 's' for a nftSeconds, and a 'z' for a nftMilliseconds token. The order is retained. Needed for biff2

Public function IsDateTimeFormat: Boolean;

This item has no description.

Public function IsTimeFormat: Boolean;

Returns True if the format elements contain only time, no date tokens.

Protected function AnalyzeCurrency(const AValue: String): Boolean;

This item has no description.

Protected function BuildFormatString: String; virtual;

Creates a formatstring for all sections.

Note
This implementation is only valid for the fpc and Excel dialects of format string.

Protected function NextToken: Char;

This item has no description.

Protected function PrevToken: Char;

This item has no description.

Public procedure ClearAll;

This item has no description.

Public procedure LimitDecimals;

Limits the decimals to 0 or 2, as required by Excel2.

Protected procedure AddElement(AToken: TsNumFormatToken; AText: String); overload;

This item has no description.

Protected procedure AddElement(AToken: TsNumFormatToken; AFloatValue: Double); overload;

This item has no description.

Protected procedure AddElement(AToken: TsNumFormatToken; AIntValue: Integer=0; AText: String = ''); overload;

This item has no description.

Protected procedure AddSection;

This item has no description.

Protected procedure AnalyzeColor(AValue: String);

This item has no description.

Protected procedure CheckSection(ASection: Integer);

This item has no description.

Protected procedure CheckSections;

This item has no description.

Protected procedure DeleteElement(ASection, AIndex: Integer);

This item has no description.

Protected procedure FixMonthMinuteToken(var ASection: TsNumFormatSection);

Identify the ambiguous "m" token ("month" or "minute")

Protected procedure InsertElement(ASection, AIndex: Integer; AToken: TsNumFormatToken; AFloatValue: Double); overload;

This item has no description.

Protected procedure InsertElement(ASection, AIndex: Integer; AToken: TsNumFormatToken; AIntValue: Integer); overload;

This item has no description.

Protected procedure InsertElement(ASection, AIndex: Integer; AToken: TsNumFormatToken; AText: String); overload;

This item has no description.

Protected procedure Parse(const AFormatString: String);

This item has no description.

Protected procedure ScanAMPM;

Scans an AM/PM sequence (or AMPM or A/P). At exit, cursor is a next character

Protected procedure ScanAndCount(ATestChar: Char; out ACount: Integer);

Counts the number of characters equal to ATestChar. Stops at the next different character. This is also where the cursor is at exit.

Protected procedure ScanBrackets;

Extracts the text between square brackets. This can be a time duration like [hh] a condition, like [>= 2.0] a currency symbol like [$€-409] a color like [red] or [color25] The procedure is left with the cursor at ']'

Protected procedure ScanCondition(AFirstChar: Char);

Scans a condition like [>=2.0]. Starts after the "[" and ends before at "]". Returns first character after the number (spaces allowed).

Protected procedure ScanCurrSymbol;

Scans to end of a symbol like [$EUR-409], starting after the $ and ending at the "]". After the "$" follows the currency symbol, after the "-" country information

Protected procedure ScanDateTime;

Scans a date/time format. Procedure is left with the cursor at the last char of the date/time format.

Protected procedure ScanFormat;

This item has no description.

Protected procedure ScanGeneral;

Scans for the word "General", it may be used like other tokens

Protected procedure ScanNumber;

Scans a floating point format. Procedure is left with the cursor at the last character of the format.

Protected procedure ScanQuotedText;

Scans a text in quotation marks. Tries to interpret the text as a currency symbol (–> AnalyzeText). The procedure is entered and left with the cursor at a quotation mark.

Properties

Public property CurrencySymbol: String read GetCurrencySymbol;

This item has no description.

Public property Decimals: Byte read GetDecimals write SetDecimals;

This item has no description.

Public property FormatString: String read GetFormatString;

This item has no description.

Public property FracDenominator: Integer read GetFracDenominator;

This item has no description.

Public property FracInt: Integer read GetFracInt;

This item has no description.

Public property FracNumerator: Integer read GetFracNumerator;

This item has no description.

Public property NumFormat: TsNumberFormat read GetNumFormat;

This item has no description.

Public property ParsedSectionCount: Integer read GetParsedSectionCount;

This item has no description.

Public property ParsedSections[AIndex: Integer]: TsNumFormatSection read GetParsedSections;

This item has no description.

Public property Status: Integer read FStatus;

This item has no description.


fpSpreadsheet

Unit fpSpreadsheet

Description
Uses
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Constants
Variables

Description

Unit fpspreadsheet implements spreadsheet documents and their properties and methods.

AUTHORS: Felipe Monteiro de Carvalho, Reinier Olislagers, Werner Pamler

LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus distribution, for details about the license.

Overview

Classes, Interfaces, Objects and Records

Name | Description
Class TsWorksheet |
Class TsWorkbook |

Functions and Procedures

procedure CopyCellFormat(AFromCell, AToCell: PCell);
procedure CopyColFormat(AFromCol, AToCol: PCol; AFromSheet, AToSheet: TsWorksheet);
procedure CopyRowFormat(AFromRow, AToRow: PRow; AFromSheet, AToSheet: TsWorksheet);

Types

TsCellCompareEvent = procedure (Sender: TObject; ACell1, ACell2: PCell; var AResult: Integer) of object;
TsCellEvent = procedure (Sender: TObject; ARow, ACol: Cardinal) of object;
TsCellFullCompareEvent = procedure (Sender: TObject; ACell1, ACell2: PCell; ASortKey: TsSortKey; var AResult: Integer) of object;
TsColEvent = procedure (Sender: TObject; ACol: Cardinal) of object;
TsFormulaCorrection = (...);
TsNotifyEvent = procedure (Sender: TObject) of object;
TsRemoveWorksheetEvent = procedure (Sender: TObject; ASheetIndex: Integer) of object;
TsRowEvent = procedure (Sender: TObject; ARow: Cardinal) of object;
TsWorkbookEvent = procedure (Sender: TsWorkbook) of object;
TsWorkbookReadCellDataEvent = procedure(Sender: TObject; ARow, ACol: Cardinal; const ADataCell: PCell) of object;
TsWorksheetEvent = procedure (Sender: TObject; ASheet: TsWorksheet) of object;
TsWorksheetWriteCellDataEvent = procedure(Sender: TsWorksheet; ARow, ACol: Cardinal; var AValue: variant; var AStyleCell: PCell) of object;

Description

Functions and Procedures

procedure CopyCellFormat(AFromCell, AToCell: PCell);

Copies the format of a cell to another one.

Parameters
AFromCell
Pointer to the cell from which the format is to be copied
AToCell
Pointer to the cell to which the format is to be copied
procedure CopyColFormat(AFromCol, AToCol: PCol; AFromSheet, AToSheet: TsWorksheet);

This item has no description.

procedure CopyRowFormat(AFromRow, AToRow: PRow; AFromSheet, AToSheet: TsWorksheet);

This item has no description.

Types

TsCellCompareEvent = procedure (Sender: TObject; ACell1, ACell2: PCell; var AResult: Integer) of object;

This event can be used to override the built-in comparing function which is called when cells are sorted.

TsCellEvent = procedure (Sender: TObject; ARow, ACol: Cardinal) of object;

This event fires whenever a cell value or cell formatting changes. It is handled by TsWorkbookSource to update the listening visual controls.

TsCellFullCompareEvent = procedure (Sender: TObject; ACell1, ACell2: PCell; ASortKey: TsSortKey; var AResult: Integer) of object;

This event can be used to override the built-in comparing function which is called when cells are sorted.

TsColEvent = procedure (Sender: TObject; ACol: Cardinal) of object;

This event fires whenever a column width or column format changes. It is handled by TsWorkbookSource to update the listening visual controls.

TsFormulaCorrection = (...);

FSome action has an effect on existing formulas which must be corrected.

Values
  • fcWorksheetRenamed
  • fcWorksheetDeleted
TsNotifyEvent = procedure (Sender: TObject) of object;

This item has no description.

TsRemoveWorksheetEvent = procedure (Sender: TObject; ASheetIndex: Integer) of object;

Event procedure called when a worksheet is removed. ASheetIndex = -1 –> all sheets

TsRowEvent = procedure (Sender: TObject; ARow: Cardinal) of object;

This event fires whenever a row height or row format changes. It is handled by TsWorkbookSource to update the listening visual controls

TsWorkbookEvent = procedure (Sender: TsWorkbook) of object;

Event procedure containing a specific workbook

TsWorkbookReadCellDataEvent = procedure(Sender: TObject; ARow, ACol: Cardinal; const ADataCell: PCell) of object;

Event fired when reading a file in virtual mode. Read data are provided in the "ADataCell" (which is not added to the worksheet in virtual mode).

TsWorksheetEvent = procedure (Sender: TObject; ASheet: TsWorksheet) of object;

Event procedure containing a specific worksheet

TsWorksheetWriteCellDataEvent = procedure(Sender: TsWorksheet; ARow, ACol: Cardinal; var AValue: variant; var AStyleCell: PCell) of object;

Event fired when writing a file in virtual mode. The event handler has to pass data ("AValue") and formatting style to be copied from a template cell ("AStyleCell") to the writer


fpSpreadsheet: Class TsWorksheet

Class TsWorksheet

Description
Hierarchy
Fields
Methods
Properties

Unit

fpSpreadsheet

Declaration

type TsWorksheet = class(TsBasicWorksheet)

Description

The worksheet contains a list of cells and provides a variety of methods to read or write data to the cells, or to change their formatting.

Hierarchy

  • TObject
  • TsBasicWorksheet
  • TsWorksheet

Overview

Methods

Public | constructor Create;
Public | destructor Destroy; override;
Public | function AddCell(ARow, ACol: Cardinal): PCell;
Public | function AddChart(AWidth, AHeight: Double; ARow, ACol: Cardinal; AOffsetX: Double = 0.0; AOffsetY: Double = 0.0): TsChart;
Public | function AddCol(ACol: Cardinal): PCol;
Public | function AddRow(ARow: Cardinal): PRow;
Public | function BuildRPNFormula(ACell: PCell; ADestCell: PCell = nil): TsRPNFormula;
Public | function CalcAutoRowHeight(ARow: Cardinal): Single;
Public | function CalcRowHeight(ARow: Cardinal): Single;
Public | class function CellInRange(ARow, ACol: Cardinal; ARange: TsCellRange): Boolean;
Public | class function CellPosToText(ARow, ACol: Cardinal): string;
Public | function ChangeBackground(AFormatIndex: Integer; AStyle: TsFillStyle; APatternColor: TsColor = scTransparent; ABackgroundColor: TsColor = scTransparent) : Integer;
Public | function ColHidden(ACol: Cardinal): Boolean;
Public | function ConvertFormulaDialect(ACell: PCell; ADialect: TsFormulaDialect): String;
Public | function ConvertRPNFormulaToStringFormula(const AFormula: TsRPNFormula): String;
Public | function CopyCell(AFromRow, AFromCol, AToRow, AToCol: Cardinal; AFromWorksheet: TsWorksheet = nil): PCell; overload;
Public | function DefaultCompareCells(ACell1, ACell2: PCell; ASortKey: TsSortKey): Integer;
Public | function FindCell(ARow, ACol: Cardinal): PCell; overload;
Public | function FindCell(AddressStr: String): PCell; overload;
Public | function FindCol(ACol: Cardinal): PCol;
Public | function FindComment(ACell: PCell): PsComment;
Public | function FindFirstCol: PCol;
Public | function FindFirstRow: PRow;
Public | function FindHyperlink(ACell: PCell): PsHyperlink;
Public | function FindMergeBase(ACell: PCell): PCell;
Public | function FindMergedRange(ACell: PCell; out ARow1, ACol1, ARow2, ACol2: Cardinal): Boolean;
Public | function FindNextCellInCol(ARow, ACol: Cardinal): PCell;
Public | function FindNextCellInRow(ARow, ACol: Cardinal): PCell;
Public | function FindPrevCellInCol(ARow, ACol: Cardinal): PCell;
Public | function FindPrevCellInRow(ARow, ACol: Cardinal): PCell;
Public | function FindRow(ARow: Cardinal): PRow;
Public | function GetCell(ARow, ACol: Cardinal): PCell; overload;
Public | function GetCell(AddressStr: String): PCell; overload;
Public | function GetCellCount: Cardinal;
Public | function GetCellCountInCol(ACol: Cardinal): Cardinal;
Public | function GetCellCountInRow(ARow: Cardinal): Cardinal;
Public | function GetChartCount: Integer;
Public | function GetCol(ACol: Cardinal): PCol;
Public | function GetColFormatIndex(ACol: Cardinal): Integer;
Public | function GetColWidth(ACol: Cardinal): Single; overload; deprecated 'Use version with parameter AUnits.';
Public | function GetColWidth(ACol: Cardinal; AUnits: TsSizeUnits): Single; overload;
Public | function GetColWidthType(ACol: Cardinal): TsColWidthType;
Public | function GetDisplayedDecimals(ACell: PCell): Byte;
Public | function GetEffectiveCellFormatIndex(ARow, ACol: Cardinal): Integer; overload;
Public | function GetEffectiveCellFormatIndex(ACell: PCell): Integer; overload;
Public | function GetFirstColIndex(AForceCalculation: Boolean = false): Cardinal;
Public | function GetFirstRowIndex(AForceCalculation: Boolean = false): Cardinal;
Public | function GetFormula(ACell: PCell): PsFormula;
Public | function GetImage(AIndex: Integer): TsImage;
Public | function GetImageCount: Integer;
Public | function GetLastColIndex(AForceCalculation: Boolean = false): Cardinal;
Public | function GetLastColNumber: Cardinal; deprecated 'Use GetLastColIndex';
Public | function GetLastOccupiedColIndex: Cardinal;
Public | function GetLastOccupiedRowIndex: Cardinal;
Public | function GetLastRowIndex(AForceCalculation: Boolean = false): Cardinal;
Public | function GetLastRowNumber: Cardinal; deprecated 'Use GetLastRowIndex';
Public | function GetNumberFormatAttributes(ACell: PCell; out ADecimals: Byte; out ACurrencySymbol: String): Boolean;
Public | function GetPointerToEffectiveCellFormat(ARow, ACol: Cardinal): PsCellFormat;
Public | function GetPointerToImage(AIndex: Integer): PsImage;
Public | function GetRow(ARow: Cardinal): PRow;
Public | function GetRowFormatIndex(ARow: Cardinal): Integer;
Public | function GetRowHeight(ARow: Cardinal): Single; overload; deprecated 'Use version with parameter AUnits.';
Public | function GetRowHeight(ARow: Cardinal; AUnits: TsSizeUnits): Single; overload;
Public | function GetRowHeightType(ARow: Cardinal): TsRowHeightType;
Public | function GetSelection: TsCellRangeArray;
Public | function GetSelectionAsString: String;
Public | function GetSelectionCount: Integer;
Public | function GetSelectionRangeIndexOfActiveCell: Integer;
Public | function HasColFormats: Boolean;
Public | function HasComment(ACell: PCell): Boolean;
Public | function HasRowFormats: Boolean;
Public | function InSameMergedRange(ACell1, ACell2: PCell): Boolean;
Public | function IsDefaultCol(ACol: PCol): Boolean;
Public | function IsDefaultRow(ARow: PRow): Boolean;
Public | function IsEmpty: Boolean;
Public | function IsEmptyRow(ARow: Cardinal): Boolean;
Public | function IsHidden: Boolean; inline;
Public | function IsMergeBase(ACell: PCell): Boolean;
Public | function IsMerged(ACell: PCell): Boolean;
Public | function IsPageBreakCol(ACol: Cardinal): Boolean;
Public | function IsPageBreakRow(ARow: Cardinal): Boolean;
Public | function ReadAsDateTime(ACell: PCell; out AResult: TDateTime): Boolean; overload;
Public | function ReadAsDateTime(ARow, ACol: Cardinal; out AResult: TDateTime): Boolean; overload;
Public | function ReadAsNumber(ARow, ACol: Cardinal): Double; overload;
Public | function ReadAsNumber(ACell: PCell): Double; overload;
Public | function ReadAsText(ACell: PCell): string; overload;
Public | function ReadAsText(ARow, ACol: Cardinal): string; overload;
Public | function ReadAsText(ACell: PCell; AFormatSettings: TFormatSettings): string; overload;
Public | function ReadAsUTF8Text(ACell: PCell): string; overload; deprecated 'Use ReadAsText';
Public | function ReadAsUTF8Text(ACell: PCell; AFormatSettings: TFormatSettings): string; overload; deprecated 'Use ReadAsText';
Public | function ReadAsUTF8Text(ARow, ACol: Cardinal): string; overload; deprecated 'Use ReadAsText';
Public | function ReadBackground(ACell: PCell): TsFillPattern;
Public | function ReadBackgroundColor(AFormatIndex: Integer): TsColor; overload;
Public | function ReadBackgroundColor(ACell: PCell): TsColor; overload;
Public | function ReadBiDiMode(ACell: PCell): TsBiDiMode;
Public | function ReadCellBorders(ACell: PCell): TsCellBorders;
Public | function ReadCellBorderStyle(ACell: PCell; ABorder: TsCellBorder): TsCellBorderStyle;
Public | function ReadCellBorderStyles(ACell: PCell): TsCellBorderStyles;
Public | function ReadCellFont(ACell: PCell): TsFont;
Public | function ReadCellFontIndex(ACell: PCell): Integer;
Public | function ReadCellFormat(ACell: PCell): TsCellFormat;
Public | function ReadCellProtection(ACell: PCell): TsCellProtections;
Public | function ReadColFont(ACol: PCol): TsFont;
Public | function ReadComment(ACell: PCell): string; overload;
Public | function ReadComment(ARow, ACol: Cardinal): String; overload;
Public | function ReadDefaultColWidth(AUnits: TsSizeUnits): Single;
Public | function ReadDefaultRowHeight(AUnits: TsSizeUnits): Single;
Public | function ReadDoNotPrintCell(ACell: PCell): Boolean;
Public | function ReadFormula(ARow, ACol: Cardinal): String; overload;
Public | function ReadFormula(ACell: PCell): String; overload;
Public | function ReadFormulaAsString(ACell: PCell; ALocalized: Boolean = false): String;
Public | function ReadHorAlignment(ACell: PCell): TsHorAlignment;
Public | function ReadHyperlink(ACell: PCell): TsHyperlink;
Public | function ReadNumericValue(ACell: PCell; out AValue: Double): Boolean;
Public | function ReadRowFont(ARow: PRow): TsFont;
Public | function ReadTextRotation(ACell: PCell): TsTextRotation;
Public | function ReadUsedFormatting(ACell: PCell): TsUsedFormattingFields;
Public | function ReadVertAlignment(ACell: PCell): TsVertAlignment;
Public | function ReadWordwrap(ACell: PCell): boolean;
Public | function RowHidden(ARow: Cardinal): Boolean;
Public | function ValidHyperlink(AValue: String; out AErrMsg: String): Boolean;
Public | function WriteBackground(ARow, ACol: Cardinal; AStyle: TsFillStyle; APatternColor: TsColor = scTransparent; ABackgroundColor: TsColor = scTransparent): PCell; overload;
Public | function WriteBackgroundColor(ARow, ACol: Cardinal; AColor: TsColor): PCell; overload;
Public | function WriteBiDiMode(ARow, ACol: Cardinal; AValue: TsBiDiMode): PCell; overload;
Public | function WriteBlank(ARow, ACol: Cardinal; KeepFormula: Boolean = false): PCell; overload;
Public | function WriteBoolValue(ARow, ACol: Cardinal; AValue: Boolean): PCell; overload;
Public | function WriteBorderColor(ARow, ACol: Cardinal; ABorder: TsCellBorder; AColor: TsColor): PCell; overload;
Public | function WriteBorderLineStyle(ARow, ACol: Cardinal; ABorder: TsCellBorder; ALineStyle: TsLineStyle): PCell; overload;
Public | function WriteBorders(ARow, ACol: Cardinal; ABorders: TsCellBorders): PCell; overload;
Public | function WriteBorderStyle(ARow, ACol: Cardinal; ABorder: TsCellBorder; ALineStyle: TsLineStyle; AColor: TsColor): PCell; overload;
Public | function WriteBorderStyle(ARow, ACol: Cardinal; ABorder: TsCellBorder; AStyle: TsCellBorderStyle): PCell; overload;
Public | function WriteBorderStyles(ARow, ACol: Cardinal; const AStyles: TsCellBorderStyles): PCell; overload;
Public | function WriteCellProtection(ARow, ACol: Cardinal; AValue: TsCellProtections): PCell; overload;
Public | function WriteCellValueAsString(ARow, ACol: Cardinal; AValue: String): PCell; overload;
Public | function WriteCellValueAsString(ARow, ACol: Cardinal; AValue: String; const AFormatSettings: TFormatSettings): PCell; overload;
Public | function WriteChartColor(ARow, Acol: Cardinal; AColor: TsColor): PCell;
Public | function WriteColorRange(ARange: TsCellRange; AStartColor: TsColor; AStartKind: TsCFValueKind; AStartValue: Double; ACenterColor: TsColor; ACenterKind: TsCFValueKind; ACenterValue: Double; AEndColor: TsColor; AEndKind: TsCFValueKind; AEndValue: Double): Integer; overload;
Public | function WriteColorRange(ARange: TsCellRange; AStartColor, AEndColor: TsColor): Integer; overload;
Public | function WriteColorRange(ARange: TsCellRange; AStartColor, ACenterColor, AEndColor: TsColor): Integer; overload;
Public | function WriteColorRange(ARange: TsCellRange; AStartColor: TsColor; AStartKind: TsCFValueKind; AStartValue: Double; AEndColor: TsColor; AEndKind: TsCFValueKind; AEndValue: Double): Integer; overload;
Public | function WriteComment(ARow, ACol: Cardinal; AText: String): PCell; overload;
Public | function WriteConditionalCellFormat(ARange: TsCellRange; ACondition: TsCFCondition; AParam: Variant; ACellFormatIndex: Integer): Integer; overload;
Public | function WriteConditionalCellFormat(ARange: TsCellRange; ACondition: TsCFCondition; ACellFormatIndex: Integer): Integer; overload;
Public | function WriteConditionalCellFormat(ARange: TsCellRange; ACondition: TsCFCondition; AParam1, AParam2: Variant; ACellFormatIndex: Integer): Integer; overload;
Public | function WriteCurrency(ARow, ACol: Cardinal; AValue: Double; ANumFormat: TsNumberFormat; ANumFormatString: String): PCell; overload;
Public | function WriteCurrency(ARow, ACol: Cardinal; AValue: Double; ANumFormat: TsNumberFormat = nfCurrency; ADecimals: Integer = 2; ACurrencySymbol: String = '?'; APosCurrFormat: Integer = -1; ANegCurrFormat: Integer = -1): PCell; overload;
Public | function WriteDataBars(ARange: TsCellRange; ABarColor: TsColor; AStartKind: TsCFValueKind; AStartValue: Double; AEndKind: TsCFValueKind; AEndValue: Double): Integer; overload;
Public | function WriteDataBars(ARange: TsCellRange; ABarColor: TsColor): Integer; overload;
Public | function WriteDateTime(ARow, ACol: Cardinal; AValue: TDateTime; ANumFormatStr: String): PCell; overload;
Public | function WriteDateTime(ARow, ACol: Cardinal; AValue: TDateTime; ANumFormat: TsNumberFormat; ANumFormatStr: String = ''): PCell; overload;
Public | function WriteDateTime(ARow, ACol: Cardinal; AValue: TDateTime): PCell; overload;
Public | function WriteDateTimeFormat(ARow, ACol: Cardinal; ANumFormat: TsNumberFormat; const ANumFormatString: String = ''): PCell; overload;
Public | function WriteDecimals(ARow, ACol: Cardinal; ADecimals: byte): PCell; overload;
Public | function WriteDoNotPrintCell(ARow, ACol: Cardinal; AValue: boolean): PCell; overload;
Public | function WriteErrorValue(ARow, ACol: Cardinal; AValue: TsErrorValue): PCell; overload;
Public | function WriteFont(ARow, ACol: Cardinal; AFontIndex: Integer): PCell; overload;
Public | function WriteFont(ACell: PCell; const AFontName: String; AFontSize: Single; AFontStyle: TsFontStyles; AFontColor: TsColor; APosition: TsFontPosition = fpNormal): Integer; overload;
Public | function WriteFont(ARow, ACol: Cardinal; const AFontName: String; AFontSize: Single; AFontStyle: TsFontStyles; AFontColor: TsColor; APosition: TsFontPosition = fpNormal): Integer; overload;
Public | function WriteFontColor(ACell: PCell; AFontColor: TsColor): Integer; overload;
Public | function WriteFontColor(ARow, ACol: Cardinal; AFontColor: TsColor): Integer; overload;
Public | function WriteFontName(ACell: PCell; AFontName: String): Integer; overload;
Public | function WriteFontName(ARow, ACol: Cardinal; AFontName: String): Integer; overload;
Public | function WriteFontSize(ARow, ACol: Cardinal; ASize: Single): Integer; overload;
Public | function WriteFontSize(ACell: PCell; ASize: Single): Integer; overload;
Public | function WriteFontStyle(ACell: PCell; AStyle: TsFontStyles): Integer; overload;
Public | function WriteFontStyle(ARow, ACol: Cardinal; AStyle: TsFontStyles): Integer; overload;
Public | function WriteFormula(ARow, ACol: Cardinal; AFormula: String; ALocalized: Boolean = false; R1C1Mode: Boolean = false): PCell; overload;
Public | function WriteFractionFormat(ARow, ACol: Cardinal; AMixedFraction: Boolean; ANumeratorDigits, ADenominatorDigits: Integer): PCell; overload;
Public | function WriteHorAlignment(ARow, ACol: Cardinal; AValue: TsHorAlignment): PCell; overload;
Public | function WriteHyperlink(ARow, ACol: Cardinal; ATarget: String; ATooltip: String = ''): PCell; overload;
Public | function WriteIconSet(ARange: TsCellRange; AIconSet: TsCFIconSet; AValueKind1: TsCFValueKind; AValue1: Double; AValueKind2: TsCFValueKind; AValue2: Double; AValueKind3: TsCFValueKind; AValue3: Double; AValueKind4: TsCFValueKind; AValue4: Double; AHideText: Boolean = false; AReverse: Boolean = false): Integer; overload;
Public | function WriteIconSet(ARange: TsCellRange; AIconSet: TsCFIconSet; AHideText: Boolean = false; AReverse: Boolean = false): Integer; overload;
Public | function WriteIconSet(ARange: TsCellRange; AIconSet: TsCFIconSet; AValueKind1: TsCFValueKind; AValue1: Double; AValueKind2: TsCFValueKind; AValue2: Double; AHideText: Boolean = false; AReverse: Boolean = false): Integer; overload;
Public | function WriteIconSet(ARange: TsCellRange; AIconSet: TsCFIconSet; AValueKind1: TsCFValueKind; AValue1: Double; AValueKind2: TsCFValueKind; AValue2: Double; AValueKind3: TsCFValueKind; AValue3: Double; AHideText: Boolean = false; AReverse: Boolean = false): Integer; overload;
Public | function WriteImage(ARow, ACol: Cardinal; AStream: TStream; AOffsetX: Double = 0.0; AOffsetY: Double = 0.0; AScaleX: Double = 1.0; AScaleY: Double = 1.0; ASize: Int64 = -1): Integer; overload;
Public | function WriteImage(ARow, ACol: Cardinal; AFileName: String; AOffsetX: Double = 0.0; AOffsetY: Double = 0.0; AScaleX: Double = 1.0; AScaleY: Double = 1.0): Integer; overload;
Public | function WriteImage(ARow, ACol: Cardinal; AImageIndex: Integer; AOffsetX: Double = 0.0; AOffsetY: Double = 0.0; AScaleX: Double = 1.0; AScaleY: Double = 1.0): Integer; overload;
Public | function WriteNumber(ARow, ACol: Cardinal; ANumber: double; ANumFormat: TsNumberFormat; ANumFormatString: String): PCell; overload;
Public | function WriteNumber(ARow, ACol: Cardinal; ANumber: double): PCell; overload;
Public | function WriteNumber(ARow, ACol: Cardinal; ANumber: double; ANumFormat: TsNumberFormat; ADecimals: Byte = 2; AMinIntDigits: Integer = 1): PCell; overload;
Public | function WriteNumberFormat(ARow, ACol: Cardinal; ANumFormat: TsNumberFormat; ADecimals: Integer; ACurrencySymbol: String = ''; APosCurrFormat: Integer = -1; ANegCurrFormat: Integer = -1): PCell; overload;
Public | function WriteNumberFormat(ARow, ACol: Cardinal; ANumFormat: TsNumberFormat; const ANumFormatString: String = ''): PCell; overload;
Public | function WriteRPNFormula(ARow, ACol: Cardinal; AFormula: TsRPNFormula): PCell; overload;
Public | function WriteText(ARow, ACol: Cardinal; AText: String; ARichTextParams: TsRichTextParams = nil): PCell; overload;
Public | function WriteTextAsHTML(ARow, ACol: Cardinal; AText: String): PCell; overload;
Public | function WriteTextRotation(ARow, ACol: Cardinal; ARotation: TsTextRotation): PCell; overload;
Public | function WriteUsedFormatting(ARow, ACol: Cardinal; AUsedFormatting: TsUsedFormattingFields): PCell; overload;
Public | function WriteUTF8Text(ARow, ACol: Cardinal; AText: String; ARichTextParams: TsRichTextParams = nil): PCell; overload; deprecated 'Use WriteText';
Public | function WriteVertAlignment(ARow, ACol: Cardinal; AValue: TsVertAlignment): PCell; overload;
Public | function WriteWordwrap(ARow, ACol: Cardinal; AValue: boolean): PCell; overload;
Protected | function CellUsedInFormula(ARow, ACol: Cardinal): Boolean;
Protected | function DoCompareCells(AColRow1, AColRow2: Cardinal): Integer;
Protected | function RemoveCell(ARow, ACol: Cardinal): PCell;
Public | procedure AddHyperlinkToImage(AImageIndex: Integer; ATarget: String; AToolTip: String = '');
Public | procedure AddPageBreakToCol(ACol: Cardinal);
Public | procedure AddPageBreakToRow(ARow: Cardinal);
Public | procedure CalcDrawingExtent( UsePixels: Boolean; AWidth, AHeight: Double; var ARow1, ACol1: Cardinal; out ARow2, ACol2: Cardinal; ARowOffs1, AColOffs1: Double; out ARowOffs2, AColOffs2: Double; out x,y: Double);
Public | procedure CalcFormula(AFormula: PsFormula);
Public | procedure CalcFormulas;
Public | procedure CalcImageCell(AIndex: Integer; x, y, AWidth, AHeight: Double; out ARow, ACol: Cardinal; out ARowOffs, AColOffs, AScaleX, AScaleY: Double);
Public | procedure CalcImageExtent(AIndex: Integer; UsePixels: Boolean; out ARow1, ACol1, ARow2, ACol2: Cardinal; out ARowOffs1, AColOffs1, ARowOffs2, AColOffs2: Double; out x, y, AWidth, AHeight: Double);
Public | procedure CalcObjectCell(x, y, AWidth, AHeight: Double; out ARow, ACol: Cardinal; out ARowOffs, AColOffs: Double);
Public | procedure CalcSheet;
Public | procedure ChangedCell(ARow, ACol: Cardinal);
Public | procedure ChangedCol(ACol: Cardinal);
Public | procedure ChangedFont(ARow, ACol: Cardinal);
Public | procedure ChangedRow(ARow: Cardinal);
Public | procedure Clear;
Public | procedure ClearSelection;
Public | procedure CopyCell(AFromCell, AToCell: PCell); overload;
Public | procedure CopyCol(AFromCol, AToCol: Cardinal; AFromWorksheet: TsWorksheet = nil);
Public | procedure CopyFormat(AFormatCell: PCell; AToRow, AToCol: Cardinal); overload;
Public | procedure CopyFormat(AFromCell, AToCell: PCell); overload;
Public | procedure CopyFormula(AFormulaCell: PCell; AToRow, AToCol: Cardinal); overload;
Public | procedure CopyFormula(AFromCell, AToCell: PCell); overload;
Public | procedure CopyRow(AFromRow, AToRow: Cardinal; AFromWorksheet: TsWorksheet = nil);
Public | procedure CopyValue(AFromCell, AToCell: PCell); overload;
Public | procedure CopyValue(AValueCell: PCell; AToRow, AToCol: Cardinal); overload;
Public | procedure DeleteCell(ACell: PCell);
Public | procedure DeleteCol(ACol: Cardinal);
Public | procedure DeleteFormula(ACell: PCell);
Public | procedure DeleteRichTextParams(ACell: PCell);
Public | procedure DeleteRow(ARow: Cardinal);
Public | procedure DeleteSelection;
Public | procedure EraseCell(ACell: PCell; AKeepFormat: Boolean = false);
Public | procedure EraseSelection(AKeepFormat: Boolean = false);
Public | procedure Hide;
Public | procedure HideCol(ACol: Cardinal);
Public | procedure HideRow(ARow: Cardinal);
Public | procedure InsertCol(ACol: Cardinal);
Public | procedure InsertRow(ARow: Cardinal);
Public | procedure MergeCells(ARange: String); overload;
Public | procedure MergeCells(ARow1, ACol1, ARow2, ACol2: Cardinal); overload;
Public | procedure MoveCell(ACell: PCell; AToRow, AToCol: Cardinal);
Public | procedure MoveCol(AFromCol, AToCol: Cardinal);
Public | procedure MoveRow(AFromRow, AToRow: Cardinal);
Public | procedure Protect(AEnable: Boolean);
Public | procedure ReadNumFormat(ACell: PCell; out ANumFormat: TsNumberFormat; out ANumFormatStr: String);
Public | procedure RemoveAllCharts;
Public | procedure RemoveAllCols;
Public | procedure RemoveAllImages;
Public | procedure RemoveAllRows;
Public | procedure RemoveChart(AChart: TsChart);
Public | procedure RemoveCol(ACol: Cardinal);
Public | procedure RemoveComment(ACell: PCell);
Public | procedure RemoveHyperlink(ACell: PCell);
Public | procedure RemoveImage(AIndex: Integer);
Public | procedure RemovePageBreakFromCol(ACol: Cardinal);
Public | procedure RemovePageBreakFromRow(ARow: Cardinal);
Public | procedure RemoveRow(ARow: Cardinal);
Public | procedure ScrollTo(ANewTopRow, ANewLeftCol: Cardinal);
Public | procedure SelectCell(ARow, ACol: Cardinal);
Public | procedure SetSelection(const ASelection: TsCellRangeArray);
Public | procedure Show;
Public | procedure ShowCol(ACol: Cardinal);
Public | procedure ShowRow(ARow: Cardinal);
Public | procedure Sort(ASortParams: TsSortParams; ARange: String); overload;
Public | procedure Sort(const ASortParams: TsSortParams; ARowFrom, AColFrom, ARowTo, AColTo: Cardinal); overload;
Public | procedure UnmergeCells(ARange: String); overload;
Public | procedure UnmergeCells(ARow, ACol: Cardinal); overload;
Public | procedure UpdateCaches;
Public | procedure UseFormulaInCell(ACell: PCell; AFormula: PsFormula);
Public | procedure WriteBackground(ACell: PCell; AStyle: TsFillStyle; APatternColor: TsColor = scTransparent; ABackgroundColor: TsColor = scTransparent); overload;
Public | procedure WriteBackgroundColor(ACell: PCell; AColor: TsColor); overload;
Public | procedure WriteBiDiMode(ACell: PCell; AValue: TsBiDiMode); overload;
Public | procedure WriteBlank(ACell: PCell; KeepFormula: Boolean = false); overload;
Public | procedure WriteBoolValue(ACell: PCell; AValue: Boolean); overload;
Public | procedure WriteBorderColor(ACell: PCell; ABorder: TsCellBorder; AColor: TsColor); overload;
Public | procedure WriteBorderLineStyle(ACell: PCell; ABorder: TsCellBorder; ALineStyle: TsLineStyle); overload;
Public | procedure WriteBorders(ACell: PCell; ABorders: TsCellBorders); overload;
Public | procedure WriteBorderStyle(ACell: PCell; ABorder: TsCellBorder; ALineStyle: TsLineStyle; AColor: TsColor); overload;
Public | procedure WriteBorderStyle(ACell: PCell; ABorder: TsCellBorder; AStyle: TsCellBorderStyle); overload;
Public | procedure WriteBorderStyles(ACell: PCell; const AStyles: TsCellBorderStyles); overload;
Public | procedure WriteCellFormat(ACell: PCell; const ACellFormat: TsCellFormat);
Public | procedure WriteCellFormatIndex(ACell: PCell; AIndex: Integer);
Public | procedure WriteCellProtection(ACell: PCell; AValue: TsCellProtections); overload;
Public | procedure WriteCellValueAsString(ACell: PCell; AValue: String; const AFormatSettings: TFormatSettings); overload;
Public | procedure WriteCellValueAsString(ACell: PCell; AValue: String); overload;
Public | procedure WriteColFormatIndex(ACol: Cardinal; AFormatIndex: Integer);
Public | procedure WriteColInfo(ACol: Cardinal; AData: TCol);
Public | procedure WriteColWidth(ACol: Cardinal; AWidth: Single; AUnits: TsSizeUnits; AColWidthType: TsColWidthType = cwtCustom); overload;
Public | procedure WriteColWidth(ACol: Cardinal; AWidth: Single; AColWidthType: TsColWidthType = cwtCustom); overload; deprecated 'Use version with parameter AUnits';
Public | procedure WriteComment(ACell: PCell; AText: String); overload;
Public | procedure WriteCurrency(ACell: PCell; AValue: Double; ANumFormat: TsNumberFormat; ANumFormatString: String); overload;
Public | procedure WriteCurrency(ACell: PCell; AValue: Double; ANumFormat: TsNumberFormat = nfCurrency; ADecimals: Integer = -1; ACurrencySymbol: String = '?'; APosCurrFormat: Integer = -1; ANegCurrFormat: Integer = -1); overload;
Public | procedure WriteDateTime(ACell: PCell; AValue: TDateTime; ANumFormat: TsNumberFormat; ANumFormatStr: String = ''); overload;
Public | procedure WriteDateTime(ACell: PCell; AValue: TDateTime); overload;
Public | procedure WriteDateTime(ACell: PCell; AValue: TDateTime; ANumFormatStr: String); overload;
Public | procedure WriteDateTimeFormat(ACell: PCell; ANumFormat: TsNumberFormat; const ANumFormatString: String = ''); overload;
Public | procedure WriteDecimals(ACell: PCell; ADecimals: Byte); overload;
Public | procedure WriteDefaultColWidth(AValue: Single; AUnits: TsSizeUnits);
Public | procedure WriteDefaultRowHeight(AValue: Single; AUnits: TsSizeUnits);
Public | procedure WriteDoNotPrintCell(ACell: PCell; AValue: Boolean); overload;
Public | procedure WriteErrorValue(ACell: PCell; AValue: TsErrorValue); overload;
Public | procedure WriteFont(ACell: PCell; AFontIndex: Integer); overload;
Public | procedure WriteFormula(ACell: PCell; AFormula: String; ALocalized: Boolean = false; R1C1Mode: Boolean = false); overload;
Public | procedure WriteFractionFormat(ACell: PCell; AMixedFraction: Boolean; ANumeratorDigits, ADenominatorDigits: Integer); overload;
Public | procedure WriteHorAlignment(ACell: PCell; AValue: TsHorAlignment); overload;
Public | procedure WriteHyperlink(ACell: PCell; ATarget: String; ATooltip: String = ''); overload;
Public | procedure WriteNumber(ACell: PCell; ANumber: Double); overload;
Public | procedure WriteNumber(ACell: PCell; ANumber: Double; ANumFormat: TsNumberFormat; ANumFormatString: String); overload;
Public | procedure WriteNumber(ACell: PCell; ANumber: Double; ANumFormat: TsNumberFormat; ADecimals: Byte = 2; AMinIntDigits: Integer = 1); overload;
Public | procedure WriteNumberFormat(ACell: PCell; ANumFormat: TsNumberFormat; const ANumFormatString: String = ''); overload;
Public | procedure WriteNumberFormat(ACell: PCell; ANumFormat: TsNumberFormat; ADecimals: Integer; ACurrencySymbol: String = ''; APosCurrFormat: Integer = -1; ANegCurrFormat: Integer = -1); overload;
Public | procedure WriteRowFormatIndex(ARow: Cardinal; AFormatIndex: Integer);
Public | procedure WriteRowHeight(ARow: Cardinal; AHeight: Single; ARowHeightType: TsRowHeightType = rhtCustom); overload; deprecated 'Use version with parameter AUnits';
Public | procedure WriteRowHeight(ARow: Cardinal; AHeight: Single; AUnits: TsSizeUnits; ARowHeightType: TsRowHeightType = rhtCustom); overload;
Public | procedure WriteRowInfo(ARow: Cardinal; AData: TRow);
Public | procedure WriteRPNFormula(ACell: PCell; ARPNFormula: TsRPNFormula); overload;
Public | procedure WriteText(ACell: PCell; AText: String; ARichTextparams: TsRichTextParams = nil); overload;
Public | procedure WriteTextAsHTML(ACell: PCell; AText: String); overload;
Public | procedure WriteTextRotation(ACell: PCell; ARotation: TsTextRotation); overload;
Public | procedure WriteUsedFormatting(ACell: PCell; AUsedFormatting: TsUsedFormattingFields); overload;
Public | procedure WriteUTF8Text(ACell: PCell; AText: String; ARichTextparams: TsRichTextParams = nil); overload; deprecated 'Use WriteText';
Public | procedure WriteVertAlignment(ACell: PCell; AValue: TsVertAlignment); overload;
Public | procedure WriteWordwrap(ACell: PCell; AValue: boolean); overload;
Protected | procedure DeleteRowOrCol(AIndex: Integer; IsRow: Boolean);
Protected | procedure DoExchangeColRow(AIsColumn: Boolean; AIndex, WithIndex: Cardinal; AFromIndex, AToIndex: Cardinal);
Protected | procedure ExchangeCells(ARow1, ACol1, ARow2, ACol2: Cardinal);
Protected | procedure InsertRowOrCol(AIndex: Integer; IsRow: Boolean);
Protected | procedure RemoveAndFreeCell(ARow, ACol: Cardinal);
Protected | procedure SetName(const AName: String); override;

Properties

Public | property ActiveCellCol: Cardinal read FActiveCellCol;
Public | property ActiveCellRow: Cardinal read FActiveCellRow;
Public | property BiDiMode: TsBiDiMode read FBiDiMode write SetBiDiMode;
Public | property Cells: TsCells read FCells;
Public | property Cols: TIndexedAVLTree read FCols;
Public | property Comments: TsComments read FComments;
Public | property CryptoInfo: TsCryptoInfo read FCryptoInfo write FCryptoInfo;
Public | property DefinedNames: TsDefinedNames read FDefinedNames;
Public | property FormatSettings: TFormatSettings read GetFormatSettings;
Public | property Formulas: TsFormulas read FFormulas;
Public | property Hyperlinks: TsHyperlinks read FHyperlinks;
Public | property Index: Integer read GetIndex write SetIndex;
Public | property LeftCol: Cardinal read FLeftCol;
Public | property LeftPaneWidth: Integer read FLeftPaneWidth write FLeftPaneWidth;
Public | property MergedCells: TsMergedCells read FMergedCells;
Public | property OnChangeCell: TsCellEvent read FOnChangeCell write FOnChangeCell;
Public | property OnChangeCol: TsColEvent read FOnChangeCol write FOnChangeCol;
Public | property OnChangeFont: TsCellEvent read FOnChangeFont write FOnChangeFont;
Public | property OnChangeRow: TsRowEvent read FOnChangeRow write FOnChangeRow;
Public | property OnCompareCells: TsCellCompareEvent read FOnCompareCells write FOnCompareCells; deprecated 'Use OnFullCompareCells instead';
Public | property OnFullCompareCells: TsCellFullCompareEvent read FOnFullCompareCells write FOnFullCompareCells;
Public | property OnSelectCell: TsCellEvent read FOnSelectCell write FOnSelectCell;
Public | property OnWriteCellData: TsWorksheetWriteCellDataEvent read FOnWriteCellData write FOnWriteCellData;
Public | property OnZoom: TsNotifyEvent read FOnZoom write FOnZoom;
Public | property PageLayout: TsPageLayout read FPageLayout write FPageLayout;
Public | property Rows: TIndexedAVLTree read FRows;
Public | property TabColor: TsColor read FTabColor write SetTabColor default scNotDefined;
Public | property TopPaneHeight: Integer read FTopPaneHeight write FTopPaneHeight;
Public | property TopRow: Cardinal read FTopRow;
Public | property VirtualColCount: cardinal read FVirtualColCount write SetVirtualColCount;
Public | property VirtualRowCount: cardinal read FVirtualRowCount write SetVirtualRowCount;
Public | property Workbook: TsWorkbook read FWorkbook;
Public | property ZoomFactor: Double read FZoomFactor write SetZoomFactor;

Description

Methods

Public constructor Create;

Constructor of the TsWorksheet class.

Creates internal lists and initialies some internal variables.

Public destructor Destroy; override;

Destructor of the TsWorksheet class. Releases all memory, but does not delete itself from the workbook's worksheetList !!!

Note
Don't call directly. Always use Workbook.RemoveWorksheet to remove a worksheet from a workbook.

Public function AddCell(ARow, ACol: Cardinal): PCell;

Adds a new cell at a specified row and column index to the Cells list.

Note
It is not checked if another cell already exists at the same location. This case must be avoided. USE CAREFULLY WITHOUT FindCell (e.g., during reading into empty worksheets).

Parameters
ARow
The row index of the cell (zero-based)
ACol
The column index of the cell (zero-based)
Returns

Pointer to the newly created cell

See also
TCell
Public function AddChart(AWidth, AHeight: Double; ARow, ACol: Cardinal; AOffsetX: Double = 0.0; AOffsetY: Double = 0.0): TsChart;

Adds a chart to the worksheet.

Parameters
AWidth
Width of the chart, in workbook units
AHeight
Height of the chart, in workbook units
ARow
Index of the row in which the top of the chart should be positioned.
ACol
Index of the column in which the left side of the chart should be positioned.
AOffsetX
Distance of the chart's left side from the left side of column ACol, in workbook units
AOffsetY
Distance of the chart's top side from the top side of row ARow, in workbook units
Returns

The instance of the created chart

Public function AddCol(ACol: Cardinal): PCol;

Creates a new column record for the specific column index. It is not checked whether a column record already exists for this index. Dupliate records must be avoided!

Parameters
ACol
Index of the column to be added
Returns

Pointer to the column record with this column index.

Public function AddRow(ARow: Cardinal): PRow;

Creates a new row record for the specific row index. It is not checked whether a row record already exists for this index. Dupliate records must be avoided!

Parameters
ARow
Index of the row to be added
Returns

Pointer to the row record with this row index.

Public function BuildRPNFormula(ACell: PCell; ADestCell: PCell = nil): TsRPNFormula;

Helper function which constructs an rpn formula from the cell's string formula. This is needed, for example, when writing a formula to xls biff file format.

The formula is stored in ACell.

If ADestCell is not nil then the relative references are adjusted as seen from ADestCell. This means that this function returns the formula that would be created if ACell is copied to the location of ADestCell. Needed for copying formulas and for splitting shared formulas.

Public function CalcAutoRowHeight(ARow: Cardinal): Single;

Calculates the optimum height of a given row. Depends on the font size of the individual cells in the row. Is converted to workbook units.

Parameters
ARow
Index of the row to be considered
Returns

Row height in workbook units

Public function CalcRowHeight(ARow: Cardinal): Single;

This item has no description.

Public class function CellInRange(ARow, ACol: Cardinal; ARange: TsCellRange): Boolean;

Checks whether a cell given by its row and column indexes belongs to a specified rectangular cell range.

Parameters
ARow
Zero-based row index of the cell
ACol
Zero-based column index of the cell
ARange
TsCellRange record with the top/left and bottom/right cells of the rectangle to be checked.
Returns

True if the cell is inside, False if it is outside the cell range

Public class function CellPosToText(ARow, ACol: Cardinal): string;

Converts a FPSpreadsheet cell position, which is Row, Col in numbers and zero based - e.g. 0,0 - to a textual representation which is [Col][Row], where the Col is in letters and the row is in 1-based numbers - e.g. A1

Public function ChangeBackground(AFormatIndex: Integer; AStyle: TsFillStyle; APatternColor: TsColor = scTransparent; ABackgroundColor: TsColor = scTransparent) : Integer;

Modifies the background parameters of the format record stored at the specified index.

Note
When AStyle is fsSolidFill the color is defined by APatternColor, ABackgroundColor is ignored unless the APatternColor is not used (scTransparent).

Parameters
AFormatIndex
Index of the format record to be changed
AStyle
Fill style ("pattern") to be used - see TsFillStyle
APatternColor
RGB value of the pattern color
ABackgroundColor
RGB value of the background color
Returns

Index of the new format record.

Public function ColHidden(ACol: Cardinal): Boolean;

Returns whether the specified column is hidden

Public function ConvertFormulaDialect(ACell: PCell; ADialect: TsFormulaDialect): String;

This item has no description.

Public function ConvertRPNFormulaToStringFormula(const AFormula: TsRPNFormula): String;

Converts an RPN formula (as read from an xls biff file, for example) to a string formula.

Parameters
AFormula
Array of rpn formula tokens
Returns

Formula string in Excel A1 syntax (without leading "=")

Public function CopyCell(AFromRow, AFromCol, AToRow, AToCol: Cardinal; AFromWorksheet: TsWorksheet = nil): PCell; overload;

Copies a cell. The source cell can be located in a different worksheet, while the destination cell must be in the same worksheet which calls the methode.

Parameters
AFromRow
(Zero-based) row index of the source cell
AFromCol
(Zero-based) column index of the source cell
AToRow
(Zero-based) row index of the destination cell
AToCol
(Zero-based) column index of the destination cell
AFromWorksheet
Worksheet containing the source cell. Self, if omitted.
Returns

Pointer to newly created destination cell

Public function DefaultCompareCells(ACell1, ACell2: PCell; ASortKey: TsSortKey): Integer;

Compare function for sorting of rows and columns. Called by DoCompareCells.

Date/time and boolean cells are sorted like number cells according to their number value

Label cells are sorted as UTF8 strings.

In case of mixed cell content types the order is determined by the parameter Priority of the SortParams.

Empty cells are always at the end (in both ascending and descending order)

The funtion result is

  • -1 if the first cell is "smaller"

  • +1 if the first cell is "larger"

  • 0 if both cells are "equal"

Parameters
ACell1
Pointer to the first cell of the comparison
ACell2
Pointer to the second cell of the comparison
ASortKey
Sorting criteria: sorted column/row, descending, case-insensitive, numbers first, etc.
Returns

-1, 0, +1 depending on whether the first cell is "smaller", "equal" or "larger" that the second cell.

Public function FindCell(ARow, ACol: Cardinal): PCell; overload;

Tries to locate a Cell in the list of already written Cells

Parameters
ARow
The row index of the cell (zero-based)
ACol
The column index of the cell (zero-based)
Returns

Pointer to the cell if found, or nil if not found

See also
TCell
Public function FindCell(AddressStr: String): PCell; overload;

Tries to locate a cell in the list of already written cells

Parameters
AddressStr
Address of the cell in Excel A1 notation
Returns

Pointer to the cell if found, or nil if not found

See also
TCell
Public function FindCol(ACol: Cardinal): PCol;

Checks if a column record exists for the given column index and returns a pointer to the TCol record, or nil if not found

Parameters
ACol
Index of the column looked for
Returns

Pointer to the column record with this column index, or nil if not found.

Public function FindComment(ACell: PCell): PsComment;

Checks whether a cell contains a comment and returns a pointer to the comment data.

Parameters
ACell
Pointer to the cell
Returns

Pointer to the TsComment record (nil, if the cell does not have a comment)

Public function FindFirstCol: PCol;

Returns the first column record, i.e. that of the left-most column

Public function FindFirstRow: PRow;

Returns the first row record, i.e. that of the top-most row

Public function FindHyperlink(ACell: PCell): PsHyperlink;

Checks whether the specified cell contains a hyperlink and returns a pointer to the hyperlink data.

Parameters
ACell
Pointer to the cell
Returns

Pointer to the TsHyperlink record, or NIL if the cell does not contain a hyperlink.

Public function FindMergeBase(ACell: PCell): PCell;

Finds the upper left cell of a merged block to which a specified cell belongs. This is the "merge base". Returns nil if the cell is not merged.

Parameters
ACell
Cell under investigation
Returns

A pointer to the cell in the upper left corner of the merged block to which ACell belongs. If ACell is isolated then the function returns nil.

Public function FindMergedRange(ACell: PCell; out ARow1, ACol1, ARow2, ACol2: Cardinal): Boolean;

Determines the merged cell block to which a particular cell belongs

Parameters
ACell
Pointer to the cell being investigated
ARow1
(output) Top row index of the merged block
ACol1
(outout) Left column index of the merged block
ARow2
(output) Bottom row index of the merged block
ACol2
(output) Right column index of the merged block
Returns

True if the cell belongs to a merged block, False if not, or if the cell does not exist at all.

Public function FindNextCellInCol(ARow, ACol: Cardinal): PCell;

Returns the next cell in the same column as the cell in row ARow and column ACol.

Parameters
ARow
Row index of the cell at which the search is started
ACol
Column index of the cell at which the search is started
Returns

Pointer to the cell found, or nil if not found

See also
TCell
Public function FindNextCellInRow(ARow, ACol: Cardinal): PCell;

Returns the next cell in the same row as the cell in row ARow and column ACol.

Parameters
ARow
Row index of the cell at which the search is started
ACol
Column index of the cell at which the search is started
Returns

Pointer to the cell found, or nil if not found

See also
TCell
Public function FindPrevCellInCol(ARow, ACol: Cardinal): PCell;

Returns the previous cell in the same column as the cell in row ARow and column ACol.

Parameters
ARow
Row index of the cell at which the search is started
ACol
Column index of the cell at which the search is started
Returns

Pointer to the cell found, or nil if not found

See also
TCell
Public function FindPrevCellInRow(ARow, ACol: Cardinal): PCell;

Returns the next cell in the same row as the cell in row ARow and column ACol.

Parameters
ARow
Row index of the cell at which the search is started
ACol
Column index of the cell at which the search is started
Returns

Pointer to the cell found, or nil if not found)

See also
TCell
Public function FindRow(ARow: Cardinal): PRow;

Checks if a row record exists for the given row index and returns a pointer to the row record, or nil if not found

Parameters
ARow
Index of the row looked for
Returns

Pointer to the row record with this row index, or nil if not found

Public function GetCell(ARow, ACol: Cardinal): PCell; overload;

Find the cell at the specified row and column indexes.

If the cell already exists, a pointer to it will be returned.

If not, then new memory for the cell will be allocated, a pointer to it will be returned and it will be added to the list of cells.

Parameters
ARow
(Zero-based) row index of the cell
ACol
(Zero-based) column index of the cell
Returns

A pointer to the cell at the desired location.

See also
TCell
Public function GetCell(AddressStr: String): PCell; overload;

Obtains an allocated cell at the desired location.

If the Cell already exists, a pointer to it will be returned.

If not, then new memory for the cell will be allocated, a pointer to it will be returned and it will be added to the list of cells.

Parameters
AddressStr
Address of the cell in Excel A1 notation (an exception is raised in case on an invalid cell address).
Returns

A pointer to the cell at the desired location.

See also
TCell
Public function GetCellCount: Cardinal;

Returns the number of cells in the worksheet with contents.

Returns

The number of cells with contents in the worksheet

Public function GetCellCountInCol(ACol: Cardinal): Cardinal;

Counts how many cells exist in the given column. Blank cells do contribute to the sum, as well as formatted cells.

Parameters
ACol
Index of the column considered
Returns

Count of cells with value or format in this column

Public function GetCellCountInRow(ARow: Cardinal): Cardinal;

Counts how many cells exist in the given row. Blank cells do contribute to the sum, as well as formatted cell.s

Parameters
ARow
Index of the row considered
Returns

Count of cells with value or format in this row

Public function GetChartCount: Integer;

Determines the count of charts in this worksheet

Public function GetCol(ACol: Cardinal): PCol;

Checks if a column record exists for the given column index and creates it if not found.

Parameters
ACol
Index of the column looked for
Returns

Pointer to the TCol record with this column index. It can safely be assumed that this column record exists.

Public function GetColFormatIndex(ACol: Cardinal): Integer;

Returns the index to the cell format to be used for a given column. If there is no column record then the default format (index 0) is used.

Parameters
ACol
Index of the column considered
Returns

Index of the format into the workbook's FCellFormatList. This format will be used for formatting a cell if itself does not have a non-zero format index, and if there is no row format either.

Public function GetColWidth(ACol: Cardinal): Single; overload; deprecated 'Use version with parameter AUnits.';

Warning: this symbol is deprecated: Use version with parameter AUnits.

This item has no description.

Public function GetColWidth(ACol: Cardinal; AUnits: TsSizeUnits): Single; overload;

Returns the width of the given column. If there is no column record then the default column width is returned.

Parameters
ACol
Index of the column considered
AUnits
Units for the column width.
Returns

Width of the column

Public function GetColWidthType(ACol: Cardinal): TsColWidthType;

Returns the type of column width of a specific column. If there is no column record then cwtDefault is returned.

Parameters
ACol
Index of the column considered
AUnits
Units for the column width.
Returns

Width of the column. This is the "raw" value, without application of the zoom factor.

Public function GetDisplayedDecimals(ACell: PCell): Byte;

Determines the number of decimals displayed for the number in the cell

Parameters
ACell
Pointer to the cell under investigation
Returns

Number of decimals places used for the numeric string display of the cell.

Public function GetEffectiveCellFormatIndex(ARow, ACol: Cardinal): Integer; overload;

Returns the index of the effective cell format to be used at the specified cell.

"Effective" cell format means: At first, look for the cell format. If it is default, look for the row format. If it is default, look for the column format. (see "excelfileformat", p. 89)

Parameters
ARow
(Zero-based) row index of the cell
ACol
(Zero-based) column index of the cell
Returns

Index of the cell format record used by the cell into the workbook cell format list.

See also
TsCellFormat
Public function GetEffectiveCellFormatIndex(ACell: PCell): Integer; overload;

This item has no description.

Public function GetFirstColIndex(AForceCalculation: Boolean = false): Cardinal;

Returns the zero-based index of the first column with a cell with contents.

If no cells have contents, zero will be returned, which is also a valid value.

Use GetCellCount to verify if there is at least one cell with contents in the worksheet.

Parameters
AForceCalculation
The index of the first column is continuously updated whenever a new cell is created. If AForceCalculation is true all cells are scanned to determine the index of the first column.
Returns

Column index

See also
GetCellCount
Public function GetFirstRowIndex(AForceCalculation: Boolean = false): Cardinal;

Returns the zero-based index of the first row with a cell containing data or formatting.

If no cells have contents, -1 will be returned.

Parameters
AForceCalculation
The index of the first row is continuously updated whenever a new cell is created. If AForceCalculation is true all cells are scanned to determine the index of the first row.
See also
GetCellCount
Public function GetFormula(ACell: PCell): PsFormula;

Returns a pointer to the formula record assigned to a cell, or nil if the cell has no formula

Parameters
ACell
Pointer to the cell
Returns

Pointer to the formula record assigned to the cell

Public function GetImage(AIndex: Integer): TsImage;

Returns the parameters of the image stored in the internal image list at the specified index.

Parameters
AIndex
Index of the image to be retrieved
Returns

TsImage record with all image parameters.

Public function GetImageCount: Integer;

Returns the count of images that are embedded into this sheet.

Public function GetLastColIndex(AForceCalculation: Boolean = false): Cardinal;

Returns the zero-based index of the last column containing a cell with a column record (due to content or formatting), or containing a Col record.

If no cells have contents or there are no column records, zero will be returned, which is also a valid value.

Use GetCellCount to verify if there is at least one cell with contents in the worksheet.

Parameters
AForceCalculation
The index of the last column is continuously updated whenever a new cell is created. If AForceCalculation is True all cells are scanned to determine the index of the last column.
Returns

Zero-based column index

See also
GetCellCount
GetLastOccupiedColIndex
Public function GetLastColNumber: Cardinal; deprecated 'Use GetLastColIndex';

Warning: this symbol is deprecated: Use GetLastColIndex

Deprecated, use GetLastColIndex instead

See also
GetLastColIndex
Public function GetLastOccupiedColIndex: Cardinal;

Returns the 0-based index of the last column with a cell with contents. If no cells have contents, zero will be returned, which is also a valid value.

Use GetCellCount to verify if there is at least one cell with contents in the worksheet.

See also
GetCellCount
GetLastColIndex
Public function GetLastOccupiedRowIndex: Cardinal;

Returns the zero-based index of the last row with a cell with contents. If no cells have contents, zero will be returned, which is also a valid value.

Use GetCellCount to verify if there is at least one cell with contents in the worksheet.

Returns

Row index

See also
GetCellCount
GetLastRowIndex
Public function GetLastRowIndex(AForceCalculation: Boolean = false): Cardinal;

Returns the zero-based index of the last row with a cell with contents or with a ROW record.

If no cells have contents, zero will be returned, which is also a valid value.

Use GetCellCount to verify if there is at least one cell with contents in the worksheet.

Parameters
AForceCalculation
The index of the last row is continuously updated whenever a new cell is created. If AForceCalculation is true all cells are scanned to determine the index of the last row.
Returns

Row index

See also
GetCellCount
GetLastOccupiedRowIndex
Public function GetLastRowNumber: Cardinal; deprecated 'Use GetLastRowIndex';

Warning: this symbol is deprecated: Use GetLastRowIndex

Deprecated, use GetLastColIndex instead

See also
GetLastColIndex
Public function GetNumberFormatAttributes(ACell: PCell; out ADecimals: Byte; out ACurrencySymbol: String): Boolean;

Determines some number format attributes (decimal places, currency symbol) of a cell

Parameters
ACell
Pointer to the cell under investigation
ADecimals
Number of decimal places that can be extracted from the formatting string, e.g. in case of '0.000' this would be 3.
ACurrencySymbol
String representing the currency symbol extracted from the formatting string.
Returns

True if the the format string could be analyzed successfully, False if not

Public function GetPointerToEffectiveCellFormat(ARow, ACol: Cardinal): PsCellFormat;

Returns a pointer to the effective cell format to be used at the cell in ARow and ACol.

"Effective" cell format means: At first, look for the cell format. If it is default, look for the row format. If it is default, look for the column format. (see "excelfileformat", p. 89)

Parameters
ARow
(Zero-based) row index of the cell
ACol
(Zero-based) column index of the cell
Returns

Pointer to the cell format record used by the cell.

See also
TsCellFormat
Public function GetPointerToImage(AIndex: Integer): PsImage;

Returns a pointer to the image record at the specified index.

Parameters
AIndex
Index of the image to be considered.
Public function GetRow(ARow: Cardinal): PRow;

Checks if a row record exists for the given row index and creates it if not found.

Parameters
ARow
Index of the row looked for
Returns

Pointer to the row record with this row index. It can safely be assumed that this row record exists.

Public function GetRowFormatIndex(ARow: Cardinal): Integer;

Returns the index to the cell format to be used for a given row. If there is no row record then the default format (index 0) is returned.

Parameters
ARow
Index of the row considered
Returns

Index of the format into the workbook's FCellFormatList. This format will be used for formatting a cell if itself does not have a non-zero format index.

Public function GetRowHeight(ARow: Cardinal): Single; overload; deprecated 'Use version with parameter AUnits.';

Warning: this symbol is deprecated: Use version with parameter AUnits.

This item has no description.

Public function GetRowHeight(ARow: Cardinal; AUnits: TsSizeUnits): Single; overload;

Returns the height of the given row. If there is no row record then the default row height is returned

Parameters
ARow
Index of the row considered
AUnits
Units for the row height.
Returns

Height of the row. This is the "raw" value, without application of the zoom factor.

Public function GetRowHeightType(ARow: Cardinal): TsRowHeightType;

Returns the type of row height of a specific row. If there is no row record then rhtDefault is returned.

Parameters
ARow
Index of the row considered
AUnits
Units for the row height.
Returns

Height of the row. This is the "raw" value, without application of the zoom factor.

Public function GetSelection: TsCellRangeArray;

Returns the list of selected cell ranges

Public function GetSelectionAsString: String;

Returns all selection ranges as an Excel string

Public function GetSelectionCount: Integer;

Returns the number of selected cell ranges

Public function GetSelectionRangeIndexOfActiveCell: Integer;

Returns the index of the selected block which contains the active cell

Public function HasColFormats: Boolean;

Returns True if the workbook contains at least one column with an individual column format.

Public function HasComment(ACell: PCell): Boolean;

Checks whether a specific cell contains a comment

Public function HasRowFormats: Boolean;

Returns True if the workbook contains at least one row with an individual row format.

Public function InSameMergedRange(ACell1, ACell2: PCell): Boolean;

Checks whether the two specified cells belong to the same merged cell block.

Parameters
ACell1
Pointer to the first cell
ACell2
Pointer to the second cell
Returns

True if both cells belong to the same merged cell block, False if the cells are not merged or are in different blocks

Public function IsDefaultCol(ACol: PCol): Boolean;

Determines whether the properties stored in a TCol record are default values only. Such a record usually can be removed.

Public function IsDefaultRow(ARow: PRow): Boolean;

Determines whether the properties stored in a TRow record are default values only. Such a record normally can be removed.

Public function IsEmpty: Boolean;

Returns True if the worksheet does not contain any cell, column or row records

Public function IsEmptyRow(ARow: Cardinal): Boolean;

Determines whether the specified row contains any occupied cell.

Public function IsHidden: Boolean; inline;

Returns True if the worksheet is hidden

Public function IsMergeBase(ACell: PCell): Boolean;

Returns True if the specified cell is the base of a merged cell range, i.e. the upper left corner of that range.

Parameters
ACell
Pointer to the cell being considered
Returns

True if the cell is the upper left corner of a merged range, False if not

Public function IsMerged(ACell: PCell): Boolean;

Returns True if the specified cell belongs to a merged block

Parameters
ACell
Pointer to the cell of interest
Returns

True if the cell belongs to a merged block, False if not.

Public function IsPageBreakCol(ACol: Cardinal): Boolean;

Returns true if the column with the specified index is the first one after a manual page break.

Public function IsPageBreakRow(ARow: Cardinal): Boolean;

Returns true if the row with the specified index is the first one after a manual page break.

Public function ReadAsDateTime(ACell: PCell; out AResult: TDateTime): Boolean; overload;

Reads the contents of a cell and returns the date/time value of the cell.

Parameters
ACell
Pointer to the cell
AResult
Date/time value of the cell (or 0.0, if no date/time cell)
Returns

True if the cell is a datetime value, False otherwise

Public function ReadAsDateTime(ARow, ACol: Cardinal; out AResult: TDateTime): Boolean; overload;

Reads the contents of a cell and returns the date/time value of the cell.

Parameters
ARow
(Zero-based) row index of the cell
ACol
(Zero-based) column index of the cell
AResult
Date/time value of the cell (or 0.0, if no date/time cell)
Returns

True if the cell is a datetime value, False otherwise

Public function ReadAsNumber(ARow, ACol: Cardinal): Double; overload;

Returns the value of a cell as a number.

If the cell contains a date/time value its serial value is returned (as FPC TDateTime).

If the cell contains a text value it is attempted to convert it to a number.

If the cell is empty or its contents cannot be represented as a number the value 0.0 is returned.

Parameters
ARow
(Zero-based) row index of the cell
ACol
(Zero-based) column index of the cell
Returns

Floating-point value representing the cell contents, or 0.0 if cell does not exist or its contents cannot be converted to a number.

Public function ReadAsNumber(ACell: PCell): Double; overload;

Returns the value of a cell as a number.

If the cell contains a date/time value its serial value is returned (as FPC TDateTime).

If the cell contains a text value it is attempted to convert it to a number.

If the cell is empty or its contents cannot be represented as a number the value NaN is returned.

Parameters
ACell
Pointer to the cell
Returns

Floating-point value representing the cell contents, or NaN if cell does not exist or its contents cannot be converted to a number.

Public function ReadAsText(ACell: PCell): string; overload;

Reads the contents of a cell and returns an user readable text representing the contents of the cell.

The resulting string is UTF-8 encoded.

Parameters
ACell
Pointer to the cell
Returns

The text representation of the cell as string

Public function ReadAsText(ARow, ACol: Cardinal): string; overload;

Reads the contents of a cell and returns an user readable text representing the contents of the cell.

The resulting string is UTF-8 encoded.

Parameters
ARow
(Zero-based) row index of the cell
ACol
(Zero-based) column index of the cell
Returns

The text representation of the cell as string

Public function ReadAsText(ACell: PCell; AFormatSettings: TFormatSettings): string; overload;

Reads the contents of a cell and returns an user-readable text representing the contents of the cell.

The resulting string is UTF-8 encoded.

Parameters
ACell
Pointer to the cell
AFormatSettings
Format settings to be used for string conversion of numbers and date/times.
Returns

The text representation of the cell

Public function ReadAsUTF8Text(ACell: PCell): string; overload; deprecated 'Use ReadAsText';

Warning: this symbol is deprecated: Use ReadAsText

This item has no description.

Public function ReadAsUTF8Text(ACell: PCell; AFormatSettings: TFormatSettings): string; overload; deprecated 'Use ReadAsText';

Warning: this symbol is deprecated: Use ReadAsText

This item has no description.

Public function ReadAsUTF8Text(ARow, ACol: Cardinal): string; overload; deprecated 'Use ReadAsText';

Warning: this symbol is deprecated: Use ReadAsText

This item has no description.

Public function ReadBackground(ACell: PCell): TsFillPattern;

Returns the background fill pattern and colors of a cell.

Parameters
ACell
Pointer to the cell
Returns

TsFillPattern record (or EMPTY_FILL, if the cell does not have a filled background

Public function ReadBackgroundColor(AFormatIndex: Integer): TsColor; overload;

Returns the background color stored at the specified index in the format list of the workkbok.

Parameters
AFormatIndex
Index of the format record
Returns

Value containing the rgb bytes in little-endian order

Public function ReadBackgroundColor(ACell: PCell): TsColor; overload;

Returns the background color of a cell as rbg value

Parameters
ACell
Pointer to the cell
Returns

Value containing the rgb bytes in little-endian order

Public function ReadBiDiMode(ACell: PCell): TsBiDiMode;

Returns the BiDi mode of the cell (right-to-left or left-to-right)

Public function ReadCellBorders(ACell: PCell): TsCellBorders;

Determines which borders are drawn around a specific cell

Public function ReadCellBorderStyle(ACell: PCell; ABorder: TsCellBorder): TsCellBorderStyle;

Determines the style of a particular cell border

Public function ReadCellBorderStyles(ACell: PCell): TsCellBorderStyles;

Determines all border styles of a given cell

Public function ReadCellFont(ACell: PCell): TsFont;

Determines the font used by a specified cell. Returns the workbook's default font if the cell does not exist.

Public function ReadCellFontIndex(ACell: PCell): Integer;

Determines the index of the font used by a specified cell, referring to the workbooks font list. Returns 0 (the default font index) if the cell does not exist.

Public function ReadCellFormat(ACell: PCell): TsCellFormat;

Returns the format record that is assigned to a specified cell

Public function ReadCellProtection(ACell: PCell): TsCellProtections;

Returns the protection flags of the cell.

Note
These flags are active only if sheet protection is active, i.e. soProtected in Worksheet.Options.

Public function ReadColFont(ACol: PCol): TsFont;

Determines the font used in a specified column record.

Returns the workbook's default font if the column record does not exist.

Public function ReadComment(ACell: PCell): string; overload;

Returns the comment text attached to a specific cell

Parameters
ACell
Pointer to the cell
Returns

Text assigned to the cell as a comment

Public function ReadComment(ARow, ACol: Cardinal): String; overload;

Returns the comment text attached to a specific cell

Parameters
ARow
(0-based) index to the row
ACol
(0-based) index to the column
Returns

Text assigned to the cell as a comment

Public function ReadDefaultColWidth(AUnits: TsSizeUnits): Single;

Reads the value of the default column width and converts it to the specified units

Public function ReadDefaultRowHeight(AUnits: TsSizeUnits): Single;

Reads the value of the default row height and converts it to the specified units

Public function ReadDoNotPrintCell(ACell: PCell): Boolean;

Returns whether the cell is not allowed to be printed.

Public function ReadFormula(ARow, ACol: Cardinal): String; overload;

Reads the formula assigned to a cell in the specified row and column

Public function ReadFormula(ACell: PCell): String; overload;

Reads the formula assigned to a specified cell

Public function ReadFormulaAsString(ACell: PCell; ALocalized: Boolean = false): String;

If a cell contains a formula (string formula or RPN formula) the formula is returned as a string in Excel syntax.

Parameters
ACell
Pointer to the cell considered
ALocalized
If True, the formula is returned with decimal and list separators according to the workbook's FormatSettings. Otherwise it uses dot and comma, respectively.
Returns

Formula string in Excel syntax (does not contain a leading "=")

Public function ReadHorAlignment(ACell: PCell): TsHorAlignment;

Returns the horizontal alignment of a specific cell

Public function ReadHyperlink(ACell: PCell): TsHyperlink;

Reads the hyperlink information of a specified cell.

Parameters
ACell
Pointer to the cell considered
Returns

TsHyperlink record with the hyperlink data assigned to the cell. If the cell is not a hyperlink the result field Kind is hkNone.

Public function ReadNumericValue(ACell: PCell; out AValue: Double): Boolean;

Returns to numeric equivalent of the cell contents. This is the NumberValue of a number cell, the DateTimeValue of a date/time cell, the ordinal BoolValue of a boolean cell, or the string converted to a number of a string cell. All other cases return NaN.

Parameters
ACell
Pointer to cell to be considered
AValue
(output) extracted numeric value
Returns

True if conversion to number is successful, otherwise False

Public function ReadRowFont(ARow: PRow): TsFont;

Determines the font used in a specified row record.

Returns the workbook's default font if the row record does not exist.

Public function ReadTextRotation(ACell: PCell): TsTextRotation;

Returns the text orientation of a specific cell

Public function ReadUsedFormatting(ACell: PCell): TsUsedFormattingFields;

Reads the set of used formatting fields of a cell.

Each cell contains a set of "used formatting fields". Formatting is applied only if the corresponding element is contained in the set.

Parameters
ACell
Pointer to the cell
Returns

Set of elements used in formatting the cell

Public function ReadVertAlignment(ACell: PCell): TsVertAlignment;

Returns the vertical alignment of a specific cell

Public function ReadWordwrap(ACell: PCell): boolean;

Returns whether a specific cell support word-wrapping.

Public function RowHidden(ARow: Cardinal): Boolean;

Returns whether the specified row is hidden

Public function ValidHyperlink(AValue: String; out AErrMsg: String): Boolean;

Checks whether the passed string represents a valid hyperlink target

The string must either be

  • a fully qualified URI,

  • a local relative (!) file name, or

  • a # followed by a cell address in the current workbook

Parameters
AValue
String to be checked.
AErrMsg
Error message in case that the string is not correct.
Returns

True if the string is correct, False otherwise

Public function WriteBackground(ARow, ACol: Cardinal; AStyle: TsFillStyle; APatternColor: TsColor = scTransparent; ABackgroundColor: TsColor = scTransparent): PCell; overload;

Defines a background pattern for a cell

Note
When AStyle is fsSolidFill the color is defined by APatternColor, ABackgroundColor is ignored unless the APatternColor is not used (scTransparent).
Note
Is replaced by uniform fill if WriteBackgroundColor is called later.

Parameters
ARow
Row index of the cell
ACol
Column index of the cell
AFillStyle
Fill style to be used - see TsFillStyle
APatternColor
RGB value of the pattern color
ABackgroundColor
RGB value of the background color
Returns

Pointer to cell

Public function WriteBackgroundColor(ARow, ACol: Cardinal; AColor: TsColor): PCell; overload;

Sets a uniform background color of a cell.

Parameters
ARow
Row index of the cell
ACol
Column index of the cell
AColor
RGB value of the new background color. Use the value "scTransparent" to clear an existing background color.
Returns

Pointer to cell

Public function WriteBiDiMode(ARow, ACol: Cardinal; AValue: TsBiDiMode): PCell; overload;

This item has no description.

Public function WriteBlank(ARow, ACol: Cardinal; KeepFormula: Boolean = false): PCell; overload;

Writes an empty cell

Note
Empty cells are useful when, for example, a border line extends along a range of cells including empty cells.

Parameters
ARow
The row of the cell
ACol
The column of the cell
KeepFormula
Does not erase the formula. Off by default because it would be very confusing if the formula had a non-blank result.
Returns

Pointer to the cell

Public function WriteBoolValue(ARow, ACol: Cardinal; AValue: Boolean): PCell; overload;

Writes a boolean cell

Parameters
ARow
The row of the cell
ACol
The column of the cell
AValue
The boolean value
Returns

Pointer to the cell

Public function WriteBorderColor(ARow, ACol: Cardinal; ABorder: TsCellBorder; AColor: TsColor): PCell; overload;

Sets the color of a cell border line. Note: the border must be included in Borders set in order to be shown!

Parameters
ARow
Row index of the cell
ACol
Column index of the cell
ABorder
Indicates to which border (left/top etc) this color is to be applied
AColor
RGB value of the new border color
Returns

Pointer to cell

Public function WriteBorderLineStyle(ARow, ACol: Cardinal; ABorder: TsCellBorder; ALineStyle: TsLineStyle): PCell; overload;

Sets the linestyle of a cell border. Note: the border must be included in the "Borders" set in order to be shown!

Parameters
ARow
Row index of the cell
ACol
Column index of the cell
ABorder
Indicates to which border (left/top etc) this color is to be applied
ALineStyle
Identifier of the new line style to be applied.
Returns

Pointer to cell

See also
TsLineStyle
Public function WriteBorders(ARow, ACol: Cardinal; ABorders: TsCellBorders): PCell; overload;

Shows the cell borders included in the set ABorders. No border lines are drawn for those not included.

The borders are drawn using the "BorderStyles" assigned to the cell.

Parameters
ARow
Row index of the cell
ACol
Column index of the cell
ABorders
Set with elements to identify the border(s) to will be shown
Returns

Pointer to cell

See also
TsCellBorder
Public function WriteBorderStyle(ARow, ACol: Cardinal; ABorder: TsCellBorder; ALineStyle: TsLineStyle; AColor: TsColor): PCell; overload;

Sets line style and line color of a cell border. Note: the border must be included in the "Borders" set in order to be shown!

Parameters
ARow
Row index of the considered cell
ACol
Column index of the considered cell
ABorder
Identifier of the border to be modified
ALineStyle
Identifier for the new line style of the border
AColor
RGB value of the border line color
Returns

Pointer to cell

See also
WriteBorderStyles
Public function WriteBorderStyle(ARow, ACol: Cardinal; ABorder: TsCellBorder; AStyle: TsCellBorderStyle): PCell; overload;

Sets the style of a cell border, i.e. line style and line color. Note: the border must be included in the "Borders" set in order to be shown!

Parameters
ARow
Row index of the cell considered
ACol
Column index of the cell considered
ABorder
Identifies the border to be modified (left/top/right/bottom)
AStyle
TsCellBorderStyle record with parameters controlling how the border line is drawn (line style, line color)
Returns

Pointer to cell

Public function WriteBorderStyles(ARow, ACol: Cardinal; const AStyles: TsCellBorderStyles): PCell; overload;

Sets the style of all cell border of a cell, i.e. line style and line color. Note: Only those borders included in the "Borders" set are shown!

Parameters
ARow
Row index of the considered cell
ACol
Column index of the considered cell
AStyles
Array of CellBorderStyle records for each cell border.
Returns

Pointer to cell

See also
WriteBorderStyle
Public function WriteCellProtection(ARow, ACol: Cardinal; AValue: TsCellProtections): PCell; overload;

Defines how the cell at the specified row and column is protected: lock cell modification and/or hide formulas. Note that this is activated only after enabling worksheet protection (worksheet.Protect(true)).

Note
FPSpreadsheet does not enforce these actions. They are only written to the file for the Office application.

Public function WriteCellValueAsString(ARow, ACol: Cardinal; AValue: String): PCell; overload;

Writes data defined as a string into a cell. Depending on the structure of the string, the worksheet tries to guess whether it is a number, a date/time or a text and calls the corresponding writing method.

Parameters
ARow
Row index of the cell
ACol
Column index of the cell
AValue
Value to be written into the cell given as a string. Depending on the structure of the string, however, the value is written as a number, a date/time or a text.
Returns

Pointer to the cell

Public function WriteCellValueAsString(ARow, ACol: Cardinal; AValue: String; const AFormatSettings: TFormatSettings): PCell; overload;

Writes data defined as a string into a cell. Depending on the structure of the string, the worksheet tries to guess whether it is a number, a date/time or a text and calls the corresponding writing method.

Parameters
ARow
Row index of the cell
ACol
Column index of the cell
AValue
Value to be written into the cell given as a string. Depending on the structure of the string, however, the value is written as a number, a date/time or a text.
AFormatSettings
FormatSettings record used for conversion of strings with date/time, numbers etc.
Returns

Pointer to the cell

Public function WriteChartColor(ARow, Acol: Cardinal; AColor: TsColor): PCell;

Writes an rgb color value as number to the specified cell. As requested by the chart module the bytes for red and blue are exchanged.

Public function WriteColorRange(ARange: TsCellRange; AStartColor: TsColor; AStartKind: TsCFValueKind; AStartValue: Double; ACenterColor: TsColor; ACenterKind: TsCFValueKind; ACenterValue: Double; AEndColor: TsColor; AEndKind: TsCFValueKind; AEndValue: Double): Integer; overload;

Writes the conditional format "color range"

Writes the conditional format "color range": The cell background in the specified cell range is painted in colors according to the cell values.

The 3-color background color gradient begins at the cell value AStartValue with the AStartColor and is valid for the cells fulfilling the condition AStartKind. The ACenterColor is an intermediate color for the cell(s) fulfilling the condition ACenterKind when their value is equal to ACenterValue. The gradient ends at the cell value AEndValue with AEndColor for the cells fulfilling the condition AEndKind.

Parameters
ARange
Range of the cells to be formatted
AStartColor
First color of the background color gradient
AStartKind
Condition for the cell(s) to be painted in AStartColor
AStartValue
Value to be used in the AStartKind condition
ACenterColor
Intermediate color of the background color gradient
ACenterKind
Condition for the cell(s) to be painted in ACenterColor
ACenterValue
Value to be used in the ACenterKind condition
AEndColor
Last color of the background color gradient
AEndKind
Conditions for the cell(s) to be painted in AEndColor
AEndValue
Value to be used in the AEndKind condition
See also
TsCFValueKind
Public function WriteColorRange(ARange: TsCellRange; AStartColor, AEndColor: TsColor): Integer; overload;

Writes the conditional format "color range": The cell background in the specified cell range is painted in colors according to the cell values.

The colors are varied between the given start color (at the miniumum cell value) and end color (at the maximum cell value).

Parameters
ARange
Range of the cells to be formatted
AStartColor
Start color of the gradient of cell background colors corresponding to the minimum cell value in the given cell range.
AEndColor
End color of the gradient of cell background colors corresponding to the maximum cell value in the given cell range.
Public function WriteColorRange(ARange: TsCellRange; AStartColor, ACenterColor, AEndColor: TsColor): Integer; overload;

Writes the conditional format "color range": The cell background in the specified cell range is painted in colors according to the cell values.

The 3-color gradient varies between the given start color (at the minimum cell value), the center color (at the median value) and the end color (at the maximum cell value).

Parameters
ARange
Range of the cells to be formatted
AStartColor
Start color of the background color gradient corresponding to the minimum cell value in the given cell range.
ACenterColor
Intermediate color, corresponding to the median of the cell values.
AEndColor
End color, corresponding to the maximum cell value.
Public function WriteColorRange(ARange: TsCellRange; AStartColor: TsColor; AStartKind: TsCFValueKind; AStartValue: Double; AEndColor: TsColor; AEndKind: TsCFValueKind; AEndValue: Double): Integer; overload;

Writes the conditional format "color range": The cell background in the specified cell range is painted in colors according to the cell values.

The 2-color background color gradient begins at the cell value AStartValue with the AStartColor and is valid for the cells fulfilling the condition AStartKind. The gradient ends at the cell value AEndValue with AEndColor for the cells fulfilling the condition AEndKind.

Parameters
ARange
Range of the cells to be formatted
AStartColor
First color of the background color gradient
AStartKind
Condition for the cell(s) to be painted in AStartColor
AStartValue
Value to be used in the AStartKind condition
AEndColor
Last color of the background color gradient
AEndKind
Conditions for the cell(s) to be painted in AEndColor
AEndValue
Value to be used in the AEndKind condition
See also
TsCFValueKind
Public function WriteComment(ARow, ACol: Cardinal; AText: String): PCell; overload;

Adds a comment to a specific cell

Parameters
ARow
(0-based) row index of the cell
ACol
(0-based) column index of the cell
AText
Comment text
Returns

Pointer to the cell containing the comment

Public function WriteConditionalCellFormat(ARange: TsCellRange; ACondition: TsCFCondition; AParam: Variant; ACellFormatIndex: Integer): Integer; overload;

Creates a conditional format item for the cells given by ARange. The condition specified must require one parameter, e.g. cfcEqual, and the parameter must be specified as AParam. The format is primarily stored in the worksheet's ConditionalFormats list, but the format index is also stored in the cell's ConditionalFormatIndex list. Returns the index of the conditional format in the workbook's CF list.

Public function WriteConditionalCellFormat(ARange: TsCellRange; ACondition: TsCFCondition; ACellFormatIndex: Integer): Integer; overload;

Creates a conditional format item for the cells given by ARange. The condition specified here must not require parameters, e.g. cfcEmpty The format is primarily stored in the worksheet's ConditionalFormats list, but the format index is also stored in the cell's ConditionalFormatIndex list. Returns the index of the conditional format in the workbook's CF list.

Public function WriteConditionalCellFormat(ARange: TsCellRange; ACondition: TsCFCondition; AParam1, AParam2: Variant; ACellFormatIndex: Integer): Integer; overload;

Creates a conditional format item for the cells given by ARange. The condition specified must requored two parameters, e.g. cfcBetween, and the parameters must be specified as AParam1 and AParam2. The format is primarily stored in the worksheet's ConditionalFormats list, but the format index is also stored in the cell's ConditionalFormatIndex list. Returns the index of the conditional format in the workbook's CF list.

Public function WriteCurrency(ARow, ACol: Cardinal; AValue: Double; ANumFormat: TsNumberFormat; ANumFormatString: String): PCell; overload;

Writes a currency value to a given cell. Its number format is specified by means of a format string.

Parameters
ARow
Cell row index
ACol
Cell column index
AValue
Number value to be written
ANumFormat
Format identifier, must be nfCurrency or nfCurrencyRed.
ANumFormatString
String of formatting codes, including currency symbol. Can contain sections for different formatting of positive and negative number. Example: '"EUR" #,##0.00;("EUR" #,##0.00)'
Returns

Pointer to the cell

Public function WriteCurrency(ARow, ACol: Cardinal; AValue: Double; ANumFormat: TsNumberFormat = nfCurrency; ADecimals: Integer = 2; ACurrencySymbol: String = '?'; APosCurrFormat: Integer = -1; ANegCurrFormat: Integer = -1): PCell; overload;

Writes a currency value to a given cell. Its number format can be provided optionally by specifying various parameters.

Parameters
ARow
Cell row index
ACol
Cell column index
AValue
Number value to be written
ANumFormat
Format identifier, must be nfCurrency, or nfCurrencyRed.
ADecimals
Number of decimal places
APosCurrFormat
Code specifying the order of value, currency symbol and spaces (see pcfXXXX constants)
ANegCurrFormat
Code specifying the order of value, currency symbol, spaces, and how negative values are shown (see ncfXXXX constants)
ACurrencySymbol
String to be shown as currency, such as '$', or 'EUR'. In case of '?' the currency symbol defined in the workbook's FormatSettings is used.
Returns

Pointer to the cell

Public function WriteDataBars(ARange: TsCellRange; ABarColor: TsColor; AStartKind: TsCFValueKind; AStartValue: Double; AEndKind: TsCFValueKind; AEndValue: Double): Integer; overload;

Writes the conditional format "data bars" in which the cell values are illustrated graphically as horizontal bars.

Parameters
ARange
Range of the cells to be formatted
ABarColor
Color of the bars
AStartKind
Condition to be met for the cell(s) at which the bar starts
AStartValue
Value to be used for comparison in AStartKind
AEndKind
Condition to be met for the cell(s) at which the bar ends
AEndValue
Value to be used for comparison in AEndKind
Public function WriteDataBars(ARange: TsCellRange; ABarColor: TsColor): Integer; overload;

Writes the conditional format "data bars" in which the cell values are illustrated graphically as horizontal bars.

Parameters
ARange
Range of the cells to be formatted
ABarColor
Color of the bars
Public function WriteDateTime(ARow, ACol: Cardinal; AValue: TDateTime; ANumFormatStr: String): PCell; overload;

Writes a date/time value to a cell

Note
At least Excel xls does not recognize a separate datetime cell type: a datetime is stored as a (floating point) number, and the cell is formatted as a date (either built-in or a custom format).

Parameters
ARow
The row index of the cell
ACol
The column index of the cell
AValue
The date/time/datetime to be written
ANumFormatStr
Format string (the format identifier nfCustom is used to classify the format).
Returns

Pointer to the cell

Public function WriteDateTime(ARow, ACol: Cardinal; AValue: TDateTime; ANumFormat: TsNumberFormat; ANumFormatStr: String = ''): PCell; overload;

Writes a date/time value to a cell

Note
At least Excel xls does not recognize a separate datetime cell type: a datetime is stored as a (floating point) number, and the cell is formatted as a date (either built-in or a custom format).

Parameters
ARow
The row of the cell
ACol
The column of the cell
AValue
The date/time/datetime to be written
ANumFormat
The format specifier, e.g. nfShortDate (optional). If not specified format is not changed.
ANumFormatStr
Format string, used only for nfCustom or nfTimeInterval.
Returns

Pointer to the cell

Public function WriteDateTime(ARow, ACol: Cardinal; AValue: TDateTime): PCell; overload;

Writes a date/time value to a cell, does not change number format

Parameters
ARow
The row of the cell
ACol
The column of the cell
AValue
The date/time/datetime to be written
Returns

Pointer to the cell

Public function WriteDateTimeFormat(ARow, ACol: Cardinal; ANumFormat: TsNumberFormat; const ANumFormatString: String = ''): PCell; overload;

Adds a date/time format to the formatting of a cell

Parameters
ARow
The row index of the cell (zero-based)
ACol
The column index of the cell (zero-based)
ANumFormat
Identifier of the format to be applied (nfXXXX constant)
ANumFormatString
Optional string of formatting codes. Is only considered if ANumberFormat is nfCustom.
Returns

Pointer to the cell

See also
TsNumberFormat
Public function WriteDecimals(ARow, ACol: Cardinal; ADecimals: byte): PCell; overload;

Formats the number in a cell to show a given count of decimal places. Is ignored for non-decimal formats (such as most date/time formats).

Parameters
ARow
Row index of the cell considered (zero-based)
ACol
Column index of the cell considered (zero-based)
ADecimals
Number of decimal places to be displayed
Returns

Pointer to the cell

See also
TsNumberFormat
Public function WriteDoNotPrintCell(ARow, ACol: Cardinal; AValue: boolean): PCell; overload;

This item has no description.

Public function WriteErrorValue(ARow, ACol: Cardinal; AValue: TsErrorValue): PCell; overload;

Writes an error value to a cell.

Parameters
ARow
The row of the cell
ACol
The column of the cell
AValue
The error code value
Returns

Pointer to the cell

See also
TsErrorValue
Public function WriteFont(ARow, ACol: Cardinal; AFontIndex: Integer): PCell; overload;

Applies a font to the formatting of a cell. The font is determined by its index in the workbook's font list:

Parameters
ARow
The row of the cell
ACol
The column of the cell
AFontIndex
Index of the font in the workbook's font list
Returns

Pointer to the cell

Public function WriteFont(ACell: PCell; const AFontName: String; AFontSize: Single; AFontStyle: TsFontStyles; AFontColor: TsColor; APosition: TsFontPosition = fpNormal): Integer; overload;

Adds font specification to the formatting of a cell. Looks in the workbook's FontList and creates an new entry if the font is not used so far. Returns the index of the font in the font list.

Parameters
ACell
Pointer to the cell considered
AFontName
Name of the font
AFontSize
Size of the font, in points
AFontStyle
Set with font style attributes (don't use those of unit "graphics" !)
AFontColor
RGB value of the font's color
APosition
Specified subscript or superscript text.
Returns

Index of the font in the workbook's font list.

Public function WriteFont(ARow, ACol: Cardinal; const AFontName: String; AFontSize: Single; AFontStyle: TsFontStyles; AFontColor: TsColor; APosition: TsFontPosition = fpNormal): Integer; overload;

Adds font specification to the formatting of a cell. Looks in the workbook's FontList and creates an new entry if the font is not used so far. Returns the index of the font in the font list.

Parameters
ARow
The row of the cell
ACol
The column of the cell
AFontName
Name of the font
AFontSize
Size of the font, in points
AFontStyle
Set with font style attributes (don't use those of unit "graphics" !)
AFontColor
RGB value of the font's color
APosition
Specifies sub- or superscript text
Returns

Index of the font in the workbook's font list.

Public function WriteFontColor(ACell: PCell; AFontColor: TsColor): Integer; overload;

Replaces the text color used in formatting of a cell. Looks in the workbook's font list if this modified font has already been used. If not a new font entry is created. Returns the index of this font in the font list.

Parameters
ACell
Pointer to the cell
AFontColor
RGB value of the new text color
Returns

Index of the font in the workbook's font list.

Public function WriteFontColor(ARow, ACol: Cardinal; AFontColor: TsColor): Integer; overload;

Replaces the text color used in formatting of a cell. Looks in the workbook's font list if this modified font has already been used. If not a new font entry is created. Returns the index of this font in the font list.

Parameters
ARow
The row of the cell
ACol
The column of the cell
AFontColor
RGB value of the new text color
Returns

Index of the font in the workbook's font list.

Public function WriteFontName(ACell: PCell; AFontName: String): Integer; overload;

Replaces the font used in formatting of a cell considering only the font face and leaving font size, style and color unchanged. Looks in the workbook's font list if this modified font has already been used. If not a new font entry is created. Returns the index of this font in the font list.

Parameters
ACell
Pointer to the cell
AFontName
Name of the new font to be used
Returns

Index of the font in the workbook's font list.

Public function WriteFontName(ARow, ACol: Cardinal; AFontName: String): Integer; overload;

Replaces the font used in formatting of a cell considering only the font face and leaving font size, style and color unchanged. Looks in the workbook's font list if this modified font has already been used. If not a new font entry is created. Returns the index of this font in the font list.

Parameters
ARow
The row of the cell
ACol
The column of the cell
AFontName
Name of the new font to be used
Returns

Index of the font in the workbook's font list.

Public function WriteFontSize(ARow, ACol: Cardinal; ASize: Single): Integer; overload;

Replaces the font size in formatting of a cell. Looks in the workbook's font list if this modified font has already been used. If not a new font entry is created. Returns the index of this font in the font list.

Parameters
ARow
The row of the cell
ACol
The column of the cell
ASize
Size of the font to be used (in points).
Returns

Index of the font in the workbook's font list.

Public function WriteFontSize(ACell: PCell; ASize: Single): Integer; overload;

Replaces the font size in formatting of a cell. Looks in the workbook's font list if this modified font has already been used. If not a new font entry is created. Returns the index of this font in the font list.

Parameters
ACell
Pointer to the cell
ASize
Size of the font to be used (in points).
Returns

Index of the font in the workbook's font list.

Public function WriteFontStyle(ACell: PCell; AStyle: TsFontStyles): Integer; overload;

Replaces the font style (bold, italic, etc) in formatting of a cell. Looks in the workbook's font list if this modified font has already been used. If not a new font entry is created. Returns the index of this font in the font list.

Parameters
ACell
Pointer to the cell considered
AStyle
New font style to be used
Returns

Index of the font in the workbook's font list.

See also
TsFontStyle
Public function WriteFontStyle(ARow, ACol: Cardinal; AStyle: TsFontStyles): Integer; overload;

Replaces the font style (bold, italic, etc) in formatting of a cell. Looks in the workbook's font list if this modified font has already been used. If not a new font entry is created. Returns the index of this font in the font list.

Parameters
ARow
The row of the cell
ACol
The column of the cell
AStyle
New font style to be used
Returns

Index of the font in the workbook's font list.

See also
TsFontStyle
Public function WriteFormula(ARow, ACol: Cardinal; AFormula: String; ALocalized: Boolean = false; R1C1Mode: Boolean = false): PCell; overload;

Writes a formula to a given cell

Parameters
ARow
The row of the cell
ACol
The column of the cell
AFormula
The formula string to be written. A leading "=" will be removed.
ALocalized
If True, the formula is expected to have decimal and list separators of the workbook's FormatSettings. Otherwise uses dot and comma, respectively.
R1C1Mode
If True, the formula is expected to contain cell references in Excel's "R1C1" notation; otherwise "A1" references are expected.
Returns

Pointer to the cell

Public function WriteFractionFormat(ARow, ACol: Cardinal; AMixedFraction: Boolean; ANumeratorDigits, ADenominatorDigits: Integer): PCell; overload;

Formats a number as a fraction

Parameters
ARow
Row index of the cell
ACol
Column index of the cell
ANumFormat
Identifier of the format to be applied. Must be either nfFraction or nfMixedFraction
ANumeratorDigts
Count of numerator digits
ADenominatorDigits
Count of denominator digits
Returns

Pointer to the cell

See also
TsNumberFormat
Public function WriteHorAlignment(ARow, ACol: Cardinal; AValue: TsHorAlignment): PCell; overload;

Defines the horizontal alignment of text in a cell.

Parameters
ARow
Row index of the cell considered
ACol
Column index of the cell considered
AValue
Parameter for horizontal text alignment (haDefault, vaLeft, haCenter, haRight). By default, texts are left-aligned, numbers and dates are right-aligned.
Returns

Pointer to cell

Public function WriteHyperlink(ARow, ACol: Cardinal; ATarget: String; ATooltip: String = ''): PCell; overload;

Assigns a hyperlink to the cell at the specified row and column Cell content is not affected by the presence of a hyperlink.

Parameters
ARow
Row index of the cell considered
ACol
Column index of the cell considered
ATarget
Hyperlink address given as a fully qualitifed URI for external links, or as a # followed by a cell address for internal links.
ATooltip
Text for popup tooltip hint used by Excel
Returns

Pointer to the cell with the hyperlink

Public function WriteIconSet(ARange: TsCellRange; AIconSet: TsCFIconSet; AValueKind1: TsCFValueKind; AValue1: Double; AValueKind2: TsCFValueKind; AValue2: Double; AValueKind3: TsCFValueKind; AValue3: Double; AValueKind4: TsCFValueKind; AValue4: Double; AHideText: Boolean = false; AReverse: Boolean = false): Integer; overload;

Writes the conditional format "icon set" in which cell values are illustrated by means of five icons.

Parameters
ARange
Range of the cells to be formatted
AIconSet
Selection of the icon set to be used.
AValueKind1
Condition for the cell values to be displayed with the first icon in the icon set
AValue1
Value to be compared with in the AValueKind1 condition
AValueKind2
Condition for the cell values to be displayed with the second icon in the icon set
AValue2
Value to be compared with in the AValueKind2 condition
AValueKind3
Condition for the cell values to be displayed with the third icon in the icon set
AValue3
Value to be compared with in the AValueKind3 condition
AValueKind4
Condition for the cell values to be displayed with the fourth icon in the icon set
AValue4
Value to be compared with in the AValueKind4 condition
AHideText
Hides the normal cell text
AReverse
Icons are assigned in reverse order.
See also
TsCFIconSet
TsCFValueKind
Public function WriteIconSet(ARange: TsCellRange; AIconSet: TsCFIconSet; AHideText: Boolean = false; AReverse: Boolean = false): Integer; overload;

Writes the conditional format "icon set" in which cell values are illustrated by means of icons.

Parameters
ARange
Range of the cells to be formatted
AIconSet
Selection of the icon set to be used.
AHideText
Hides the normal cell text
AReverse
Icons are assigned in reverse order.
See also
TsCFIconSet
Public function WriteIconSet(ARange: TsCellRange; AIconSet: TsCFIconSet; AValueKind1: TsCFValueKind; AValue1: Double; AValueKind2: TsCFValueKind; AValue2: Double; AHideText: Boolean = false; AReverse: Boolean = false): Integer; overload;

Writes the conditional format "icon set" in which cell values are illustrated by means of three icons.

Parameters
ARange
Range of the cells to be formatted
AIconSet
Selection of the icon set to be used.
AValueKind1
Condition for the cell values to be displayed with the first icon in the icon set
AValue1
Value to be compared with in the AValueKind1 condition
AValueKind2
Condition for the cell values to be displayed with the second icon in the icon set
AValue2
Value to be compared with in the AValueKind2 condition
AHideText
Hides the normal cell text
AReverse
Icons are assigned in reverse order.
See also
TsCFIconSet
TsCFValueKind
Public function WriteIconSet(ARange: TsCellRange; AIconSet: TsCFIconSet; AValueKind1: TsCFValueKind; AValue1: Double; AValueKind2: TsCFValueKind; AValue2: Double; AValueKind3: TsCFValueKind; AValue3: Double; AHideText: Boolean = false; AReverse: Boolean = false): Integer; overload;

Writes the conditional format "icon set" in which cell values are illustrated by means of four icons.

Parameters
ARange
Range of the cells to be formatted
AIconSet
Selection of the icon set to be used.
AValueKind1
Condition for the cell values to be displayed with the first icon in the icon set
AValue1
Value to be compared with in the AValueKind1 condition
AValueKind2
Condition for the cell values to be displayed with the second icon in the icon set
AValue2
Value to be compared with in the AValueKind2 condition
AValueKind3
Condition for the cell values to be displayed with the third icon in the icon set
AValue3
Value to be compared with in the AValueKind3 condition
AHideText
Hides the normal cell text
AReverse
Icons are assigned in reverse order.
See also
TsCFIconSet
TsCFValueKind
Public function WriteImage(ARow, ACol: Cardinal; AStream: TStream; AOffsetX: Double = 0.0; AOffsetY: Double = 0.0; AScaleX: Double = 1.0; AScaleY: Double = 1.0; ASize: Int64 = -1): Integer; overload;

Adds an embedded image to the worksheet. The image passed in a stream.

Parameters
ARow
Index of the row at which the image begins (top edge)
ACol
Index of the column at which the image begins (left edge)
AStream
Stream which contains the image data
AOffsetX
The image is offset horizontally from the left edge of the anchor cell. May reach into another cell. Value is in workbook units.
AOffsetY
The image is offset vertically from the top edge of the anchor cell. May reach into another cell. Value is in workbook units.
AScaleX
Horizontal scaling factor of the image
AScaleY
Vertical scaling factor of the image
ASize
Number ob bytes to be read from the input stream.
Returns

Index into the internal image list.

Public function WriteImage(ARow, ACol: Cardinal; AFileName: String; AOffsetX: Double = 0.0; AOffsetY: Double = 0.0; AScaleX: Double = 1.0; AScaleY: Double = 1.0): Integer; overload;

Adds an embedded image to the worksheet

Parameters
ARow
Index of the row at which the image begins (top edge)
ACol
Index of the column at which the image begins (left edge)
AFileName
Name of the image file
AOffsetX
The image is offset horizontally from the left edge of the anchor cell. May reach into another cell. Value is in workbook units.
AOffsetY
The image is offset vertically from the top edge of the anchor cell. May reach into another cell. Value is in workbook units.
AScaleX
Horizontal scaling factor of the image
AScaleY
Vertical scaling factor of the image
Returns

Index into the internal image list.

Public function WriteImage(ARow, ACol: Cardinal; AImageIndex: Integer; AOffsetX: Double = 0.0; AOffsetY: Double = 0.0; AScaleX: Double = 1.0; AScaleY: Double = 1.0): Integer; overload;

This item has no description.

Public function WriteNumber(ARow, ACol: Cardinal; ANumber: double; ANumFormat: TsNumberFormat; ANumFormatString: String): PCell; overload;

Writes a floating point number to the cell and uses a custom number format specified by the format string. Note that fpspreadsheet may not be able to detect the formatting when reading the file.

Parameters
ARow
Cell row index
ACol
Cell column index
ANumber
Number to be written
ANumFormat
Format identifier (nfCustom)
ANumFormatString
String of formatting codes (such as 'dd/mmm'
Returns

Pointer to cell created or used

Public function WriteNumber(ARow, ACol: Cardinal; ANumber: double): PCell; overload;

Writes a floating-point number to a cell, does not change the number format

Parameters
ARow
Cell row index
ACol
Cell column index
ANumber
Number to be written
Returns

Pointer to cell created or used

Public function WriteNumber(ARow, ACol: Cardinal; ANumber: double; ANumFormat: TsNumberFormat; ADecimals: Byte = 2; AMinIntDigits: Integer = 1): PCell; overload;

Writes a floating-point number to a cell

Parameters
ARow
Cell row index
ACol
Cell column index
ANumber
Number to be written
ANumFormat
Identifier for a built-in number format, e.g. nfFixed (optional)
ADecimals
Number of decimal places used for formatting (optional)
AMinIntDigits
Minimum count of digits before the decimal separator
Returns

Pointer to cell created or used

See also
TsNumberFormat
Public function WriteNumberFormat(ARow, ACol: Cardinal; ANumFormat: TsNumberFormat; ADecimals: Integer; ACurrencySymbol: String = ''; APosCurrFormat: Integer = -1; ANegCurrFormat: Integer = -1): PCell; overload;

Adds a number format to the formatting of a cell

Parameters
ARow
The row of the cell
ACol
The column of the cell
ANumFormat
Identifier of the format to be applied
ANumFormatString
Optional string of formatting codes. Is only considered if ANumberFormat is nfCustom.
Returns

Pointer to the cell

See also
TsNumberFormat
Public function WriteNumberFormat(ARow, ACol: Cardinal; ANumFormat: TsNumberFormat; const ANumFormatString: String = ''): PCell; overload;

Adds a number format to the formatting of a cell

Parameters
ARow
The row of the cell
ACol
The column of the cell
ANumFormat
Identifier of the format to be applied
ADecimals
Number of decimal places
ACurrencySymbol
optional currency symbol in case of nfCurrency
APosCurrFormat
optional identifier for positive currencies
ANegCurrFormat
optional identifier for negative currencies
Returns

Pointer to the cell

See also
TsNumberFormat
Public function WriteRPNFormula(ARow, ACol: Cardinal; AFormula: TsRPNFormula): PCell; overload;

Writes an RPN formula to a cell. An RPN formula is an array of tokens describing the calculation to be performed.

Parameters
ARow
Row indows of the cell considered
ACol
Column index of the cell
AFormula
Array of TsFormulaElement records. The array can be created by using "CreateRPNFormla".
Returns

Pointer to the cell

See also
TsNumberFormat
TsFormulaElement
CreateRPNFormula
Public function WriteText(ARow, ACol: Cardinal; AText: String; ARichTextParams: TsRichTextParams = nil): PCell; overload;

Writes UTF-8 encoded text to a cell.

On file formats that don't support unicode, the text will be converted to ISO Latin 1.

Parameters
ARow
The row of the cell
ACol
The column of the cell
AText
The text to be written encoded in utf-8
ARichTextParams
Array of formatting instructions for characters or groups of characters (see TsRichTextParam).
Returns

Pointer to cell created or used

See also
TsRichTextParams
TsRichTextParam
Public function WriteTextAsHTML(ARow, ACol: Cardinal; AText: String): PCell; overload;

Writes text containing HTML codes to a cell. Here are the allowed HTML codes:

<b>, <strong>  ... bold text

<i>, <em> ........ italic text

<u>, <ins> ....... underlined text

<s>, <del> ....... strike-out text

<sub> ............ subscript

<sup> ............ superscript

<font tags> ...... full font selection. "tags" can be:
                     face="..." ... font name
                     size="..." ... font size, in pt, em, px, %. Add units!
                     color="..." .. font color, e.g. red, or #FF0000.

Parameters
ARow
The row of the cell
ACol
The column of the cell
AText
The text containing the html codes
Returns

Pointer to cell created or used

See also
TsRichTextParams
TsRichTextParam
Public function WriteTextRotation(ARow, ACol: Cardinal; ARotation: TsTextRotation): PCell; overload;

Adds text rotation to the formatting of a cell

Parameters
ARow
The row of the cell
ACol
The column of the cell
ARotation
How to rotate the text
Returns

Pointer to cell

See also
TsTextRotation
Public function WriteUsedFormatting(ARow, ACol: Cardinal; AUsedFormatting: TsUsedFormattingFields): PCell; overload;

Directly modifies the used formatting fields of a cell. Only formatting corresponding to items included in this set is executed.

Parameters
ARow
The row of the cell
ACol
The column of the cell
AUsedFormatting
set of the used formatting fields
Returns

Pointer to the (existing or created) cell

See also
TsUsedFormattingFields
TCell
Public function WriteUTF8Text(ARow, ACol: Cardinal; AText: String; ARichTextParams: TsRichTextParams = nil): PCell; overload; deprecated 'Use WriteText';

Warning: this symbol is deprecated: Use WriteText

This item has no description.

Public function WriteVertAlignment(ARow, ACol: Cardinal; AValue: TsVertAlignment): PCell; overload;

Defines the vertical alignment of text in a cell.

Parameters
ARow
Row index of the cell considered
ACol
Column index of the cell considered
AValue
Parameter for vertical text alignment (vaDefault, vaTop, vaCenter, vaBottom). By default, texts are bottom-aligned.
Returns

Pointer to cell

Public function WriteWordwrap(ARow, ACol: Cardinal; AValue: boolean): PCell; overload;

Enables or disables the word-wrapping feature for a cell.

Parameters
ARow
Row index of the cell considered
ACol
Column index of the cell considered
AValue
True = word-wrapping enabled, False = disabled.
Returns

Pointer to cell

Protected function CellUsedInFormula(ARow, ACol: Cardinal): Boolean;

Checks entire worksheet, whether this cell is used by any formula.

Parameters
ARow
(Zero-based) row index of the cell considered
ACol
(Zero-based) column index of the cell considered
Returns

True if the cell is used by a formula, False if not

Protected function DoCompareCells(AColRow1, AColRow2: Cardinal): Integer;

Compare function for sorting of rows and columns called directly by Sort() The compare algorithm starts with the first key parameters. If cells are found to be "equal" the next parameter is set is used until a difference is found, or all parameters are used.

The funtion result is

  • -1 if the first cell is "smaller" –> the first cell is sorted before the second cell

  • +1 if the first cell is "larger" –> the first cell is sorted behind the second cell

  • 0 if both cells are "equal"

Parameters
ARow1
(Zero-based) row index of the first cell to be compared
ACol1
(Zero-based) column index of the first cell to be compared
ARow2
(Zero-based) row index of the second cell to be compared
ACol2
(Zero-based) column index of the second cell to be compared
ASortOptions
Sorting options: case-insensitive and/or descending
Returns

-1, 0, +1 depending on whether the first cell is "smaller", "equal" or "larger" that the second cell.

Protected function RemoveCell(ARow, ACol: Cardinal): PCell;

Removes a cell from its tree container. DOES NOT RELEASE ITS MEMORY!

Parameters
ARow
Row index of the cell to be removed
ACol
Column index of the cell to be removed
Returns

Pointer to the cell removed

Public procedure AddHyperlinkToImage(AImageIndex: Integer; ATarget: String; AToolTip: String = '');

Assigns a hyperlink to an image. The image is specified by its index in the internal image list

Parameters
AImageIndex
Specifies the index of the image in the internal image list.
ATarget
Link target
AToolTip
Optional text to be displayed as mouse-over popup
Public procedure AddPageBreakToCol(ACol: Cardinal);

Sets the PageBreak flag for the column record with the specified column index. This means that, when printed, a page break will occur before this column. Note that FPS currently does not support printing by itself.

Public procedure AddPageBreakToRow(ARow: Cardinal);

Sets the PageBreak flag for the row record with the specified row index. This means that, when printed, a page break will occur before this row.

Note that FPS currently does not support printing by itself.

Public procedure CalcDrawingExtent( UsePixels: Boolean; AWidth, AHeight: Double; var ARow1, ACol1: Cardinal; out ARow2, ACol2: Cardinal; ARowOffs1, AColOffs1: Double; out ARowOffs2, AColOffs2: Double; out x,y: Double);

Calculates the extent of an image or chart (in Excel-speak: a "drawing")

All dimensions are in workbook units

Parameters
UsePixels
If True then pixels are used for calculation - this improves the display of images in Excel
AWidth
Width of the drawing
AHeight
Height of the drawing
ARow1
Index of the row containing the top edge of the drawing
ACol1
Index of the column containing the left edege of the drawing
ARow2
Index of the row containing the right edge of the drawing
ACol2
Index of the column containing the bottom edge of the drawing
ARowOffs1
Distance between the top edge of drawing and row 1
AColOffs1
Distance between the left edge of drawing and column 1
ARowOffs2
Distance between the bottom edge of drawing and top of row 2
AColOffs2
Distance between the right edge of drawing and left of col 2
x
Absolute coordinate of left edge of the drawing
y
Absolute coordinate of top edge of the drawing
Public procedure CalcFormula(AFormula: PsFormula);

Calculates the provided formula

Should not be called by itself because the result may depend on other formulas which may have not yet been calculated. It is better to call CalcFormulas instead.

Parameters
AFormula
Formula to be calculated. The formula belongs to the cell specified by the formula's Row and Col parameters.
Public procedure CalcFormulas;

Calculates all formulas of the workbook

Must be used when the formulas in the workbook contain references to other sheets. If this is not the case the faster "CalcSheet" can be used.

Public procedure CalcImageCell(AIndex: Integer; x, y, AWidth, AHeight: Double; out ARow, ACol: Cardinal; out ARowOffs, AColOffs, AScaleX, AScaleY: Double);

Calculates the position of the image with given index relative to the cell containing the top/left corner of the image.

Parameters
x
worksheet-relative coordinate of the left image edge, in workbook units
y
worksheet-relative coordinate of the top image edge, in workbook units
ARow
Index of the row containing the top/left corner of the image
ACol
Index of the column containing the top/left corner of the image
ARowOffset
Distance, in workbook units, between top cell and image borders
AColOffset
Distance, in workbook units, between left cell and image borders
AScaleX
Scaling factor for the image width
AScaleY
Scaling factor for the image height
Public procedure CalcImageExtent(AIndex: Integer; UsePixels: Boolean; out ARow1, ACol1, ARow2, ACol2: Cardinal; out ARowOffs1, AColOffs1, ARowOffs2, AColOffs2: Double; out x, y, AWidth, AHeight: Double);

Calculates image extent

All dimensions are in workbook units

Parameters
AIndex
Index of the image into the worksheet's image list
UsePixels
If True then pixels are used for calculation - this improves the display of the images in Excel
ARow1
Index of the row containing the top edge of the image
ACol1
Index of the column containing the left edege of the image
ARow2
Index of the row containing the right edge of the image
ACol2
Index of the column containing the bottom edge of the image
ARowOffs1
Distance between the top edge of image and row 1
AColOffs1
Distance between the left edge of image and column 1
ARowOffs2
Distance between the bottom edge of image and top of row 2
AColOffs2
Distance between the right edge of image and left of col 2
x
Absolute coordinate of left edge of image
y
Absolute coordinate of top edge of image
AWidth
Width of the image
AHeight
Height of the image
Public procedure CalcObjectCell(x, y, AWidth, AHeight: Double; out ARow, ACol: Cardinal; out ARowOffs, AColOffs: Double);

This item has no description.

Public procedure CalcSheet;

Calculates all formulas of the worksheet

Since formulas may reference not-yet-calculated cells, this occurs in two steps:

  1. All formulas are marked as "not calculated".

  2. Formulas are calculated. If formulas in referenced are found as being "not calculated" they are calculated and then tagged as "calculated".

This results in an iterative calculation procedure. In the end, all formulas are calculated.

Note
IF THE WORKSHEET CONTAINS CELLS WHICH LINK TO OTHER WORKSHEETS THEN THIS CALCULATION MAY NOT BE CORRECT. USE THE METHOD CalcFormulas OF THE WORKBOOK INSTEAD !!!

Public procedure ChangedCell(ARow, ACol: Cardinal);

Is called whenever a cell value or formatting has changed. Fires an event "OnChangeCell". This is handled by TsWorksheetGrid to update the grid cell.

Parameters
ARow
(Zero-based) row index of the cell which has been changed
ACol
(Zero-based) column index of the cell which has been changed
Public procedure ChangedCol(ACol: Cardinal);

Is called whenever a column width or column format has changed. Fires an event "OnChangedCol" which is handled by TsWorkbookSource

Parameters
ACol
(Zero-based) index of the column which as changed
Public procedure ChangedFont(ARow, ACol: Cardinal);

Is called whenever a font height changes. Fires an even "OnChangeFont" which is handled by TsWorksheetGrid to update the row heights.

Parameters
ARow
(Zero-based) row index of the cell for which the font height has changed
ACol
(Zero-based) column index of the cell for which the font height has changed.
Public procedure ChangedRow(ARow: Cardinal);

Is called whenever a row height or row format has changed. Fires an event "OnChangedRow" which is handled by TsWorkbookSource

Parameters
Row
(Zero-based) index of the row which as changed
Public procedure Clear;

This item has no description.

Public procedure ClearSelection;

Clears the list of seleccted cell ranges Only needed by the visual controls.

Public procedure CopyCell(AFromCell, AToCell: PCell); overload;

Copies a cell to a cell at another location. The new cell has the same values and the same formatting. It differs in formula (adapted relative references) and col/row indexes.

Both cells can be in different worksheets.

Parameters
AFromCell
Pointer to the source cell which will be copied
AToCell
Pointer to the destination cell
Public procedure CopyCol(AFromCol, AToCol: Cardinal; AFromWorksheet: TsWorksheet = nil);

Copies a column record to another location. The new column has the same colwidth and the same formatting.

Parameters
AFromCol
(Zero-based) index of the column to be copied
AToCol
(Zero-based) index of the destination column
AFromWorksheet
Worksheet from which the column record is copied. If not specified the current worksheet is used.
Public procedure CopyFormat(AFormatCell: PCell; AToRow, AToCol: Cardinal); overload;

Copies all format parameters from a given cell to another cell identified by its row/column indexes.

Parameters
AFormatCell
Pointer to the source cell from which the format is copied.
AToRow
(Zero-basec) row index of the destination cell
AToCol
(Zero-based) column index of the destination cell
Public procedure CopyFormat(AFromCell, AToCell: PCell); overload;

Copies all format parameters from the format cell to another cell.

Parameters
AFromCell
Pointer to source cell
AToCell
Pointer to destination cell
Public procedure CopyFormula(AFormulaCell: PCell; AToRow, AToCol: Cardinal); overload;

Copies the formula of a specified cell to another cell given by its row and column index. Relative cell references are adapted to the new cell.

Parameters
AFormatCell
Pointer to the source cell containing the formula to be copied
AToRow
(Zero-based) row index of the destination cell
AToCol
(Zero-based) column index of the destination cell
Public procedure CopyFormula(AFromCell, AToCell: PCell); overload;

Copies the formula of a specified cell to another cell. Adapts relative cell references to the new cell.

Parameters
AFromCell
Pointer to the source cell from which the formula is to be copied
AToCell
Pointer to the destination cell
Public procedure CopyRow(AFromRow, AToRow: Cardinal; AFromWorksheet: TsWorksheet = nil);

Copies a row record to another location. The new row has the same row height and the same formatting.

Parameters
AFromRow
(Zero-based) index of the row to be copied
AToTow
(Zero-based) index of the destination row
AFromWorksheet
Worksheet from which the row record is to be copied
Public procedure CopyValue(AFromCell, AToCell: PCell); overload;

Copies the value of a specified cell to another cell (without copying formulas or formats)

Parameters
AFromCell
Pointer to the source cell providing the value to be copied
AToCell
Pointer to the destination cell
Public procedure CopyValue(AValueCell: PCell; AToRow, AToCol: Cardinal); overload;

Copies the value of a specified cell to another cell given by its row and column index

Parameters
AValueCell
Pointer to the cell containing the value to be copied
AToRow
(Zero-based) row index of the destination cell
AToCol
(Zero-based) column index of the destination cell
Public procedure DeleteCell(ACell: PCell);

Deletes a specified cell. If the cell belongs to a merged block its content and formatting is erased. Otherwise the cell is destroyed and its memory is released.

Parameters
ACell
Pointer to the cell to be deleted
Public procedure DeleteCol(ACol: Cardinal);

Deletes the column at the index specified. Cells with greader column indexes are moved one column to the left. Merged cell blocks and cell references in formulas are considered as well.

Parameters
ACol
Index of the column to be deleted
Public procedure DeleteFormula(ACell: PCell);

Deletes the formula assigned to the specified cell

Public procedure DeleteRichTextParams(ACell: PCell);

Removes any previously assigned richtext parameters from a specific cell. This action fully restores the font of the cell.

Public procedure DeleteRow(ARow: Cardinal);

Deletes the row at the index specified. Cells with greater row indexes are moved one row up. Merged cell blocks and cell references in formulas are considered as well.

Parameters
ARow
Index of the row to be deleted
Public procedure DeleteSelection;

Deletes all selected cells (delete = make them empty)

Public procedure EraseCell(ACell: PCell; AKeepFormat: Boolean = false);

Erases content and formatting of a cell. The cell still occupies memory.

Parameters
ACell
Pointer to cell to be erased.
AKeepFormat
Optional parameter to avoid deletion of any existing cell format.
Public procedure EraseSelection(AKeepFormat: Boolean = false);

Erases all selected cells (erase = keep cell, but delete content) If AKeepFormat is true the cell format is left unchanged.

Public procedure Hide;

Hides the worksheet. Makes sure that the last worksheet cannot be hidden. Notifies visual controls

Public procedure HideCol(ACol: Cardinal);

Hides the specified column

Public procedure HideRow(ARow: Cardinal);

Hides the specified row

Public procedure InsertCol(ACol: Cardinal);

Inserts a column BEFORE the column index specified. Cells with greater column indexes are moved one row to the right. Merged cell blocks and cell references in formulas are considered as well.

Parameters
ACol
Index of the column before which a new column is inserted.
Public procedure InsertRow(ARow: Cardinal);

Inserts a row BEFORE the row specified. Cells with greater row indexes are moved one row down. Merged cell blocks and cell references in formulas are considered as well.

Parameters
ARow
Index of the row before which a new row is inserted.
Public procedure MergeCells(ARange: String); overload;

Merges adjacent individual cells to a larger single cell

Parameters
ARange
Cell range string given in Excel notation (e.g: A1:D5). A non-range string (e.g. A1) is not allowed.
Public procedure MergeCells(ARow1, ACol1, ARow2, ACol2: Cardinal); overload;

Merges adjacent individual cells to a larger single cell

Parameters
ARow1
Row index of the upper left corner of the cell range
ACol1
Column index of the upper left corner of the cell range
ARow2
Row index of the lower right corner of the cell range
ACol2
Column index of the lower right corner of the cell range
Public procedure MoveCell(ACell: PCell; AToRow, AToCol: Cardinal);

Moves a cell to a different location.

All additional data (comments, format, hyperlinks, formulas) are moved to the new location. If the old location was referenced by a formula then the formula is adjusted so that it points to the new location, however, only if the formula references a single cell, not a cell range.

Parameters
ACell
Cell to be moved
AToRow
Row index of the new location
AToCol
Column index of the new location
Public procedure MoveCol(AFromCol, AToCol: Cardinal);

Moves a column from a specified column index to another column index. The operation includes everything associated with the column (cell values, cell properties, formats, formulas, column formats, column widths). Formulas are automatically adjusted for the new position.

Public procedure MoveRow(AFromRow, AToRow: Cardinal);

Moves a row from a specified row index to another row index. The operation includes everything associated with the row (cell values, cell properties, formats, formulas, column formats, column widths). Formulas are automatically adjusted for the new position.

Public procedure Protect(AEnable: Boolean);

Enables (or disables) protection of the worksheet. Details of protection are specified in the set of Sheetprotection options

Public procedure ReadNumFormat(ACell: PCell; out ANumFormat: TsNumberFormat; out ANumFormatStr: String);

Returns the number format type and format string used in a specific cell

Parameters
ACell
Pointer to the cell of interest
ANumFormat
Number format record to be used in this cell.
ANumFormatStr
Number format string to be used in this cell.
Public procedure RemoveAllCharts;

Destroys all charts from the worksheet and removes them from the workbook's internal FCharts list.

Public procedure RemoveAllCols;

Removes all column records from the worksheet and frees the occupied memory.

Note
Cells are retained.

Public procedure RemoveAllImages;

Removes all image from the internal image list. The image streams (stored by the workbook), however, are retained because images may also be used as header/footer images.

Public procedure RemoveAllRows;

Removes all row records from the worksheet and frees the occupied memory.

Note
Cells are retained.

Public procedure RemoveChart(AChart: TsChart);

Removes the specified chart from the worksheet, destroys it and removes it from the workbook's internal FCharts list.

Public procedure RemoveCol(ACol: Cardinal);

Removes a specified column record from the worksheet and frees the occupied memory. This resets its column width and format to default.

Note
Cells in that column are retained.

Public procedure RemoveComment(ACell: PCell);

Removes the comment from a cell and releases the memory occupied by the node.

Public procedure RemoveHyperlink(ACell: PCell);

Removes a hyperlink from the specified cell. Releaes memory occupied by the associated TsHyperlink record. Cell content type is converted to cctUTF8String.

Public procedure RemoveImage(AIndex: Integer);

Removes an image from the internal image list. The image is identified by its index. The image stream (stored by the workbook) is retained.

Public procedure RemovePageBreakFromCol(ACol: Cardinal);

Removes the PageBreak flag for the column record with the specified column index. This means that, during printing, page break handling of this column will be automatic.

Note that FPS currently does not support printing by itself.

Public procedure RemovePageBreakFromRow(ARow: Cardinal);

Removes the PageBreak flag for the row record with the specified row index. This means that, during printing, page break handling of this row will be automatic.

Note that FPS currently does not support printing by itself.

Public procedure RemoveRow(ARow: Cardinal);

Removes a specified row record from the worksheet and frees the occupied memory. This resets the its row height to default.

Note
Cells in that row are retained.

Public procedure ScrollTo(ANewTopRow, ANewLeftCol: Cardinal);

Uses the passed parameters a TopRow and LeftCol. These are used by the TsWorksheetGrid to scroll the visible grid such that the corresponding cell is at the top/left.

Public procedure SelectCell(ARow, ACol: Cardinal);

Marks a specified cell as "selected". Only needed by the visual controls.

Public procedure SetSelection(const ASelection: TsCellRangeArray);

Marks an array of cell ranges as "selected". Only needed for visual controls

Public procedure Show;

Shows the worksheet if is was previously hidden Useful for visual controls

Public procedure ShowCol(ACol: Cardinal);

Shows the specified column which was hidden previously

Public procedure ShowRow(ARow: Cardinal);

Shows the specified row which was hidden previously

Public procedure Sort(ASortParams: TsSortParams; ARange: String); overload;

Sorts a range of cells defined by the cell rectangle from ARowFrom/AColFrom to ARowTo/AColTo according to the parameters specified in ASortParams

Parameters
ASortParams
Set of parameters to define sorting along rows or colums, the sorting key column or row indexes, and the sorting directions
ARowFrom
Top row of the range to be sorted
AColFrom
Left column of the range to be sorted
ARowTo
Last row of the range to be sorted
AColTo
Right column of the range to be sorted
Public procedure Sort(const ASortParams: TsSortParams; ARowFrom, AColFrom, ARowTo, AColTo: Cardinal); overload;

Sorts a range of cells defined by the cell rectangle from ARowFrom/AColFrom to ARowTo/AColTo according to the parameters specified in ASortParams

Parameters
ASortParams
Set of parameters to define sorting along rows or colums, the sorting key column or row indexes, and the sorting directions
ARange
Cell range to be sorted, in Excel notation, such as 'A1:C8'
Public procedure UnmergeCells(ARange: String); overload;

Disconnects merged cells to make them individual cells again.

Parameters
ARange
Cell (range) string given in Excel notation (e.g: A1, or A1:D5). In case of a range string, only the upper left corner cell is considered. It must belong to the merged range of cells to be unmerged.
Public procedure UnmergeCells(ARow, ACol: Cardinal); overload;

Disconnects merged cells to make them individual cells again.

Input parameter is a cell which belongs to the range to be unmerged.

Parameters
ARow
Row index of a cell considered to belong to the cell block
ACol
Column index of a cell considered to belong to the cell block
Public procedure UpdateCaches;

Helper method to update internal caching variables

Public procedure UseFormulaInCell(ACell: PCell; AFormula: PsFormula);

Uses a formula in the specified a cell

Public procedure WriteBackground(ACell: PCell; AStyle: TsFillStyle; APatternColor: TsColor = scTransparent; ABackgroundColor: TsColor = scTransparent); overload;

Defines a background pattern for a cell

Note
When AStyle is fsSolidFill the color is defined by APatternColor, ABackgroundColor is ignored unless the APatternColor is not used (scTransparent).
Note
Is replaced by uniform fill if WriteBackgroundColor is called later.

Parameters
ACell
Pointer to the cell
AStyle
Fill style ("pattern") to be used - see TsFillStyle
APatternColor
RGB value of the pattern color
ABackgroundColor
RGB value of the background color
Public procedure WriteBackgroundColor(ACell: PCell; AColor: TsColor); overload;

Sets a uniform background color of a cell.

Parameters
ACell
Pointer to cell
AColor
RGB value of the new background color. Use the value "scTransparent" to clear an existing background color.
Public procedure WriteBiDiMode(ACell: PCell; AValue: TsBiDiMode); overload;

This item has no description.

Public procedure WriteBlank(ACell: PCell; KeepFormula: Boolean = false); overload;

Writes an empty cell

Note
Empty cells are useful when, for example, a border line extends along a range of cells including empty cells.

Parameters
ACel
Pointer to the cell
KeepFormula
Does not erase the formula. Off by default because it would be very confusing if the formula had a non-blank result.
Public procedure WriteBoolValue(ACell: PCell; AValue: Boolean); overload;

Writes a boolean cell

Parameters
ACell
Pointer to the cell
AValue
The boolean value
Public procedure WriteBorderColor(ACell: PCell; ABorder: TsCellBorder; AColor: TsColor); overload;

Sets the color of a cell border line. Note: the border must be included in Borders set in order to be shown!

Parameters
ACell
Pointer to cell
ABorder
Indicates to which border (left/top etc) this color is to be applied
AColor
RGB value of the new border color
Public procedure WriteBorderLineStyle(ACell: PCell; ABorder: TsCellBorder; ALineStyle: TsLineStyle); overload;

Sets the linestyle of a cell border. Note: the border must be included in the "Borders" set in order to be shown!

Parameters
ACell
Pointer to cell
ABorder
Indicates to which border (left/top etc) this color is to be applied
ALineStyle
Identifier of the new line style to be applied.
See also
TsLineStyle
Public procedure WriteBorders(ACell: PCell; ABorders: TsCellBorders); overload;

Shows the cell borders included in the set ABorders. No border lines are drawn for those not included.

The borders are drawn using the "BorderStyles" assigned to the cell.

Parameters
ACell
Pointer to cell
ABorders
Set with elements to identify the border(s) to will be shown
See also
TsCellBorder
Public procedure WriteBorderStyle(ACell: PCell; ABorder: TsCellBorder; ALineStyle: TsLineStyle; AColor: TsColor); overload;

Sets line style and line color of a cell border. Note: the border must be included in the "Borders" set in order to be shown!

Parameters
ACell
Pointer to cell
ABorder
Identifier of the border to be modified
ALineStyle
Identifier for the new line style of the border
AColor
RGB value of the color of the border line
See also
WriteBorderStyles
Public procedure WriteBorderStyle(ACell: PCell; ABorder: TsCellBorder; AStyle: TsCellBorderStyle); overload;

Sets the style of a cell border, i.e. line style and line color. Note: the border must be included in the "Borders" set in order to be shown!

Parameters
ACell
Pointer to cell
ABorder
Identifies the border to be modified (left/top/right/bottom)
AStyle
TsCellBorderStyle record with parameters controlling how the border line is drawn (line style, line color)
Public procedure WriteBorderStyles(ACell: PCell; const AStyles: TsCellBorderStyles); overload;

Sets the style of all cell border of a cell, i.e. line style and line color. Note: Only those borders included in the "Borders" set are shown!

Parameters
ACell
Pointer to cell
ACol
Column index of the considered cell
AStyles
Array of CellBorderStyle records for each cell border.
See also
WriteBorderStyle
Public procedure WriteCellFormat(ACell: PCell; const ACellFormat: TsCellFormat);

Assigns a complete cell format record to a cell

Parameters
ACell
Pointer to the cell to be modified
ACellFormat
Cell format record to be used by the cell
See also
TsCellFormat
Public procedure WriteCellFormatIndex(ACell: PCell; AIndex: Integer);

Formats a cell to the cell format stored at the specified index in the workbook's cell format list.

Parameters
ACell
Pointer to the cell to be formatted
AIndex
Index of the cell format record to be used by the cell
See also
TsCellFormat
Public procedure WriteCellProtection(ACell: PCell; AValue: TsCellProtections); overload;

Defines how the specified cell is protected: lock cell modification and/or hide formulas. Note that this is activated only after enabling worksheet protection (worksheet.Protect(true)).

Note
FPSpreadsheet does not enforce these actions. They are only written to the file for the Office application.

Public procedure WriteCellValueAsString(ACell: PCell; AValue: String; const AFormatSettings: TFormatSettings); overload;

Writes data defined as a string into a cell. Depending on the structure of the string, the worksheet tries to guess whether it is a number, a date/time or a text and calls the corresponding writing method. Uses the provided FormatSettings for date/time etc.

Parameters
ACell
Pointer to the cell
AValue
Value to be written into the cell given as a string. Depending on the structure of the string, however, the value is written as a number, a date/time or a text.
AFormatSettings
FormatSettings record used for conversion of strings with date/time, numbers etc.
Public procedure WriteCellValueAsString(ACell: PCell; AValue: String); overload;

Writes data defined as a string into a cell. Depending on the structure of the string, the worksheet tries to guess whether it is a number, a date/time or a text and calls the corresponding writing method. Conversion of strings to values is done by means of the FormatSettings defined in the workbook.

Parameters
ACell
Pointer to the cell
AValue
Value to be written into the cell given as a string. Depending on the structure of the string, however, the value is written as a number, a date/time or a text.
Public procedure WriteColFormatIndex(ACol: Cardinal; AFormatIndex: Integer);

Sets the cell format index for a specific column. Creates a new column record if it does not yet exist.

Parameters
ACol
Index of the column to be considered
AFormatIndex
Index into the workbook's FCellFormatList. This format will be used if a cell has default format index (0) and if there is no specific default row format.
Public procedure WriteColInfo(ACol: Cardinal; AData: TCol);

Writes a column record for the column at a specific index to the spreadsheet. The column record contains info on the column width and the format index.

Creates a new column record if it does not yet exist.

Parameters
ACol
Index of the column record which will be created or modified
AData
Data to be written. The column width must already be in the units defined for the workbook.
Public procedure WriteColWidth(ACol: Cardinal; AWidth: Single; AUnits: TsSizeUnits; AColWidthType: TsColWidthType = cwtCustom); overload;

Sets the column width for a given column. Creates a new column record if it does not yet exist.

Parameters
ACol
Index of the column to be considered
AWidth
Width to be assigned to the column.
AColWidthType
Type of the column width (default -> AWidth is ignored) or custom
AUnits
Units used for parameter AWidth.
Public procedure WriteColWidth(ACol: Cardinal; AWidth: Single; AColWidthType: TsColWidthType = cwtCustom); overload; deprecated 'Use version with parameter AUnits';

Warning: this symbol is deprecated: Use version with parameter AUnits

Sets the column width for a given column. The width is given in terms of count of the "0" character using the worksheet's default font.

Note that this method is deprecated and will be removed. Use the variant in which the units of the new width can be specified.

Public procedure WriteComment(ACell: PCell; AText: String); overload;

Adds a comment to a specific cell

Parameters
ACell
Pointer to the cell
AText
Comment text
Public procedure WriteCurrency(ACell: PCell; AValue: Double; ANumFormat: TsNumberFormat; ANumFormatString: String); overload;

Writes a currency value to a given cell. Its number format is specified by means of a format string.

Parameters
ACell
Pointer to the cell considered
AValue
Number value to be written
ANumFormat
Format identifier, must be nfCurrency or nfCurrencyRed.
ANumFormatString
String of formatting codes, including currency symbol. Can contain sections for different formatting of positive and negative number. Example: '"EUR" #,##0.00;("EUR" #,##0.00)'
Public procedure WriteCurrency(ACell: PCell; AValue: Double; ANumFormat: TsNumberFormat = nfCurrency; ADecimals: Integer = -1; ACurrencySymbol: String = '?'; APosCurrFormat: Integer = -1; ANegCurrFormat: Integer = -1); overload;

Writes a currency value to a given cell. Its number format can be provided optionally by specifying various parameters.

Parameters
ACell
Pointer to the cell considered
AValue
Number value to be written
ANumFormat
Format identifier, must be nfCurrency or nfCurrencyRed.
ADecimals
Number of decimal places
APosCurrFormat
Code specifying the order of value, currency symbol and spaces (see pcfXXXX constants)
ANegCurrFormat
Code specifying the order of value, currency symbol, spaces, and how negative values are shown (see ncfXXXX constants)
ACurrencySymbol
String to be shown as currency, such as '$', or 'EUR'. In case of '?' the currency symbol defined in the workbook's FormatSettings is used.
Public procedure WriteDateTime(ACell: PCell; AValue: TDateTime; ANumFormat: TsNumberFormat; ANumFormatStr: String = ''); overload;

Writes a date/time value to a cell

Note
At least Excel xls does not recognize a separate datetime cell type: a datetime is stored as a (floating point) number, and the cell is formatted as a date (either built-in or a custom format).

Parameters
ACell
Pointer to the cell considered
AValue
The date/time/datetime to be written
ANumFormat
The format specifier, e.g. nfShortDate (optional). If not specified format is not changed.
ANumFormatStr
Format string, used only for nfCustom or nfTimeInterval.
Public procedure WriteDateTime(ACell: PCell; AValue: TDateTime); overload;

Writes a date/time value to a cell. Does not change number format

Parameters
ACell
Pointer to the cell considered
AValue
The date/time/datetime to be written
Public procedure WriteDateTime(ACell: PCell; AValue: TDateTime; ANumFormatStr: String); overload;

Writes a date/time value to a cell

Note
At least Excel xls does not recognize a separate datetime cell type: a datetime is stored as a (floating point) number, and the cell is formatted as a date (either built-in or a custom format).

Parameters
ACell
Pointer to the cell considered
AValue
The date/time/datetime to be written
ANumFormatStr
Format string (the format identifier nfCustom is used to classify the format).
Public procedure WriteDateTimeFormat(ACell: PCell; ANumFormat: TsNumberFormat; const ANumFormatString: String = ''); overload;

Adds a date/time format to the formatting of a cell

Parameters
ACell
Pointer to the cell considered
ANumFormat
Identifier of the format to be applied (nxXXXX constant)
ANumFormatString
Optional string of formatting codes. Is only considered if ANumberFormat is nfCustom.
See also
TsNumberFormat
Public procedure WriteDecimals(ACell: PCell; ADecimals: Byte); overload;

Formats the numeric value in a cell to show a given count of decimal places. Is ignored for non-decimal formats (such as most date/time formats).

Parameters
ACell
Pointer to the cell considered
ADecimals
Number of decimal places to be displayed
See also
TsNumberFormat
Public procedure WriteDefaultColWidth(AValue: Single; AUnits: TsSizeUnits);

Sets the default column widtht of the worksheet. The value will be stored in workbook units.

Parameters
AValue
New value of the default column width
AUnits
Units used by AValue
Public procedure WriteDefaultRowHeight(AValue: Single; AUnits: TsSizeUnits);

Sets the default row height of the worksheet. The value will be stored in workbook units.

Parameters
AValue
New value of the default row height
AUnits
Units used by AValue
Public procedure WriteDoNotPrintCell(ACell: PCell; AValue: Boolean); overload;

This item has no description.

Public procedure WriteErrorValue(ACell: PCell; AValue: TsErrorValue); overload;

Writes an error value to a cell.

Parameters
ACol
Pointer to the cell to be written
AValue
The error code value
See also
TsErrorValue
Public procedure WriteFont(ACell: PCell; AFontIndex: Integer); overload;

Applies a font to the formatting of a cell. The font is determined by its index in the workbook's font list:

Parameters
ACell
Pointer to the cell considered
AFontIndex
Index of the font in the workbook's font list
Public procedure WriteFormula(ACell: PCell; AFormula: String; ALocalized: Boolean = false; R1C1Mode: Boolean = false); overload;

Writes a formula to a given cell

Parameters
ACell
Pointer to the cell
AFormula
Formula string to be written. A leading '=' will be removed. If AFormula is '' then an formula already assigned to this cell is deleted.
ALocalized
If True, the formula is expected to have decimal and list separators of the workbook's FormatSettings. Otherwise uses dot and comma, respectively.
Public procedure WriteFractionFormat(ACell: PCell; AMixedFraction: Boolean; ANumeratorDigits, ADenominatorDigits: Integer); overload;

Formats a number as a fraction

Parameters
ACell
Pointer to the cell to be formatted
ANumFormat
Identifier of the format to be applied. Must be either nfFraction or nfMixedFraction
ANumeratorDigts
Count of numerator digits
ADenominatorDigits
Count of denominator digits
See also
TsNumberFormat
Public procedure WriteHorAlignment(ACell: PCell; AValue: TsHorAlignment); overload;

Defines the horizontal alignment of text in a cell.

Parameters
ACell
Pointer to the cell considered
AValue
Parameter for horizontal text alignment (haDefault, vaLeft, haCenter, haRight). By default, texts are left-aligned, numbers and dates are right-aligned.
Public procedure WriteHyperlink(ACell: PCell; ATarget: String; ATooltip: String = ''); overload;

Assigns a hyperlink to the specified cell.

Parameters
ACell
Pointer to the cell considered
ATarget
Hyperlink address given as a fully qualitifed URI for external links, or as a # followed by a cell address for internal links. Local files can be specified also by their name relative to the workbook. An existing hyperlink is removed if ATarget is empty.
ATooltip
Text for popup tooltip hint used by Excel
Public procedure WriteNumber(ACell: PCell; ANumber: Double); overload;

Writes a floating-point number to a cell, does not change the number format

Parameters
ACell
Pointer to the cell
ANumber
Number to be written
Public procedure WriteNumber(ACell: PCell; ANumber: Double; ANumFormat: TsNumberFormat; ANumFormatString: String); overload;

Writes a floating point number to the cell and uses a custom number format specified by the format string. Note that fpspreadsheet may not be able to detect the formatting when reading the file.

Parameters
ACell
Pointer to the cell considered
ANumber
Number to be written
ANumFormat
Format identifier (nfCustom)
ANumFormatString
String of formatting codes (such as 'dd/mmm' )
Public procedure WriteNumber(ACell: PCell; ANumber: Double; ANumFormat: TsNumberFormat; ADecimals: Byte = 2; AMinIntDigits: Integer = 1); overload;

Writes a floating-point number to a cell

Parameters
ACell
Pointer to the cell
ANumber
Number to be written
ANumFormat
Identifier for a built-in number format, e.g. nfFixed
ADecimals
Optional number of decimal places used for formatting. If ANumFormat is nfFraction the ADecimals defines the digits of Numerator and denominator.
AMinIntDigits
Minimum count of digits before the decimal separator
See also
TsNumberFormat
Public procedure WriteNumberFormat(ACell: PCell; ANumFormat: TsNumberFormat; const ANumFormatString: String = ''); overload;

Adds a number format to the formatting of a cell

Parameters
ARow
The row of the cell
ACol
The column of the cell
ANumFormat
Identifier of the format to be applied
ADecimals
Number of decimal places
ACurrencySymbol
optional currency symbol in case of nfCurrency
APosCurrFormat
optional identifier for positive currencies
ANegCurrFormat
optional identifier for negative currencies
See also
TsNumberFormat
Public procedure WriteNumberFormat(ACell: PCell; ANumFormat: TsNumberFormat; ADecimals: Integer; ACurrencySymbol: String = ''; APosCurrFormat: Integer = -1; ANegCurrFormat: Integer = -1); overload;

Adds a number format to the formatting of a cell

Parameters
ACell
Pointer to the cell considered
ANumFormat
Identifier of the format to be applied
ANumFormatString
Optional string of formatting codes. Is only considered if ANumberFormat is nfCustom.
See also
TsNumberFormat
Public procedure WriteRowFormatIndex(ARow: Cardinal; AFormatIndex: Integer);

Sets the cell format index for a specific row. Creates a new row record if it does not yet exist.

Parameters
ARow
Index of the row to be considered
AFormatIndex
Index into the workbook's FCellFormatList. This format will be used if a cell has default format index (0).
Public procedure WriteRowHeight(ARow: Cardinal; AHeight: Single; ARowHeightType: TsRowHeightType = rhtCustom); overload; deprecated 'Use version with parameter AUnits';

Warning: this symbol is deprecated: Use version with parameter AUnits

Sets the row height for a given row. The height is given in terms of line count of the worksheet's default font.

Note that this method is deprecated and will be removed. Use the variant in which the units of the new height can be specified.

Public procedure WriteRowHeight(ARow: Cardinal; AHeight: Single; AUnits: TsSizeUnits; ARowHeightType: TsRowHeightType = rhtCustom); overload;

Sets the row height for a given row. Creates a new row record if it does not yet exist.

Parameters
ARow
Index of the row to be considered
AHeight
Row height to be assigned to the row.
AUnits
Units measuring the row height.
ARowHeightType
Specifies whether the row height is a default, automatic or custom row height.
Public procedure WriteRowInfo(ARow: Cardinal; AData: TRow);

Writes a row record for the row at a given index to the spreadsheet. The row record contains info on the row height and the row format index.

Creates a new row record if it does not yet exist.

Parameters
ARow
Index of the row record which will be created or modified
AData
Data to be written. Row height expected to be already in the units defined for the workbook.
Public procedure WriteRPNFormula(ACell: PCell; ARPNFormula: TsRPNFormula); overload;

Writes an RPN formula to a cell. An RPN formula is an array of tokens describing the calculation to be performed. In addition,the RPN formula is converted to a string formula.

Parameters
ACell
Pointer to the cell
AFormula
Array of TsFormulaElements. The array can be created by using "CreateRPNFormla".
See also
TsNumberFormat
TsFormulaElement
CreateRPNFormula
Public procedure WriteText(ACell: PCell; AText: String; ARichTextparams: TsRichTextParams = nil); overload;

Writes UTF-8 encoded text to a cell.

Note
The cell content will be set to cctEmpty if the string is empty.

Parameters
ACell
Pointer to the cell
AText
The text to be written encoded in utf-8
ARichTextParams
Array of formatting instructions for characters or groups of characters (see TsRichTextParam).
See also
TsRichTextParams
TsRichTextParam
Public procedure WriteTextAsHTML(ACell: PCell; AText: String); overload;

Writes text containing HTML codes to a cell. Here are the allowed HTML codes:

<b>, <strong>  ... bold text

<i>, <em> ........ italic text

<u>, <ins> ....... underlined text

<s>, <del> ....... strike-out text

<sub> ............ subscript

<sup> ............ superscript

<font tags> ...... full font selection. "tags" can be:
                   face="..." ... font name
                   size="..." ... font size, in pt, em, px, %. Add units!
                   color="..." .. font color, e.g. red, or #FF0000.

Parameters
ACell
Pointer to the cell
AText
The text containing the html codes
See also
TsRichTextParams
TsRichTextParam
Public procedure WriteTextRotation(ACell: PCell; ARotation: TsTextRotation); overload;

Adds text rotation to the formatting of a cell

Parameters
ACell
Pointer to the cell
ARotation
How to rotate the text
See also
TsTextRotation
Public procedure WriteUsedFormatting(ACell: PCell; AUsedFormatting: TsUsedFormattingFields); overload;

Directly modifies the used formatting fields of an existing cell. Only formatting corresponding to items included in this set is executed.

Parameters
ACell
Pointer to the cell to be modified
AUsedFormatting
Set of the used formatting fields
See also
TsUsedFormattingFields
TCell
Public procedure WriteUTF8Text(ACell: PCell; AText: String; ARichTextparams: TsRichTextParams = nil); overload; deprecated 'Use WriteText';

Warning: this symbol is deprecated: Use WriteText

This item has no description.

Public procedure WriteVertAlignment(ACell: PCell; AValue: TsVertAlignment); overload;

Defines the vertical alignment of text in a cell.

Parameters
ACell
Poiner to the cell considered
AValue
Parameter for vertical text alignment (vaDefault, vaTop, vaCenter, vaBottom). By default, texts are bottom-aligned.
Public procedure WriteWordwrap(ACell: PCell; AValue: boolean); overload;

Enables or disables the word-wrapping feature for a cell.

Parameters
ACel
Pointer to the cell considered
AValue
True = word-wrapping enabled, False = disabled.
Protected procedure DeleteRowOrCol(AIndex: Integer; IsRow: Boolean);

Deletes the row or column at the index specified. AIsRow determines whether the index is a row or column index.

Cells with greader row/column indexes are moved one row up/left. Merged cell blocks and cell references in formulas are considered as well.

Parameters
AIndex
Index of the row to be deleted
IsRow
If True then AIndex is a row index, otherwise a column index
Protected procedure DoExchangeColRow(AIsColumn: Boolean; AIndex, WithIndex: Cardinal; AFromIndex, AToIndex: Cardinal);

Exchanges columns or rows, depending on value of "AIsColumn"

Parameters
AIsColumn
If True the exchange is done for columns, otherwise for rows
AIndex
Index of the column (if AIsColumn is True) or the row (if AIsColumn is False) which is to be exchanged with the one having index "WidthIndex"
WithIndex
Index of the column (if AIsColumn is True) or the row (if AIsColumn is False) with which "AIndex" is to be replaced.
AFromIndex
First row (if AIsColumn is True) or column (if AIsColumn is False) which is affected by the exchange
AToIndex
Last row (if AIsColumn is True) or column (if AsColumn is False) which is affected by the exchange
Protected procedure ExchangeCells(ARow1, ACol1, ARow2, ACol2: Cardinal);

Exchanges two cells

Note
This method does not take care of merged cells and does not check for this situation. Therefore, the method is not public!

Parameters
ARow1
(Zero-based) row index of the first cell
ACol1
(Zero-based) column index of the first cell
ARow2
(Zero-based) row index of the second cell
ACol2
(Zero-based) column index of the second cell
Protected procedure InsertRowOrCol(AIndex: Integer; IsRow: Boolean);

Inserts a row or column BEFORE the row/column specified by AIndex. Depending on IsRow this is either the row or column index.

Cells with greater row/column indexes are moved one row down/right. Merged cell blocks and cell references in formulas are considered as well.

Parameters
AIndex
Index of the row or column before which a new row or column is inserted.
IsRow
Determines whether AIndex refers to a row index (True) or column index (False).
Protected procedure RemoveAndFreeCell(ARow, ACol: Cardinal);

Removes a cell and releases its memory. If a comment is attached to the cell then it is removed and releaded as well.

Just for internal usage since it does not modify the other cells affected. And it does not change other records depending on the cell (comments, merged ranges etc).

Parameters
ARow
Row index of the cell to be removed
ACol
Column index of the cell to be removed
Protected procedure SetName(const AName: String); override;

Setter for the worksheet name property. Checks if the name is valid, and exits without any change if not. Creates an event OnChangeWorksheet.

Properties

Public property ActiveCellCol: Cardinal read FActiveCellCol;

Column index of the selected cell of this worksheet

Public property ActiveCellRow: Cardinal read FActiveCellRow;

Row index of the selected cell of this worksheet

Public property BiDiMode: TsBiDiMode read FBiDiMode write SetBiDiMode;

This item has no description.

Public property Cells: TsCells read FCells;

List of cells of the worksheet. Only cells with contents or with formatting are listed

Public property Cols: TIndexedAVLTree read FCols;

List of all column records of the worksheet having a non-standard column width

Public property Comments: TsComments read FComments;

List of all comment records

Public property CryptoInfo: TsCryptoInfo read FCryptoInfo write FCryptoInfo;

Information how the worksheet is encrypted

Public property DefinedNames: TsDefinedNames read FDefinedNames;

List of local defined names

Public property FormatSettings: TFormatSettings read GetFormatSettings;

FormatSettings for localization of some formatting strings

Public property Formulas: TsFormulas read FFormulas;

List of all formulas used in the sheet

Public property Hyperlinks: TsHyperlinks read FHyperlinks;

List of hyperlink information records

Public property Index: Integer read GetIndex write SetIndex;

Index of the worksheet in the workbook

Public property LeftCol: Cardinal read FLeftCol;

Index of the left-most visible column in the grid - used by WorksheetGrid

Public property LeftPaneWidth: Integer read FLeftPaneWidth write FLeftPaneWidth;

Number of frozen columns which do not scroll

Public property MergedCells: TsMergedCells read FMergedCells;

List of merged cells (contains TsCellRange records)

Public property OnChangeCell: TsCellEvent read FOnChangeCell write FOnChangeCell;

Event fired when cell contents or formatting changes

Public property OnChangeCol: TsColEvent read FOnChangeCol write FOnChangeCol;

Event fired when column height or formatting changes

Public property OnChangeFont: TsCellEvent read FOnChangeFont write FOnChangeFont;

Event fired when the font size in a cell changes

Public property OnChangeRow: TsRowEvent read FOnChangeRow write FOnChangeRow;

Event fired when a row height or row formatting has changed

Public property OnCompareCells: TsCellCompareEvent read FOnCompareCells write FOnCompareCells; deprecated 'Use OnFullCompareCells instead';

Warning: this symbol is deprecated: Use OnFullCompareCells instead

Event to override cell comparison for sorting

Public property OnFullCompareCells: TsCellFullCompareEvent read FOnFullCompareCells write FOnFullCompareCells;

Event to override cell comparison for sorting

Public property OnSelectCell: TsCellEvent read FOnSelectCell write FOnSelectCell;

Event fired when a cell is "selected".

Public property OnWriteCellData: TsWorksheetWriteCellDataEvent read FOnWriteCellData write FOnWriteCellData;

This event allows to provide external cell data for writing to file, standard cells are ignored. Intended for converting large database files to a spreadsheet format. Requires Option boVirtualMode to be set.

Public property OnZoom: TsNotifyEvent read FOnZoom write FOnZoom;

Event triggered when the worksheet is zoomed

Public property PageLayout: TsPageLayout read FPageLayout write FPageLayout;

Parameters to be used for printing by the Office applications

Public property Rows: TIndexedAVLTree read FRows;

List of all row records of the worksheet having a non-standard row height

Public property TabColor: TsColor read FTabColor write SetTabColor default scNotDefined;

Color of the tab in the visual control - currently ignored

Public property TopPaneHeight: Integer read FTopPaneHeight write FTopPaneHeight;

Number of frozen rows which do not scroll

Public property TopRow: Cardinal read FTopRow;

Index of the top-most visible row in the grid - used by WorksheetGrid

Public property VirtualColCount: cardinal read FVirtualColCount write SetVirtualColCount;

In VirtualMode, the value of VirtualColCount signals how many colums will be transferred to the worksheet.

Public property VirtualRowCount: cardinal read FVirtualRowCount write SetVirtualRowCount;

The value VirtualRowCount indicates how many rows will be transferred to the worksheet in VirtualMode.

Public property Workbook: TsWorkbook read FWorkbook;

Workbook to which the worksheet belongs

Public property ZoomFactor: Double read FZoomFactor write SetZoomFactor;

Zoom factor


fpSpreadsheet: Class TsWorkbook

Class TsWorkbook

Description
Hierarchy
Fields
Methods
Properties

Unit

fpSpreadsheet

Declaration

type TsWorkbook = class(TsBasicWorkbook)

Description

The workbook contains the worksheets and provides methods for reading from and writing to file.

Hierarchy

  • TObject
  • TsBasicWorkbook
  • TsWorkbook

Overview

Fields

Protected | FFontList: TFPList;
Protected | FNumFormatList: TFPList;
Protected | FCellFormatList: TsCellFormatList;
Protected | FConditionalFormatList: TsConditionalFormatList;
Protected | FEmbeddedObjList: TFPList;
Protected | FCharts: TsChartList;

Methods

Public | constructor Create;
Public | destructor Destroy; override;
Public | function AddCellFormat(const AValue: TsCellFormat): Integer;
Public | function AddChart(ASheet: TsBasicWorksheet; AWidth, AHeight: Double; ARow, ACol: Cardinal; AOffsetX: Double = 0.0; AOffsetY: Double = 0.0): TsChart;
Public | function AddEmbeddedObj(AStream: TStream; const AName: String = ''; ASize: Int64 = -1): Integer; overload;
Public | function AddEmbeddedObj(const AFileName: String): Integer; overload;
Public | function AddFont(const AFontName: String; ASize: Single; AStyle: TsFontStyles; AColor: TsColor; APosition: TsFontPosition = fpNormal): Integer; overload;
Public | function AddFont(const AFont: TsFont): Integer; overload;
Public | function AddNumberFormat(AFormatStr: String): Integer;
Public | function AddWorksheet(AName: string; ReplaceDuplicateName: Boolean = false): TsWorksheet;
Public | function CloneFont(const AFontIndex: Integer): TsFont;
Public | function ConvertUnits(AValue: Double; AFromUnits, AToUnits: TsSizeUnits): Double;
Public | function CopyWorksheetFrom(AWorksheet: TsWorksheet; ReplaceDuplicateName: Boolean): TsWorksheet;
Public | function FindEmbeddedObj(const AFileName: String): Integer;
Public | function FindFont(const AFontName: String; ASize: Single; AStyle: TsFontStyles; AColor: TsColor; APosition: TsFontPosition = fpNormal): Integer;
Public | function FixFormulas(ACorrection: TsFormulaCorrection; AData: Pointer; AParam: PtrInt): boolean;
Public | function GetBuiltinFontCount: Integer;
Public | function GetCellFormat(AIndex: Integer): TsCellFormat;
Public | function GetCellFormatAsString(AIndex: Integer): String;
Public | function GetChartByIndex(AIndex: Integer): TsChart;
Public | function GetChartCount: Integer;
Public | function GetConditionalFormat(AIndex: Integer): TsConditionalFormat;
Public | function GetDefaultFont: TsFont;
Public | function GetDefaultFontSize: Single;
Public | function GetEmbeddedObj(AIndex: Integer): TsEmbeddedObj;
Public | function GetEmbeddedObjCount: Integer;
Public | function GetFirstWorksheet: TsWorksheet;
Public | function GetFont(AIndex: Integer): TsFont;
Public | function GetFontAsString(AIndex: Integer): String;
Public | function GetFontCount: Integer;
Public | function GetHyperlinkFont: TsFont;
Public | function GetLastWorksheet: TsWorksheet;
Public | function GetNextWorksheet(AWorksheet: TsWorksheet): TsWorksheet;
Public | function GetNumberFormat(AIndex: Integer): TsNumFormatParams;
Public | function GetNumberFormatCount: Integer;
Public | function GetNumCellFormats: Integer;
Public | function GetNumConditionalFormats: Integer;
Public | function GetPointerToCellFormat(AIndex: Integer): PsCellFormat;
Public | function GetPreviousWorksheet(AWorksheet: TsWorksheet): TsWorksheet;
Public | function GetVisibleWorksheetCount: Integer;
Public | function GetWorksheetByIndex(AIndex: Integer): TsWorksheet;
Public | function GetWorksheetByName(AName: String): TsWorksheet;
Public | function GetWorksheetCount: Integer;
Public | function GetWorksheetIndex(AWorksheet: TsBasicWorksheet): Integer; overload;
Public | function GetWorksheetIndex(const AWorksheetName: String): Integer; overload;
Public | function HasEmbeddedSheetImages: Boolean;
Public | function NotificationsEnabled: Boolean;
Public | function TryStrToCell(AText: String; out AWorksheet: TsWorksheet; out ARow,ACol: Cardinal; AListSeparator: Char = #0): Boolean;
Public | function TryStrToCellRange(AText: String; out AWorksheet: TsWorksheet; out ARange: TsCellRange; AListSeparator: Char = #0): Boolean;
Public | function TryStrToCellRanges(AText: String; out AWorksheet: TsWorksheet; out ARanges: TsCellRangeArray; AListSeparator: Char = #0): Boolean;
Public | function ValidWorksheetName(var AName: String; ReplaceDuplicateName: Boolean = false): Boolean;
Protected | function FixFormula(AFormula: PsFormula; ACorrection: TsFormulaCorrection; AData: Pointer; AParam: PtrInt): Boolean;
Public | procedure CalcFormulas;
Public | procedure ChangedWorksheet(AWorksheet: TsWorksheet);
Public | procedure Clear;
Public | procedure CopyToClipboardStream(AStream: TStream; AFormat: TsSpreadsheetFormat; AParams: TsStreamParams = []);
Public | procedure DeleteFont(const AFontIndex: Integer);
Public | procedure DisableNotifications;
Public | procedure EnableNotifications;
Public | procedure GetLastRowColIndex(out ALastRow, ALastCol: Cardinal);
Public | procedure InitFonts;
Public | procedure LockFormulas;
Public | procedure PasteFromClipboardStream(AStream: TStream; AFormat: TsSpreadsheetFormat; AOperation: TsCopyOperation; AParams: TsStreamParams = []; ATransposed: Boolean = false);
Public | procedure ReadFromFile(AFileName: string; AFormatID: TsSpreadFormatID; APassword: String = ''; AParams: TsStreamParams = []); overload;
Public | procedure ReadFromFile(AFileName: string; APassword: String = ''; AParams: TsStreamParams = []); overload;
Public | procedure ReadFromFile(AFileName: string; AFormat: TsSpreadsheetFormat; AParams: TsStreamParams = []); overload;
Public | procedure ReadFromFileIgnoringExtension(AFileName: string; APassword: String = ''; AParams: TsStreamParams = []);
Public | procedure ReadFromStream(AStream: TStream; AFormatID: TsSpreadFormatID; APassword: String = ''; AParams: TsStreamParams = []); overload;
Public | procedure ReadFromStream(AStream: TStream; AFormat: TsSpreadsheetFormat; AParams: TsStreamParams = []); overload;
Public | procedure RebuildFormulas;
Public | procedure RemoveAllCellFormats(AKeepDefaultFormat: Boolean);
Public | procedure RemoveAllEmbeddedObj;
Public | procedure RemoveAllEmptyWorksheets;
Public | procedure RemoveAllFonts;
Public | procedure RemoveAllNumberFormats;
Public | procedure RemoveAllWorksheets;
Public | procedure RemoveWorksheet(AWorksheet: TsWorksheet);
Public | procedure ReplaceFont(AFontIndex: Integer; AFontName: String; ASize: Single; AStyle: TsFontStyles; AColor: TsColor; APosition: TsFontPosition = fpNormal);
Public | procedure SelectWorksheet(AWorksheet: TsWorksheet);
Public | procedure SetDefaultFont(const AFontName: String; ASize: Single);
Public | procedure UnlockFormulas;
Public | procedure UpdateCaches;
Public | procedure WriteToFile(const AFileName: string; const AFormat: TsSpreadsheetFormat; const AOverwriteExisting: Boolean = False; AParams: TsStreamParams = []); overload;
Public | procedure WriteToFile(const AFileName: String; const AOverwriteExisting: Boolean = False; AParams: TsStreamParams = []); overload;
Public | procedure WriteToFile(const AFileName: string; const AFormatID: TsSpreadFormatID; const AOverwriteExisting: Boolean = False; AParams: TsStreamParams = []); overload;
Public | procedure WriteToStream(AStream: TStream; AFormat: TsSpreadsheetFormat; AParams: TsStreamParams = []); overload;
Public | procedure WriteToStream(AStream: TStream; AFormatID: TsSpreadFormatID; AParams: TsStreamParams = []); overload;
Protected | class procedure GetFormatFromFileHeader(const AFileName: TFileName; out AFormatIDs: TsSpreadFormatIDArray); overload;
Protected | class procedure GetFormatFromFileHeader(AStream: TStream; out AFormatIDs: TsSpreadFormatIDArray); overload;
Protected | procedure MoveSheet(AFromIndex, AToIndex: Integer);
Protected | procedure PrepareBeforeReading;
Protected | procedure PrepareBeforeSaving;

Properties

Public | property ActiveWorksheet: TsWorksheet read FActiveWorksheet write SelectWorksheet;
Public | property CryptoInfo: TsCryptoInfo read FCryptoInfo write FCryptoInfo;
Public | property DefinedNames: TsDefinedNames read FDefinedNames write FDefinedNames;
Public | property MetaData: TsMetaData read FMetaData write FMetaData;
Public | property OnAddWorksheet: TsWorksheetEvent read FOnAddWorksheet write FOnAddWorksheet;
Public | property OnCalcWorkbook: TsWorkbookEvent read FOnCalcWorkbook write FOnCalcWorkbook;
Public | property OnChangeWorksheet: TsWorksheetEvent read FOnChangeWorksheet write FOnChangeWorksheet;
Public | property OnOpenWorkbook: TNotifyEvent read FOnOpenWorkbook write FOnOpenWorkbook;
Public | property OnReadCellData: TsWorkbookReadCellDataEvent read FOnReadCellData write FOnReadCellData;
Public | property OnRemoveWorksheet: TsRemoveWorksheetEvent read FOnRemoveWorksheet write FOnRemoveWorksheet;
Public | property OnRemovingWorksheet: TsWorksheetEvent read FOnRemovingWorksheet write FOnRemovingWorksheet;
Public | property OnRenameWorksheet: TsWorksheetEvent read FOnRenameWorksheet write FOnRenameWorksheet;
Public | property OnSelectWorksheet: TsWorksheetEvent read FOnSelectWorksheet write FOnSelectWorksheet;

Description

Fields

Protected FFontList: TFPList;

This item has no description.

Protected FNumFormatList: TFPList;

This item has no description.

Protected FCellFormatList: TsCellFormatList;

This item has no description.

Protected FConditionalFormatList: TsConditionalFormatList;

This item has no description.

Protected FEmbeddedObjList: TFPList;

This item has no description.

Protected FCharts: TsChartList;

This item has no description.

Methods

Public constructor Create;

Constructor of the workbook class. Among others, it initializes the built-in fonts, defines the default font, and sets up the FormatSettings for localization of some number formats.

Public destructor Destroy; override;

Destructor of the workbook class

Public function AddCellFormat(const AValue: TsCellFormat): Integer;

Adds the specified format record to the internal list and returns the index in the list. If the record had already been added before the function only returns the index.

Public function AddChart(ASheet: TsBasicWorksheet; AWidth, AHeight: Double; ARow, ACol: Cardinal; AOffsetX: Double = 0.0; AOffsetY: Double = 0.0): TsChart;

Creates a chart object with its top/left corner in the specified row/colum and having the specified width and height (in workbook units). Inserts the chart in the internal FCharts list of the workbook and returns the chart instance.

Parameters
ASheet
Worksheet into which the chart will be inserted.
AWidth
Width of the chart, in workbook units (usually millimeters)
AHeight
Height of the chart, in workbook units
ARow
Index of the row in which the top of the chart should be positioned.
ACol
Index of the column in which the left side of the chart should be positioned.
AOffsetX
Distance of the chart's left side from the left side of column ACol, in workbook units
AOffsetY
Distance of the chart's top side from the top side of row ARow, in workbook units
Returns

The instance of the created chart

Public function AddEmbeddedObj(AStream: TStream; const AName: String = ''; ASize: Int64 = -1): Integer; overload;

Creates a new "embedded" stream and copies the specified stream to it. Returns the index of the embedded object.

Public function AddEmbeddedObj(const AFileName: String): Integer; overload;

Creates a new "embedded" stream and loads the specified file. Returns the index of the embedded file item. Image dimensions are converted to workbook units.

Public function AddFont(const AFontName: String; ASize: Single; AStyle: TsFontStyles; AColor: TsColor; APosition: TsFontPosition = fpNormal): Integer; overload;

Adds a font to the font list. Returns the index in the font list.

Parameters
AFontName
Name of the font (like 'Arial')
ASize
Size of the font in points
AStyle
Style of the font, a combination of TsFontStyle elements
AColor
RGB valoe of the font color
APosition
Specifies subscript or superscript text.
Returns

Index of the font in the workbook's font list

Public function AddFont(const AFont: TsFont): Integer; overload;

Adds a font to the font list. Returns the index in the font list.

Parameters
AFont
TsFont record containing all font parameters
Returns

Index of the font in the workbook's font list

Public function AddNumberFormat(AFormatStr: String): Integer;

Adds a number format to the internal list. Returns the list index if already present, or creates a new format item and returns its index.

Public function AddWorksheet(AName: string; ReplaceDuplicateName: Boolean = false): TsWorksheet;

Adds a new worksheet to the workbook. It is put to the end of the worksheet list.

Parameters
AName
The name of the new worksheet
ReplaceDupliateName
If True and the sheet name already exists then a number is added to the sheet name to make it unique.
Returns

The instance of the newly created worksheet

See also
TsWorksheet
TsWorkbook
Public function CloneFont(const AFontIndex: Integer): TsFont;

Creates a new font as a copy of the font at the specified index. The new font is NOT YET added to the font list. If the user does not add the font to the font list he is responsibile for destroying it.

Public function ConvertUnits(AValue: Double; AFromUnits, AToUnits: TsSizeUnits): Double;

Conversion of length values between units

Public function CopyWorksheetFrom(AWorksheet: TsWorksheet; ReplaceDuplicateName: Boolean): TsWorksheet;

Copies a worksheet (even from an external workbook) and adds it to the current workbook

Parameters
AWorksheet
Worksheet to be copied. Can be in a different workbook.
ReplaceDuplicateName
The copied worksheet gets the name of the original. If ReplaceDuplicateName is true and this sheet name already exists then a number is added to the sheet name to make it unique.
Returns

The instance of the newly created worksheet

See also
TsWorksheet
TsWorkbook
Public function FindEmbeddedObj(const AFileName: String): Integer;

Checks whether an embedded object with the specified file name already exists. If yes, returns its index in the object list, or -1 if no.

Public function FindFont(const AFontName: String; ASize: Single; AStyle: TsFontStyles; AColor: TsColor; APosition: TsFontPosition = fpNormal): Integer;

Checks whether the font with the given specification is already contained in the font list. Returns the index, or -1 if not found.

Parameters
AFontName
Name of the font (like 'Arial')
ASize
Size of the font in points
AStyle
Style of the font, a combination of TsFontStyle elements
AColor
RGB value of the font color
APosition
Specified subscript or superscript text.
Returns

Index of the font in the font list, or -1 if not found.

Public function FixFormulas(ACorrection: TsFormulaCorrection; AData: Pointer; AParam: PtrInt): boolean;

Something was changed anywhere in the workbook which has an effect on existing formulas. This procedure runs through all formulas and performs the correction.

Parameters
ACorrection
Describes what has to be corrected. Example: fcWorksheetRenamed means that a worksheet has been renamed and the new name must be used in corresponding formulas
AData
A pointer with further information on the correction to be made. Depends on ACorrection. Example: In the fcWorksheetRenamed example above this points to the worksheet that was renamed.
AParam
Provides additional information. Depends on ACorrection.
Returns

The function returns true if the string formulas of the workbook have to be recreated.

Public function GetBuiltinFontCount: Integer;

Returns the count of built-in fonts (default font, hyperlink font, bold font by default).

Public function GetCellFormat(AIndex: Integer): TsCellFormat;

Returns the contents of the format record with the specified index.

Public function GetCellFormatAsString(AIndex: Integer): String;

Returns a string describing the cell format with the specified index.

Public function GetChartByIndex(AIndex: Integer): TsChart;

Returns the chart having the given index in the worksheet's chart list

Public function GetChartCount: Integer;

Returns the number of charts embedded on this sheet

Public function GetConditionalFormat(AIndex: Integer): TsConditionalFormat;

Returns the conditional format record at the specified index in the workbook's conditional format list.

Public function GetDefaultFont: TsFont;

Returns the default font. This is the first font (index 0) in the font list

Public function GetDefaultFontSize: Single;

Returns the point size of the default font

Public function GetEmbeddedObj(AIndex: Integer): TsEmbeddedObj;

Returns the embedded object stored in the embedded object list at the specified index.

Public function GetEmbeddedObjCount: Integer;

Returns the count of embedded objects

Public function GetFirstWorksheet: TsWorksheet;

Quick helper routine which returns the first worksheet

Returns

A TsWorksheet instance if at least one is present, nil otherwise.

See also
TsWorkbook.GetWorksheetByIndex
TsWorkbook.GetWorksheetByName
TsWorksheet
Public function GetFont(AIndex: Integer): TsFont;

Returns the font with the given index.

Parameters
AIndex
Index of the font to be considered
Returns

TsFont instance containing all parameters of the font (or nil if not found).

Public function GetFontAsString(AIndex: Integer): String;

Returns a string which identifies the font with a given index.

Parameters
AIndex
Index of the font
Returns

String with font name, font size etc.

Public function GetFontCount: Integer;

Returns the count of registered fonts

Public function GetHyperlinkFont: TsFont;

Returns the hyperlink font. This is the font with index 6 in the font list

Public function GetLastWorksheet: TsWorksheet;

Quick helper routine which returns the last worksheet

Returns

A TsWorksheet instance if at least one is present, nil otherwise.)

See also
TsWorkbook.GetWorksheetByIndex
TsWorkbook.GetWorksheetByName
TsWorksheet
Public function GetNextWorksheet(AWorksheet: TsWorksheet): TsWorksheet;

Returns the worksheet following the specified one.

Parameters
AWorksheet
The worksheet for which the next worksheet has to be determined.
Returns

A TsWorksheet instance if the specified worksheet is not the last one nil otherwise.

See also
TsWorkbook.GetFirstWorksheet
TsWorkbook.GetPreviousWorksheet
TsWorkbook.GetLastWorksheet
TsWorkbook.GetFirstWorksheet
TsWorkbook.GetWorksheetByIndex
TsWorkbook.GetWorksheetByName
TsWorksheet
Public function GetNumberFormat(AIndex: Integer): TsNumFormatParams;

Returns the parameters of the number format stored in the NumFormatList at the specified index. "General" number format is returned as nil.

Public function GetNumberFormatCount: Integer;

Returns the count of number format records stored in the NumFormatList

Public function GetNumCellFormats: Integer;

Returns the count of format records used all over the workbook

Public function GetNumConditionalFormats: Integer;

Returns the count of conditional formats available in the the workbook.

Public function GetPointerToCellFormat(AIndex: Integer): PsCellFormat;

Returns a pointer to the format record with the specified index

Public function GetPreviousWorksheet(AWorksheet: TsWorksheet): TsWorksheet;

Returns the worksheet preceding the specified one.

Parameters
AWorksheet
Worksheet for which the previous worksheet has to be determined.
Returns

A TsWorksheet instance if the specified worksheet is not the first one, nil otherwise.

See also
TsWorkbook.GetFirstWorksheet
TsWorkbook.GetNextWorksheet
TsWorkbook.GetLastWorksheet
TsWorkbook.GetFirstWorksheet
TsWorkbook.GetWorksheetByIndex
TsWorkbook.GetWorksheetByName
TsWorksheet
Public function GetVisibleWorksheetCount: Integer;

Counts the number of visible (= not hidden) worksheets in the workbook.

Returns

Number of visible worksheets in the workbook

See also
TsWorkbook.GetWorksheetCount
TsWorksheet
TsWorkbook
Public function GetWorksheetByIndex(AIndex: Integer): TsWorksheet;

Finds the worksheet with a given index

The index is zero-based, so the first worksheet added has index 0, the second 1, etc.

Parameters
AIndex
The index of the worksheet (zero-based)
Returns

A TsWorksheet instance if one is present at that index, nil otherwise.

See also
TsWorkbook.GetFirstWorksheet
TsWorkbook.GetWorksheetByName
TsWorksheet
Public function GetWorksheetByName(AName: String): TsWorksheet;

Finds the worksheet with a given worksheet name

Parameters
AName
The name of the worksheet
Returns

A TsWorksheet instance if one is found with that name, nil otherwise. Case is ignored.

See also
TsWorkbook.GetFirstWorksheet
TsWorkbook.GetWorksheetByIndex
TsWorksheet
Public function GetWorksheetCount: Integer;

Returns to count of worksheets in the workbook

Returns

Total number of worksheets in the workbook

See also
TsWorkbook.GetVisibleWorksheetCount
TsWorksheet
TsWorkbook
Public function GetWorksheetIndex(AWorksheet: TsBasicWorksheet): Integer; overload;

Returns the index of the specified worksheet in the worksheet list

Parameters
AWorksheet
Worksheet for which the index is to be found.
Returns

Index of the worksheet

See also
TsWorksheet
TsWorkbook
Public function GetWorksheetIndex(const AWorksheetName: String): Integer; overload;

Returns the index of the worksheet having the specified name, or -1 if the worksheet does not exist.

Parameters
AWorksheetName
Name of the worksheet to be found
Returns

Index of the worksheet

See also
TsWorksheet
TsWorkbook
Public function HasEmbeddedSheetImages: Boolean;

Returns True if there is at least one worksheet with an embedded images.

Public function NotificationsEnabled: Boolean;

Helper method to determine whether visual controls are notified of changes

Public function TryStrToCell(AText: String; out AWorksheet: TsWorksheet; out ARow,ACol: Cardinal; AListSeparator: Char = #0): Boolean;

Analyses a string which can contain an array of cell ranges along with a worksheet name. Extracts the worksheet (if missing the "active" worksheet of the workbook is returned) and the cell's row and column indexes.

Parameters
AText
General cell range string in Excel notation, i.e. worksheet name + ! + cell in A1 notation. Example: Sheet1!A1:A10; A1:A10 or A1 are valid as well.
AWorksheet
Pointer to the worksheet referred to by AText. If AText does not contain the worksheet name, the active worksheet of the workbook is returned
ARow,
ACol Zero-based row and column index of the cell identified by AText. If AText contains one ore more cell ranges then the upper left corner of the first range is returned.
AListSeparator
Character to separate the cell blocks in the text. If #0 then the ListSeparator of the workbook's FormatSettings is used.
Returns

True if AText is a valid list of cell ranges, False if not. If the result is False then AWorksheet, ARow and ACol may have unpredictable values.

Public function TryStrToCellRange(AText: String; out AWorksheet: TsWorksheet; out ARange: TsCellRange; AListSeparator: Char = #0): Boolean;

Analyses a string which can contain an array of cell ranges along with a worksheet name. Extracts the worksheet (if missing the "active" worksheet of the workbook is returned) and the cell range (or the first cell range, if there are several ranges).

Parameters
AText
General cell range string in Excel notation, i.e. worksheet name + ! + cell in A1 notation. Example: Sheet1!A1:A10; A1:A10 or A1 are valid as well.
AWorksheet
Pointer to the worksheet referred to by AText. If AText does not contain the worksheet name, the active worksheet of the workbook is returned
ARange
TsCellRange records identifying the cell block. If AText contains several cell ranges the first one is returned.
AListSeparator
Character to separate the cell blocks in the text. If #0 then the ListSeparator of the workbook's FormatSettings is used.
Returns

True if AText is a valid cell range, False if not. If the result is False then AWorksheet and ARange may have unpredictable values.

Public function TryStrToCellRanges(AText: String; out AWorksheet: TsWorksheet; out ARanges: TsCellRangeArray; AListSeparator: Char = #0): Boolean;

Analyses a string which can contain an array of cell ranges along with a worksheet name. Extracts the worksheet (if missing the "active" worksheet of the workbook is returned) and the range array.

Parameters
AText
General cell range string in Excel notation, i.e. worksheet name + ! + cell in A1 notation. Example: Sheet1!A1:A10; A1:A10 or A1 are valid as well.
AWorksheet
Pointer to the worksheet referred to by AText. If AText does not contain the worksheet name, the active worksheet of the workbook is returned
ARanges
Array of TsCellRange records identifying the cell blocks
AListSeparator
Character to separate the cell blocks in the text. If #0 then the ListSeparator of the workbook's FormatSettings is used.
Returns

True if AText is a valid list of cell ranges, False if not. If the result is False then AWorksheet and ARanges may have unpredictable values.

Public function ValidWorksheetName(var AName: String; ReplaceDuplicateName: Boolean = false): Boolean;

Checks whether the passed string is a valid worksheet name according to Excel (ODS seems to be a bit less restrictive, but if we follow Excel's convention we always have valid sheet names independent of the format.

Parameters
AName
Name to be checked.
ReplaceDuplicateName
If there exists already a sheet name equal to AName then a number is added to AName such that the name is unique.
Returns

True if it is a valid worksheet name, False otherwise

Protected function FixFormula(AFormula: PsFormula; ACorrection: TsFormulaCorrection; AData: Pointer; AParam: PtrInt): Boolean;

This item has no description.

Public procedure CalcFormulas;

Calculates all formulas of the workbook.

Since formulas may reference not-yet-calculated cells, this occurs in two steps:

  1. All formulas are marked as "not calculated".

  2. Formulas are calculated. If referenced formulas are found as being "not calculated" they are calculated and then tagged as "calculated".

This results in an iterative calculation procedure. In the end, all formulas are calculated. This strategy is often very ineffective because it unnecessarily recalculates formulas. You can provide a different algorithm in the OnCalcWorkbook event.

Public procedure ChangedWorksheet(AWorksheet: TsWorksheet);

Notification of visual controls that some global data of a worksheet have changed.

Public procedure Clear;

Clears content and formats from the workbook

Public procedure CopyToClipboardStream(AStream: TStream; AFormat: TsSpreadsheetFormat; AParams: TsStreamParams = []);

Writes the selected cells to a stream for usage in the clipboard. Transfer to the clipboard has do be done by the calling routine since fpspreadsheet does not "know" the system's clipboard.

Public procedure DeleteFont(const AFontIndex: Integer);

Deletes a font. Use with caution because this will screw up the font assignment to cells. The only legal reason to call this method is from a reader of a file format in which the missing font #4 of BIFF does exist.

Public procedure DisableNotifications;

Helper method to disable notification of visual controls

Public procedure EnableNotifications;

Helper method to enable notification of visual controls

Public procedure GetLastRowColIndex(out ALastRow, ALastCol: Cardinal);

Determines the maximum index of used columns and rows in all sheets of this workbook. Respects VirtualMode.

Is needed to disable saving when limitations of the format is exceeded.

Public procedure InitFonts;

Initializes the font list by adding 5 fonts:

0: default font 1: like default font, but blue and underlined (for hyperlinks) 2: like default font, but bold 3: like default font, but italic

Public procedure LockFormulas;

This item has no description.

Public procedure PasteFromClipboardStream(AStream: TStream; AFormat: TsSpreadsheetFormat; AOperation: TsCopyOperation; AParams: TsStreamParams = []; ATransposed: Boolean = false);

Copies the cells stored in the specified stream to the active worksheet. The provided stream contains data from the system's clipboard. Note that transfer from the clipboard to the stream has to be done by the calling routine since fpspreadsheet does not "know" the system's clipboard.

Public procedure ReadFromFile(AFileName: string; AFormatID: TsSpreadFormatID; APassword: String = ''; AParams: TsStreamParams = []); overload;

Reads the document from a file. It is assumed to have the given file format.

This method is intended for built-in file formats only. For user-provided formats, call the overloaded method with the FormadID parameter.

Parameters
AFileName
Name of the file to be read
AFormat
File format assumed
Public procedure ReadFromFile(AFileName: string; APassword: String = ''; AParams: TsStreamParams = []); overload;

Reads the document from a file. This method will try to guess the format from the extension. In the case of the ambiguous xls extension, it will simply assume that it is BIFF8. Note that it could be BIFF2 or 5 as well.

Public procedure ReadFromFile(AFileName: string; AFormat: TsSpreadsheetFormat; AParams: TsStreamParams = []); overload;

Reads the document from a file. It is assumed to have the given file format. Works also for user-provided file formats.

Parameters
AFileName
Name of the file to be read
AFormatID
Identifier of the file format assumed
Public procedure ReadFromFileIgnoringExtension(AFileName: string; APassword: String = ''; AParams: TsStreamParams = []);

Reads the document from a file, but ignores the extension.

Public procedure ReadFromStream(AStream: TStream; AFormatID: TsSpreadFormatID; APassword: String = ''; AParams: TsStreamParams = []); overload;

Reads the document from a seekable stream.

Parameters
AStream
Stream being read
AFormat
File format assumed.
AParams
Optional parameters to control stream access.
Public procedure ReadFromStream(AStream: TStream; AFormat: TsSpreadsheetFormat; AParams: TsStreamParams = []); overload;

Reads the document from a seekable stream.

Parameters
AStream
Stream being read
AFormatID
Identifier of the file format assumed.
AParams
Optional parameters to control stream access.
Public procedure RebuildFormulas;

This item has no description.

Public procedure RemoveAllCellFormats(AKeepDefaultFormat: Boolean);

Removes all cell formats from the workbook.

If AKeepDefaultFormat is True then index 0 containing the default cell format is retained.

Use carefully!

Public procedure RemoveAllEmbeddedObj;

Removes all embedded objects

Public procedure RemoveAllEmptyWorksheets;

Removes all empty worksheets

;

See also
RemoveAllWorksheets
Public procedure RemoveAllFonts;

Clears the list of fonts and releases their memory.

Public procedure RemoveAllNumberFormats;

Removes all numberformats Use carefully!

Public procedure RemoveAllWorksheets;

Clears the list of Worksheets and releases their memory.

Note
This procedure conflicts with the WorkbookLink mechanism which requires at least one worksheet per workbook!

See also
RemoveAllEmptyWorksheets
Public procedure RemoveWorksheet(AWorksheet: TsWorksheet);

Removes the specified worksheet: Removes the sheet from the internal sheet list, generates an event OnRemoveWorksheet, and releases all memory. The event handler specifies the index of the deleted worksheet; the worksheet itself does no longer exist.

Parameters
AWorksheet
Worksheet to be removed
Public procedure ReplaceFont(AFontIndex: Integer; AFontName: String; ASize: Single; AStyle: TsFontStyles; AColor: TsColor; APosition: TsFontPosition = fpNormal);

Replaces the built-in font at a specific index with different font parameters

Public procedure SelectWorksheet(AWorksheet: TsWorksheet);

Makes the specified worksheet "active". Only needed for visual controls. The active worksheet is displayed in a TsWorksheetGrid and in the selected tab of a TsWorkbookTabControl.

Parameters
AWorksheet
Worksheet to be selected
Public procedure SetDefaultFont(const AFontName: String; ASize: Single);

Defines the default font. This is the font with index 0 in the FontList. The next built-in fonts will have the same font name and size

Public procedure UnlockFormulas;

This item has no description.

Public procedure UpdateCaches;

Helper method to update internal caching variables

Public procedure WriteToFile(const AFileName: string; const AFormat: TsSpreadsheetFormat; const AOverwriteExisting: Boolean = False; AParams: TsStreamParams = []); overload;

Writes the document to a file. If the file doesn't exist, it will be created. Can be used for both built-in and user-provided file formats.

this number.

Parameters
AFileName
Name of the file to be written
AFormatID
The file will be written in the file format identified by
AOverwriteExisting
If the file is already existing it will be overwritten in case of AOverwriteExisting = True. If the parameter is False then an exception will be raised.
AParams
Optional parameters to control stream access.
Public procedure WriteToFile(const AFileName: String; const AOverwriteExisting: Boolean = False; AParams: TsStreamParams = []); overload;

Writes the document to file based on the extension. If this was an earlier sfExcel type file, it will be upgraded to sfExcel8.

Parameters
AFileName
Name of the destination file
AOverwriteExisting
If the file already exists it will be overwritten if AOverwriteExisting is True. In case of False, an exception will be raised.
AParams
Optional parameters to control stream access
Public procedure WriteToFile(const AFileName: string; const AFormatID: TsSpreadFormatID; const AOverwriteExisting: Boolean = False; AParams: TsStreamParams = []); overload;

Writes the document to a file. If the file doesn't exist, it will be created. Can be used only for built-in file formats.

Parameters
AFileName
Name of the file to be written
AFormat
The file will be written in this file format.
AOverwriteExisting
If the file is already existing it will be overwritten in case of AOverwriteExisting = True. If False an exception will be raised.
AParams
Optional parameters to control stream access.
Public procedure WriteToStream(AStream: TStream; AFormat: TsSpreadsheetFormat; AParams: TsStreamParams = []); overload;

Writes the document to a stream

Can be used for both built-in and userprovided file formats.

Parameters
AStream
Instance of the stream being written to
AFormatID
Identifier of the file format to be written.
AClipboardMode
Stream will be used by calling method for clipboard access
AParams
Optional parameters to control stream access. The HTML writer, for example, can be forced to write a valid html document in Windows.
Public procedure WriteToStream(AStream: TStream; AFormatID: TsSpreadFormatID; AParams: TsStreamParams = []); overload;

Writes the document to a stream

Can be used only for built-in file formats.

Parameters
AStream
Instance of the stream being written to
AFormat
File format to be written.
AClipboardMode
Stream will be used by calling method for clipboard access
AParams
Optional parameters to control stream access. The HTML writer, for example, can be forced to write a valid html document in Windows.
Protected class procedure GetFormatFromFileHeader(const AFileName: TFileName; out AFormatIDs: TsSpreadFormatIDArray); overload;

Helper method for determining the spreadsheet type. Read the first few bytes of a file and determines the spreadsheet type from the characteristic signature.

Protected class procedure GetFormatFromFileHeader(AStream: TStream; out AFormatIDs: TsSpreadFormatIDArray); overload;

Helper method for determining the spreadsheet format. Reads the first few bytes of a stream and determines the spreadsheet type from the characteristic signature.

Protected procedure MoveSheet(AFromIndex, AToIndex: Integer);

This item has no description.

Protected procedure PrepareBeforeReading;

Helper method called before reading the workbook. Clears the error log.

Protected procedure PrepareBeforeSaving;

Helper method called before saving the workbook. Clears the error log, and calculates the formulas in all worksheets if workbook option soCalcBeforeSaving is set.

Properties

Public property ActiveWorksheet: TsWorksheet read FActiveWorksheet write SelectWorksheet;

Identifies the "active" worksheet (only for visual controls)

Public property CryptoInfo: TsCryptoInfo read FCryptoInfo write FCryptoInfo;

This item has no description.

Public property DefinedNames: TsDefinedNames read FDefinedNames write FDefinedNames;

This item has no description.

Public property MetaData: TsMetaData read FMetaData write FMetaData;

Workbook metadata

Public property OnAddWorksheet: TsWorksheetEvent read FOnAddWorksheet write FOnAddWorksheet;

This event fires whenever a new worksheet is added

Public property OnCalcWorkbook: TsWorkbookEvent read FOnCalcWorkbook write FOnCalcWorkbook;

This event is fired when the workbook is recalculated. It allows to replace the calculation strategy.

Public property OnChangeWorksheet: TsWorksheetEvent read FOnChangeWorksheet write FOnChangeWorksheet;

This event fires whenever a worksheet is changed

Public property OnOpenWorkbook: TNotifyEvent read FOnOpenWorkbook write FOnOpenWorkbook;

This event fires whenever a workbook is loaded

Public property OnReadCellData: TsWorkbookReadCellDataEvent read FOnReadCellData write FOnReadCellData;

This event accepts cell data while reading a spreadsheet file. Data are not encorporated in a spreadsheet, they are just passed through to the event handler for processing. Requires option boVirtualMode to be set.

Public property OnRemoveWorksheet: TsRemoveWorksheetEvent read FOnRemoveWorksheet write FOnRemoveWorksheet;

This event fires AFTER a worksheet has been deleted

Public property OnRemovingWorksheet: TsWorksheetEvent read FOnRemovingWorksheet write FOnRemovingWorksheet;

This event fires BEFORE a worksheet is deleted

Public property OnRenameWorksheet: TsWorksheetEvent read FOnRenameWorksheet write FOnRenameWorksheet;

This event fires whenever a worksheet is renamed

Public property OnSelectWorksheet: TsWorksheetEvent read FOnSelectWorksheet write FOnSelectWorksheet;

This event fires when a worksheet is made "active"


fpspreadsheetctrls

Unit fpspreadsheetctrls

Description
Uses
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Constants
Variables

Description

Unit fpspreadsheetctrls implements some visual controls which help to create a spreadsheet application without writing too much code.

AUTHORS: Werner Pamler

LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus distribution, for details about the license.

EXAMPLE OF USAGE:

  • Add a WorkbookSource component to the form.

  • Add a WorksheetTabControl

  • Add a WorksheetGrid (from unit fpspreadsheetgrid)

  • Link their WorkbookSource properties to the added WorkbookSource component

  • Set the property FileName of the WorkbookSource to a spreadsheet file.

As a result, the WorksheetTabControl displays tabs for each worksheet in the file, and the WorksheetGrid displays the worksheet according to the selected tab.

Overview

Classes, Interfaces, Objects and Records

Name | Description
Class TsWorkbookSource |
Interface IsSpreadsheetControl |
Class TsWorkbookTabControl |
Class TsWorksheetIndicator |
Class TsCellEdit |
Class TsCellIndicator |
Class TsCellCombobox |
Class TsSpreadsheetInspector |

Functions and Procedures

function SpreadsheetFormatInClipboard: Boolean;

Types

TsCellFormatItem = (...);
TsColorNameEvent = procedure (Sender: TObject; AColor: TColor; out AColorName: String) of object;
TsFormatTarget = (...);
TsInspectorExpandedNode = (...);
TsInspectorExpandedNodes = set of TsInspectorExpandedNode;
TsInspectorMode = (...);
TsNotificationItem = (...);
TsNotificationItems = set of TsNotificationItem;
TsWorkbookSourceErrorEvent = procedure (Sender: TObject; const AMsg: String) of object;

Constants

GUID_SpreadsheetControl = '{CBCAAE52-D29E-4D0C-A7F4-1016C873448A}';
UM_VALIDATEINPUT = LM_USER + 100;

Description

Functions and Procedures

function SpreadsheetFormatInClipboard: Boolean;

Returns True if the clipboard contains a format good for pasting into a worksheet grid.

Types

TsCellFormatItem = (...);

This item has no description.

Values
  • cfiFontName
  • cfiFontSize
  • cfiFontColor
  • cfiBackgroundColor
  • cfiBorderColor
TsColorNameEvent = procedure (Sender: TObject; AColor: TColor; out AColorName: String) of object;

This item has no description.

TsFormatTarget = (...);

This item has no description.

Values
  • ftCell
  • ftRow
  • ftCol
  • ftDefault
TsInspectorExpandedNode = (...);

Inspector expanded nodes

Values
  • ienFormatSettings
  • ienConditionalFormats
  • ienPageLayout
  • ienFonts
  • ienFormats
  • ienEmbeddedObj
  • ienImages
  • ienCryptoInfo
TsInspectorExpandedNodes = set of TsInspectorExpandedNode;

This item has no description.

TsInspectorMode = (...);

Classification of data displayed by the SpreadsheetInspector. Each item can be assigned to a tab of a TabControl.

Values
  • imWorkbook
  • imWorksheet
  • imCellValue
  • imCellProperties
  • imRow
  • imCol
TsNotificationItem = (...);

Describes during communication between WorkbookSource and visual controls which kind of item has changed: the workbook, the worksheet, a cell value, or a cell formatting, etc.

Values
  • lniWorkbook
  • lniWorksheet
  • lniWorksheetAdd
  • lniWorksheetRemoving
  • lniWorksheetRemove
  • lniWorksheetRename
  • lniWorksheetZoom
  • lniCell
  • lniSelection
  • lniAbortSelection
  • lniRow
  • lniCol
  • lniChart
TsNotificationItems = set of TsNotificationItem;

This set accompanies the notification between WorkbookSource and visual controls and describes which items have changed in the spreadsheet.

TsWorkbookSourceErrorEvent = procedure (Sender: TObject; const AMsg: String) of object;

Event handler procedure for displaying a message if an error or warning occurs during reading of a workbook.

Constants

GUID_SpreadsheetControl = '{CBCAAE52-D29E-4D0C-A7F4-1016C873448A}';

This item has no description.

UM_VALIDATEINPUT = LM_USER + 100;

User-defined message for input validation


fpspreadsheetctrls: Class TsWorkbookSource

Class TsWorkbookSource

Description
Hierarchy
Fields
Methods
Properties

Unit

fpspreadsheetctrls

Declaration

type TsWorkbookSource = class(TComponent)

Description

TsWorkbookSource links a workbook to the visual spreadsheet controls and help to display or edit the workbook without written code.

Hierarchy

  • TObject
  • TPersistent
  • TComponent
  • TsWorkbookSource

Overview

Methods

Public | constructor Create(AOwner: TComponent); override;
Public | destructor Destroy; override;
Protected | function DoQueryPassword: String;
Public | procedure AddListener(AListener: TComponent);
Public | procedure CopyCellsToClipboard;
Public | procedure CreateNewWorkbook;
Public | procedure CutCellsToClipboard;
Public | procedure ExecutePendingOperation;
Public | procedure LoadFromProtectedSpreadsheetFile(AFileName: String; AFormatID: TsSpreadFormatID; APassword: String; AWorksheetIndex: Integer = -1);
Public | procedure LoadFromSpreadsheetFile(AFileName: string; AFormatID: TsSpreadFormatID = sfidUnknown; AWorksheetIndex: Integer = -1); overload;
Public | procedure LoadFromSpreadsheetFile(AFileName: string; AFormat: TsSpreadsheetFormat; AWorksheetIndex: Integer = -1); overload;
Public | procedure LoadFromWorkbook(AWorkbook: TsWorkbook; AWorksheetIndex: Integer = -1);
Public | procedure NotifyListeners(AChangedItems: TsNotificationItems; AData: Pointer = nil);
Public | procedure PasteCellsFromClipboard(AItem: TsCopyOperation; ATransposed: Boolean = false);
Public | procedure RemoveListener(AListener: TComponent);
Public | procedure SaveToSpreadsheetFile(AFileName: string; AFormatID: TsSpreadFormatID; AOverwriteExisting: Boolean = true); overload;
Public | procedure SaveToSpreadsheetFile(AFileName: string; AFormat: TsSpreadsheetFormat; AOverwriteExisting: Boolean = true); overload;
Public | procedure SaveToSpreadsheetFile(AFileName: string; AOverwriteExisting: Boolean = true); overload;
Public | procedure SelectCell(ASheetRow, ASheetCol: Cardinal);
Public | procedure SelectWorksheet(AWorkSheet: TsWorksheet);
Public | procedure SetPendingOperation(AOperation: TsCopyOperation; const ASelection: TsCellRangeArray);
Protected | procedure AbortSelection;
Protected | procedure DoShowError(const AErrorMsg: String);
Protected | procedure InternalCreateNewWorkbook(AWorkbook: TsWorkbook = nil);
Protected | procedure InternalLoadFromFile(AFileName: string; AAutoDetect: Boolean; AFormatID: TsSpreadFormatID; AWorksheetIndex: Integer; APassword: String);
Protected | procedure InternalLoadFromWorkbook(AWorkbook: TsWorkbook; AWorksheetIndex: Integer = -1);
Protected | procedure Loaded; override;

Properties

Published | property AutoDetectFormat: Boolean read FAutoDetectFormat write FAutoDetectFormat default true;
Published | property FileFormat: TsSpreadsheetFormat read GetFileFormat write SetFileFormat default sfOOXML;
Public | property FileFormatID: TsSpreadFormatID read FFileFormatID write SetFileFormatID;
Published | property FileName: TFileName read FFileName write SetFileName;
Published | property OnError: TsWorkbookSourceErrorEvent read FOnError write FOnError;
Published | property OnQueryPassword: TsOnQueryPassword read FOnQueryPassword write FOnQueryPassword;
Published | property Options: TsWorkbookOptions read FOptions write SetOptions;
Public | property PendingOperation: TsCopyOperation read FPendingOperation;
Public | property Workbook: TsWorkbook read FWorkbook;
Public | property Worksheet: TsWorksheet read FWorksheet;

Description

Methods

Public constructor Create(AOwner: TComponent); override;

Constructor of the WorkbookSource class. Creates the internal list for the notified ("listening") components, and creates an empty workbook.

Parameters
AOwner
Component which is responsibile for destroying the WorkbookSource.
Public destructor Destroy; override;

Destructor of the WorkbookSource class. Cleans up the of listening component list and destroys the linked workbook.

Protected function DoQueryPassword: String;

This item has no description.

Public procedure AddListener(AListener: TComponent);

Adds a component to the listener list. All these components are notified of changes in the workbook.

Parameters
AListener
Component to be added to the listener list notified of changes.
Public procedure CopyCellsToClipboard;

Copies the selected cells of the worksheet to an internal list ("Clipboard"). Note that this is not the system clipboard in the current implementation.

Public procedure CreateNewWorkbook;

Creates a new empty workbook and adds a single worksheet

Public procedure CutCellsToClipboard;

Copies the selected cells of the worksheet to an internal list ("Clipboard") and deletes them afterwards.

Public procedure ExecutePendingOperation;

Executes a "pending operation"

Public procedure LoadFromProtectedSpreadsheetFile(AFileName: String; AFormatID: TsSpreadFormatID; APassword: String; AWorksheetIndex: Integer = -1);

Public loader of a spreadsheet file.

Should be called in case of password-protected files when the password is already known and no password dialog should appear.

Call this method for both built-in and user-provided file formats.

Parameters
AFilename
Name of the spreadsheet file to be loaded.
AFormatID
Identifier of the spreadsheet file format assumed for the file.
AWorksheetIndex
Index of the worksheet to be selected after loading. (If empty then the active worksheet is loaded)
Public procedure LoadFromSpreadsheetFile(AFileName: string; AFormatID: TsSpreadFormatID = sfidUnknown; AWorksheetIndex: Integer = -1); overload;

Public loader of a spreadsheet file.

Call this method for both built-in and user-provided file formats.

If the workbook is password-protected the password is prompted by a dialog.

Parameters
AFilename
Name of the spreadsheet file to be loaded.
AFormatID
Identifier of the spreadsheet file format assumed for the file.
AWorksheetIndex
Index of the worksheet to be selected after loading. (If empty then the active worksheet is loaded)
Public procedure LoadFromSpreadsheetFile(AFileName: string; AFormat: TsSpreadsheetFormat; AWorksheetIndex: Integer = -1); overload;

Public spreadsheet loader to be used if file format is known.

Call this method only for built-in file formats.

Parameters
AFilename
Name of the spreadsheet file to be loaded.
AFormat
Spreadsheet file format assumed for the file.
AWorksheetIndex
Index of the worksheet to be selected after loading. (If empty then the active worksheet is loaded)
Public procedure LoadFromWorkbook(AWorkbook: TsWorkbook; AWorksheetIndex: Integer = -1);

Uses an already existing workbook in the visual controls.

IMPORTANT: THE CALLING ROUTINE MUST NOT DESTROY THE WORKBOOK, it is destroyed here by the TsWorkbookSource.

Public procedure NotifyListeners(AChangedItems: TsNotificationItems; AData: Pointer = nil);

Notifies listeners of workbook, worksheet, cell, or selection changes. The changed item is identified by the parameter AChangedItems.

Parameters
AChangedItems
A set of elements lniWorkbook, lniWorksheet, lniCell, lniSelection which indicate which item has changed.
AData
Additional information on the change. Is used only for lniCell and points to the cell having a changed value or formatting.
Public procedure PasteCellsFromClipboard(AItem: TsCopyOperation; ATransposed: Boolean = false);

Pastes the cells stored in the internal list "Clipboard" into the worksheet. Using their stored row/col indexes the stored cells are translated such that the first stored cell appears at the currently active cell in the worksheet.

AOperation determines which "item" of the cell (all, values, formats, formula) is pasted.

If ATranspose is True then rows and columns are interchanged.

Public procedure RemoveListener(AListener: TComponent);

Removes a component from the listener list. The component is no longer notified of changes in workbook, worksheet or cells

Parameters
AListener
Listening component to be removed
Public procedure SaveToSpreadsheetFile(AFileName: string; AFormatID: TsSpreadFormatID; AOverwriteExisting: Boolean = true); overload;

Saves the workbook into a file with the specified file name. The file format is determined automatically from the extension. If this file name already exists the file is overwritten if AOverwriteExisting is true.

Parameters
AFileName
Name of the file to which the workbook is to be saved. If the file format is not known is is written as BIFF8/XLS.
AOverwriteExisting
If this file already exists it is overwritten if AOverwriteExisting = True, or an exception is raised if AOverwriteExisting = False.
Public procedure SaveToSpreadsheetFile(AFileName: string; AFormat: TsSpreadsheetFormat; AOverwriteExisting: Boolean = true); overload;

Writes the workbook of the WorkbookSource component to a spreadsheet file.

Call this method for both built-in and user-provided file formats.

Parameters
AFileName
Name of the file to which the workbook is to be saved.
AFormatID
Identifier of the spreadsheet file format in which the file is to be saved.
AOverwriteExisting
If the file already exists, it is overwritten in the case of AOverwriteExisting = True, or an exception is raised otherwise.
Public procedure SaveToSpreadsheetFile(AFileName: string; AOverwriteExisting: Boolean = true); overload;

Writes the workbook of the WorkbookSource component to a spreadsheet file.

Call this method only for built-in file formats.

Parameters
AFileName
Name of the file to which the workbook is to be saved.
AFormat
Spreadsheet file format in which the file is to be saved.
AOverwriteExisting
If the file already exists, it is overwritten in the case of AOverwriteExisting = True, or an exception is raised otherwise.
Public procedure SelectCell(ASheetRow, ASheetCol: Cardinal);

Usually called by code or from the spreadsheet grid component. The method identifies a cell to be "selected". Stores its coordinates in the worksheet ("active cell") and notifies the listening controls

Public procedure SelectWorksheet(AWorkSheet: TsWorksheet);

Selects a worksheet and notifies the controls. This method is usually called by code or from the worksheet tabcontrol.

Parameters
AWorksheet
Instance of the newly selected worksheet.
Public procedure SetPendingOperation(AOperation: TsCopyOperation; const ASelection: TsCellRangeArray);

Defines a "pending operation" which will be executed at next cell select. Source of the operation is the selection passes as a parameter.

Protected procedure AbortSelection;

Generates a message to the grid to abort the selection process. Needed when copying a format (e.g.) cannot be executed due to overlapping ranges. Without the message, the grid would still be in selection mode.

Protected procedure DoShowError(const AErrorMsg: String);

An error has occured during loading of the workbook. Shows a message box by default. But a different behavior can be obtained by means of the OnError event.

Parameters
AErrorMsg
Error message text created by the workbook reader and to be displayed in a messagebox or by means of the OnError handler.
Protected procedure InternalCreateNewWorkbook(AWorkbook: TsWorkbook = nil);

Internal helper method which creates a new workbook without sheets

Protected procedure InternalLoadFromFile(AFileName: string; AAutoDetect: Boolean; AFormatID: TsSpreadFormatID; AWorksheetIndex: Integer; APassword: String);

Internal loader for the spreadsheet file. Is called with various combinations of arguments from several procedures.

Parameters
AFilename
Name of the spreadsheet file to be loaded.
AAutoDetect
Instructs the loader to automatically detect the file format from the file extension or by temporarily opening the file in all available formats. Note that an exception is raised in the IDE when an incorrect format is tested.
AFormatID
Identifier of the spreadsheet file format assumed for the loader. Is ignored when AAutoDetect is False.
AWorksheetIndex
Index of the worksheet to be selected after loading.
APassword
Password to open encrypted workbook. Note: this is supported only by ods and xlsx readers.
Protected procedure InternalLoadFromWorkbook(AWorkbook: TsWorkbook; AWorksheetIndex: Integer = -1);

This item has no description.

Protected procedure Loaded; override;

Inherited method which is called after reading the WorkbookSource from the lfm file.

Is overridden here to open a spreadsheet file if a file name has been assigned to the FileName property at design-time.

Properties

Published property AutoDetectFormat: Boolean read FAutoDetectFormat write FAutoDetectFormat default true;

Automatically detects the fileformat when loading the spreadsheet file specified by FileName

Published property FileFormat: TsSpreadsheetFormat read GetFileFormat write SetFileFormat default sfOOXML;

File format of the next spreadsheet file to be loaded by means of the Filename property. Not used when AutoDetectFormat is TRUE. Note that if FileFormat is sfUser then the format ID must be specified at runtime.

Public property FileFormatID: TsSpreadFormatID read FFileFormatID write SetFileFormatID;

File format identifier of the next spreadsheet file to be loaded by means of the Filename property. Not used when AutoDetectFormat is TRUE. Unlike the published property "FileFormat" the FileFormatID also takes care of user-defined formats.

Published property FileName: TFileName read FFileName write SetFileName;

Name of the loaded spreadsheet file which is loaded by assigning a file name to this property. Format detection is determined by the properties AutoDetectFormat and FileFormat. Using this property loads the file at design-time.

Published property OnError: TsWorkbookSourceErrorEvent read FOnError write FOnError;

A message box is displayey if an error occurs during loading of a spreadsheet. This behavior can be replaced by means of the event OnError.

Published property OnQueryPassword: TsOnQueryPassword read FOnQueryPassword write FOnQueryPassword;

Event fired when a password is required. Handler must return the pwd.

Published property Options: TsWorkbookOptions read FOptions write SetOptions;

A set of options to be transferred to the workbook, for e.g. formula calculation etc.

Public property PendingOperation: TsCopyOperation read FPendingOperation;

Indicates that which operation is waiting to be executed at next cell select

Public property Workbook: TsWorkbook read FWorkbook;

Workbook linked to the WorkbookSource

Public property Worksheet: TsWorksheet read FWorksheet;

Currently selected worksheet of the workbook


fpspreadsheetctrls: Interface IsSpreadsheetControl

Interface IsSpreadsheetControl

Description
Hierarchy
Fields
Methods
Properties

Unit

fpspreadsheetctrls

Declaration

type IsSpreadsheetControl = interface(IInterface)

Description

Interface which allows the workbook source to notify linked controls of changes in the associated workbook.

Attributes
GUID_SpreadsheetControl

Hierarchy

  • IInterface
  • IsSpreadsheetControl

Overview

Methods

Public | procedure ListenerNotification(AChangedItems: TsNotificationItems; AData: Pointer = nil);
Public | procedure RemoveWorkbookSource;

Description

Methods

Public procedure ListenerNotification(AChangedItems: TsNotificationItems; AData: Pointer = nil);

This item has no description.

Public procedure RemoveWorkbookSource;

This item has no description.


fpspreadsheetctrls: Class TsWorkbookTabControl

Class TsWorkbookTabControl

Description
Hierarchy
Fields
Methods
Properties

Unit

fpspreadsheetctrls

Declaration

type TsWorkbookTabControl = class(TTabControl, IsSpreadsheetControl)

Description

TsWorkbookTabControl is a tab control which displays the sheets of the workbook currently loaded by the WorkbookSource in tabs. Selecting another tab is communicated to other spreadsheet controls via the WorkbookSource.

Hierarchy

  • TTabControl
  • TsWorkbookTabControl

Overview

Methods

Public | constructor Create(AOwner: TComponent); override;
Public | destructor Destroy; override;
Protected | function GetWorkbook: TsWorkbook;
Protected | function GetWorksheet: TsWorksheet;
Public | procedure ListenerNotification(AChangedItems: TsNotificationItems; AData: Pointer = nil);
Public | procedure RemoveWorkbookSource;
Protected | procedure Change; override;
Protected | procedure GetSheetList(AList: TStrings);
Protected | procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Properties

Published | property ShowAllSheets: boolean read FShowAllSheets write SetShowAllSheets default true;
Public | property Workbook: TsWorkbook read GetWorkbook;
Published | property WorkbookSource: TsWorkbookSource read FWorkbookSource write SetWorkbookSource;
Public | property Worksheet: TsWorksheet read GetWorksheet;

Description

Methods

Public constructor Create(AOwner: TComponent); override;

Constructor of the WorkbookTabControl.

Public destructor Destroy; override;

Destructor of the WorkbookTabControl. Removes itself from the WorkbookSource's listener list.

Protected function GetWorkbook: TsWorkbook;

Getter method for property "Workbook"

Protected function GetWorksheet: TsWorksheet;

Getter method for property "Worksheet"

Public procedure ListenerNotification(AChangedItems: TsNotificationItems; AData: Pointer = nil);

Notification message received from the WorkbookSource telling which spreadsheet item has changed.

Responds to workbook changes by reading the worksheet names into the tabs, and to worksheet changes by selecting the tab corresponding to the selected worksheet.

Parameters
AChangedItems
Set with elements identifying whether workbook, worksheet cell content or cell formatting has changed.
AData
Additional data, not used here.
Public procedure RemoveWorkbookSource;

Removes the link of the TabControl to the WorkbookSource. Required before destruction.

Protected procedure Change; override;

The currently active tab has been changed. The WorkbookSource must activate the corresponding worksheet and notify its listening components of the change.

Protected procedure GetSheetList(AList: TStrings);

Populates a (string) list with the names of the workbook's sheet names. If ShowHiddenSheets is false hidden worksheets are skipped. Is called whenever the workbook changes.

Protected procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Standard component notification. Must clean up the WorkbookSource field when the workbook source is going to be deleted.

Properties

Published property ShowAllSheets: boolean read FShowAllSheets write SetShowAllSheets default true;

This item has no description.

Public property Workbook: TsWorkbook read GetWorkbook;

The worksheet names of this workbook are currently displayed as tabs of the TabControl.

Published property WorkbookSource: TsWorkbookSource read FWorkbookSource write SetWorkbookSource;

Link to the WorkbookSource which provides the data.

Public property Worksheet: TsWorksheet read GetWorksheet;

Identifies the worksheet which corresponds to the selected tab


fpspreadsheetctrls: Class TsWorksheetIndicator

Class TsWorksheetIndicator

Description
Hierarchy
Fields
Methods
Properties

Unit

fpspreadsheetctrls

Declaration

type TsWorksheetIndicator = class(TCustomComboBox, IsSpreadsheetControl)

Description

TsWorksheetIndicator is a combobox control which displays the sheets of the workbook currently loaded by the WorkbookSource.

Hierarchy

  • TCustomComboBox
  • TsWorksheetIndicator

Overview

Methods

Public | constructor Create(AOwner: TComponent); override;
Public | destructor Destroy; override;
Protected | function GetWorkbook: TsWorkbook;
Protected | function GetWorksheet: TsWorksheet;
Public | procedure ListenerNotification(AChangedItems: TsNotificationItems; AData: Pointer = nil);
Public | procedure RemoveWorkbookSource;
Protected | procedure Change; override;
Protected | procedure GetSheetList(AList: TStrings);
Protected | procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Properties

Published | property Align;
Published | property Anchors;
Published | property ArrowKeysTraverseList;
Published | property AutoComplete;
Published | property AutoCompleteText;
Published | property AutoDropDown;
Published | property AutoSelect;
Published | property AutoSize;
Published | property BidiMode;
Published | property BorderSpacing;
Published | property BorderStyle;
Published | property CharCase;
Published | property Color;
Published | property Constraints;
Published | property DragCursor;
Published | property DragKind;
Published | property DragMode;
Published | property DropDownCount;
Published | property Enabled;
Published | property Font;
Published | property ItemIndex;
Published | property ItemWidth;
Published | property MaxLength;
Published | property OnChange;
Published | property OnChangeBounds;
Published | property OnClick;
Published | property OnCloseUp;
Published | property OnContextPopup;
Published | property OnDblClick;
Published | property OnDragDrop;
Published | property OnDragOver;
Published | property OnDrawItem;
Published | property OnDropDown;
Published | property OnEditingDone;
Published | property OnEndDrag;
Published | property OnEnter;
Published | property OnExit;
Published | property OnGetItems;
Published | property OnKeyDown;
Published | property OnKeyPress;
Published | property OnKeyUp;
Published | property OnMeasureItem;
Published | property OnMouseDown;
Published | property OnMouseEnter;
Published | property OnMouseLeave;
Published | property OnMouseMove;
Published | property OnMouseUp;
Published | property OnMouseWheel;
Published | property OnMouseWheelDown;
Published | property OnMouseWheelUp;
Published | property OnSelect;
Published | property OnStartDrag;
Published | property OnUTF8KeyPress;
Published | property ParentBidiMode;
Published | property ParentColor;
Published | property ParentFont;
Published | property ParentShowHint;
Published | property PopupMenu;
Published | property ShowAllSheets: boolean read FShowAllSheets write SetShowAllSheets default true;
Published | property ShowHint;
Published | property Sorted;
Published | property TabOrder;
Published | property TabStop;
Published | property Text;
Published | property Visible;
Public | property Workbook: TsWorkbook read GetWorkbook;
Published | property WorkbookSource: TsWorkbookSource read FWorkbookSource write SetWorkbookSource;
Public | property Worksheet: TsWorksheet read GetWorksheet;

Description

Methods

Public constructor Create(AOwner: TComponent); override;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Protected function GetWorkbook: TsWorkbook;

This item has no description.

Protected function GetWorksheet: TsWorksheet;

This item has no description.

Public procedure ListenerNotification(AChangedItems: TsNotificationItems; AData: Pointer = nil);

This item has no description.

Public procedure RemoveWorkbookSource;

This item has no description.

Protected procedure Change; override;

This item has no description.

Protected procedure GetSheetList(AList: TStrings);

This item has no description.

Protected procedure Notification(AComponent: TComponent; Operation: TOperation); override;

This item has no description.

Properties

Published property Align;

This item has no description.

Published property Anchors;

This item has no description.

Published property ArrowKeysTraverseList;

This item has no description.

Published property AutoComplete;

This item has no description.

Published property AutoCompleteText;

This item has no description.

Published property AutoDropDown;

This item has no description.

Published property AutoSelect;

This item has no description.

Published property AutoSize;

This item has no description.

Published property BidiMode;

This item has no description.

Published property BorderSpacing;

This item has no description.

Published property BorderStyle;

This item has no description.

Published property CharCase;

This item has no description.

Published property Color;

This item has no description.

Published property Constraints;

This item has no description.

Published property DragCursor;

This item has no description.

Published property DragKind;

This item has no description.

Published property DragMode;

This item has no description.

Published property DropDownCount;

This item has no description.

Published property Enabled;

This item has no description.

Published property Font;

This item has no description.

Published property ItemIndex;

This item has no description.

Published property ItemWidth;

This item has no description.

Published property MaxLength;

This item has no description.

Published property OnChange;

This item has no description.

Published property OnChangeBounds;

This item has no description.

Published property OnClick;

This item has no description.

Published property OnCloseUp;

This item has no description.

Published property OnContextPopup;

This item has no description.

Published property OnDblClick;

This item has no description.

Published property OnDragDrop;

This item has no description.

Published property OnDragOver;

This item has no description.

Published property OnDrawItem;

This item has no description.

Published property OnDropDown;

This item has no description.

Published property OnEditingDone;

This item has no description.

Published property OnEndDrag;

This item has no description.

Published property OnEnter;

This item has no description.

Published property OnExit;

This item has no description.

Published property OnGetItems;

This item has no description.

Published property OnKeyDown;

This item has no description.

Published property OnKeyPress;

This item has no description.

Published property OnKeyUp;

This item has no description.

Published property OnMeasureItem;

This item has no description.

Published property OnMouseDown;

This item has no description.

Published property OnMouseEnter;

This item has no description.

Published property OnMouseLeave;

This item has no description.

Published property OnMouseMove;

This item has no description.

Published property OnMouseUp;

This item has no description.

Published property OnMouseWheel;

This item has no description.

Published property OnMouseWheelDown;

This item has no description.

Published property OnMouseWheelUp;

This item has no description.

Published property OnSelect;

This item has no description.

Published property OnStartDrag;

This item has no description.

Published property OnUTF8KeyPress;

This item has no description.

Published property ParentBidiMode;

This item has no description.

Published property ParentColor;

This item has no description.

Published property ParentFont;

This item has no description.

Published property ParentShowHint;

This item has no description.

Published property PopupMenu;

This item has no description.

Published property ShowAllSheets: boolean read FShowAllSheets write SetShowAllSheets default true;

This item has no description.

Published property ShowHint;

This item has no description.

Published property Sorted;

This item has no description.

Published property TabOrder;

This item has no description.

Published property TabStop;

This item has no description.

Published property Text;

This item has no description.

Published property Visible;

This item has no description.

Public property Workbook: TsWorkbook read GetWorkbook;

This item has no description.

Published property WorkbookSource: TsWorkbookSource read FWorkbookSource write SetWorkbookSource;

This item has no description.

Public property Worksheet: TsWorksheet read GetWorksheet;

This item has no description.


fpspreadsheetctrls: Class TsCellEdit

Class TsCellEdit

Description
Hierarchy
Fields
Methods
Properties

Unit

fpspreadsheetctrls

Declaration

type TsCellEdit = class(TMemo, IsSpreadsheetControl)

Description

TsCellEdit allows to edit the content or formula of the active cell of a worksheet, simular to Excel's cell editor above the cell grid.

Hierarchy

  • TMemo
  • TsCellEdit

Overview

Fields

Protected FEditText: String;

Methods

Public | constructor Create(AOwner: TComponent); override;
Public | destructor Destroy; override;
Protected | function CanEditCell(ACell: PCell): Boolean; overload;
Protected | function CanEditCell(ARow, ACol: Cardinal): Boolean; overload;
Protected | function DoValidText(const AText: String): Boolean; virtual;
Protected | function ValidFormula(AFormula: String; out AErrMsg: String): Boolean;
Public | procedure EditingDone; override;
Public | procedure ListenerNotification(AChangedItems: TsNotificationItems; AData: Pointer = nil);
Public | procedure RemoveWorkbookSource;
Protected | procedure DoEnter; override;
Protected | procedure DoExit; override;
Protected | procedure KeyDown(var Key: Word; Shift: TShiftState); override;
Protected | procedure KeyUp(var Key: Word; Shift: TShiftState); override;
Protected | procedure Notification(AComponent: TComponent; Operation: TOperation); override;
Protected | procedure ShowCell(ACell: PCell); virtual;
Protected | procedure WriteToCell;

Properties

Public | property SelectedCell: PCell read GetSelectedCell;
Published | property ShowHTMLText: Boolean read FShowHTMLText write FShowHTMLText default true;
Published | property WantReturns default false;
Public | property Workbook: TsWorkbook read GetWorkbook;
Published | property WorkbookSource: TsWorkbookSource read FWorkbookSource write SetWorkbookSource;
Public | property Worksheet: TsWorksheet read GetWorksheet;

Description

Fields

Protected FEditText: String;

This item has no description.

Methods

Public constructor Create(AOwner: TComponent); override;

Constructor of the spreadsheet edit control. Disables RETURN and TAB keys. RETURN characters can still be entered into the edited text by pressing CTRL+RETURN

Parameters
AOwner
Component which is responsible to destroy the CellEdit
Public destructor Destroy; override;

Destructor of the TsCellEdit. Removes itself from the WorkbookSource's listener list.

Protected function CanEditCell(ACell: PCell): Boolean; overload;

This item has no description.

Protected function CanEditCell(ARow, ACol: Cardinal): Boolean; overload;

This item has no description.

Protected function DoValidText(const AText: String): Boolean; virtual;

Validation function for the current text in the edit control called by the handler of the message posted in DoExit. Checks whether a formula is valid. If not, the currently selected cell and the edit's Text are restored, and an error message is displayed.

Protected function ValidFormula(AFormula: String; out AErrMsg: String): Boolean;

Checks valididty of the provided formula and creates a corresponding error message.

It is assumed that the formula is localized.

Returns

True if the provided string is a valid formula or no formula, False otherwise. In the latter case an error message string is returned as well.

Public procedure EditingDone; override;

EditingDone is called when the user presses the RETURN key to finish editing. If the current Text is an invalid formula an error message is displayed and nothing else happens. Otherwise, however, the edited text is written to the worksheet which tries to figure out the data type.

Public procedure ListenerNotification(AChangedItems: TsNotificationItems; AData: Pointer = nil);

Notification message received from the WorkbookSource telling which item of the spreadsheet has changed. Responds to selection and cell changes by updating the cell content.

Parameters
AChangedItems
Set with elements identifying whether workbook, worksheet cell content or cell formatting has changed.
AData
If AChangedItems contains nliCell then AData points to the modified cell.
Public procedure RemoveWorkbookSource;

Removes the link of the CellEdit to the WorkbookSource. Required before destruction.

Protected procedure DoEnter; override;

This item has no description.

Protected procedure DoExit; override;

DoExit is called when the edit has lost focus. Posts a message to the end of the message queue in order to complete the focus change operation and to trigger validation of the edit afterwards (which will restore the edit as focused control if validation fails.

Source of the idea: https://community.embarcadero.com/article/technical-articles/149-tools/12766-validating-input-in-tedit-components

Protected procedure KeyDown(var Key: Word; Shift: TShiftState); override;

Inherited KeyDown method. Overridden here in order to be able to restore the old cell content if ESC is pressed.

Protected procedure KeyUp(var Key: Word; Shift: TShiftState); override;

This item has no description.

Protected procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Standard component notification. Called when the WorkbookSource is deleted.

Protected procedure ShowCell(ACell: PCell); virtual;

Loads the contents of a cell into the editor. Shows the formula if available, but not the calculation result. Numbers are displayed in full precision. Date and time values are shown in the long formats.

Parameters
ACell
Pointer to the cell loaded into the cell editor.
Protected procedure WriteToCell;

Writes the current edit text to the cell

Note
All validation checks already have been performed.

Properties

Public property SelectedCell: PCell read GetSelectedCell;

Pointer to the currently active cell in the workbook. This cell is displayed in the control and can be edited.

Published property ShowHTMLText: Boolean read FShowHTMLText write FShowHTMLText default true;

This item has no description.

Published property WantReturns default false;

This item has no description.

Public property Workbook: TsWorkbook read GetWorkbook;

Refers to the underlying workbook to which the edited cell belongs.

Published property WorkbookSource: TsWorkbookSource read FWorkbookSource write SetWorkbookSource;

Link to the WorkbookSource which provides the workbook and worksheet.

Public property Worksheet: TsWorksheet read GetWorksheet;

Refers to the underlying worksheet to which the edited cell belongs.


fpspreadsheetctrls: Class TsCellIndicator

Class TsCellIndicator

Description
Hierarchy
Fields
Methods
Properties

Unit

fpspreadsheetctrls

Declaration

type TsCellIndicator = class(TCustomEdit, IsSpreadsheetControl)

Description

TsCellIndicator displays the address of the currently active cell of the worksheet and workbook. Editing the address allows to jump to the corresponding cell.

Hierarchy

  • TCustomEdit
  • TsCellIndicator

Overview

Methods

Public | constructor Create(AOwner: TComponent); override;
Public | destructor Destroy; override;
Public | procedure EditingDone; override;
Public | procedure ListenerNotification(AChangedItems: TsNotificationItems; AData: Pointer = nil);
Public | procedure RemoveWorkbookSource;
Protected | procedure Notification(AComponent: TComponent; Operation: TOperation); override;
Protected | procedure UpdateDisplay;

Properties

Published | property Action;
Published | property Align;
Published | property Alignment default taCenter;
Published | property Anchors;
Published | property AutoSelect;
Published | property AutoSize;
Published | property BidiMode;
Published | property BorderSpacing;
Published | property BorderStyle;
Published | property Color;
Published | property Constraints;
Published | property DragCursor;
Published | property DragKind;
Published | property DragMode;
Published | property Enabled;
Published | property Font;
Published | property HideSelection;
Published | property MaxLength;
Published | property OnChange;
Published | property OnChangeBounds;
Published | property OnClick;
Published | property OnContextPopup;
Published | property OnDblClick;
Published | property OnDragDrop;
Published | property OnDragOver;
Published | property OnEditingDone;
Published | property OnEndDrag;
Published | property OnEnter;
Published | property OnExit;
Published | property OnKeyDown;
Published | property OnKeyPress;
Published | property OnKeyUp;
Published | property OnMouseDown;
Published | property OnMouseEnter;
Published | property OnMouseLeave;
Published | property OnMouseMove;
Published | property OnMouseUp;
Published | property OnMouseWheel;
Published | property OnMouseWheelDown;
Published | property OnMouseWheelUp;
Published | property OnResize;
Published | property OnStartDrag;
Published | property OnUTF8KeyPress;
Published | property ParentBidiMode;
Published | property ParentColor;
Published | property ParentFont;
Published | property ParentShowHint;
Published | property PopupMenu;
Published | property ReadOnly;
Published | property ShowHint;
Published | property TabOrder;
Published | property TabStop;
Published | property Text;
Published | property Visible;
Public | property Workbook: TsWorkbook read GetWorkbook;
Published | property WorkbookSource: TsWorkbookSource read FWorkbookSource write SetWorkbookSource;
Public | property Worksheet: TsWorksheet read GetWorksheet;

Description

Methods

Public constructor Create(AOwner: TComponent); override;

Constructor of the TsCellIndicator class. Is overridden to set the default value of the Alignment property to taCenter.

Public destructor Destroy; override;

Destructor of the cell indicator. Removes itself from the WorkbookSource's listener list.

Public procedure EditingDone; override;

EditingDone is called when the user presses the RETURN key to finish editing, or the TAB key which removes focus from the control, or clicks somewhere else The edited text is interpreted as a cell address. The corresponding cell is selected.

Public procedure ListenerNotification(AChangedItems: TsNotificationItems; AData: Pointer = nil);

The cell indicator reacts to notification that the selection has changed and displays the address of the newly selected cell as editable text.

Parameters
AChangedItems
Set with elements identifying whether workbook, worksheet cell or selection has changed. Only the latter element is considered by the cell indicator.
AData
If AChangedItems contains nliCell then AData points to the modified cell.
Public procedure RemoveWorkbookSource;

Removes the link of the CellIndicator to the WorkbookSource. Required before destruction.

Protected procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Standard component notification called when the WorkbookSource is deleted.

Protected procedure UpdateDisplay;

This item has no description.

Properties

Published property Action;

This item has no description.

Published property Align;

This item has no description.

Published property Alignment default taCenter;

This item has no description.

Published property Anchors;

This item has no description.

Published property AutoSelect;

This item has no description.

Published property AutoSize;

This item has no description.

Published property BidiMode;

This item has no description.

Published property BorderSpacing;

This item has no description.

Published property BorderStyle;

This item has no description.

Published property Color;

This item has no description.

Published property Constraints;

This item has no description.

Published property DragCursor;

This item has no description.

Published property DragKind;

This item has no description.

Published property DragMode;

This item has no description.

Published property Enabled;

This item has no description.

Published property Font;

This item has no description.

Published property HideSelection;

This item has no description.

Published property MaxLength;

This item has no description.

Published property OnChange;

This item has no description.

Published property OnChangeBounds;

This item has no description.

Published property OnClick;

This item has no description.

Published property OnContextPopup;

This item has no description.

Published property OnDblClick;

This item has no description.

Published property OnDragDrop;

This item has no description.

Published property OnDragOver;

This item has no description.

Published property OnEditingDone;

This item has no description.

Published property OnEndDrag;

This item has no description.

Published property OnEnter;

This item has no description.

Published property OnExit;

This item has no description.

Published property OnKeyDown;

This item has no description.

Published property OnKeyPress;

This item has no description.

Published property OnKeyUp;

This item has no description.

Published property OnMouseDown;

This item has no description.

Published property OnMouseEnter;

This item has no description.

Published property OnMouseLeave;

This item has no description.

Published property OnMouseMove;

This item has no description.

Published property OnMouseUp;

This item has no description.

Published property OnMouseWheel;

This item has no description.

Published property OnMouseWheelDown;

This item has no description.

Published property OnMouseWheelUp;

This item has no description.

Published property OnResize;

This item has no description.

Published property OnStartDrag;

This item has no description.

Published property OnUTF8KeyPress;

This item has no description.

Published property ParentBidiMode;

This item has no description.

Published property ParentColor;

This item has no description.

Published property ParentFont;

This item has no description.

Published property ParentShowHint;

This item has no description.

Published property PopupMenu;

This item has no description.

Published property ReadOnly;

This item has no description.

Published property ShowHint;

This item has no description.

Published property TabOrder;

This item has no description.

Published property TabStop;

This item has no description.

Published property Text;

This item has no description.

Published property Visible;

This item has no description.

Public property Workbook: TsWorkbook read GetWorkbook;

Refers to the underlying worksheet to which the edited cell belongs.

Published property WorkbookSource: TsWorkbookSource read FWorkbookSource write SetWorkbookSource;

Link to the WorkbookSource which provides the workbook and worksheet.

Public property Worksheet: TsWorksheet read GetWorksheet;

Refers to the underlying worksheet to which the edited cell belongs.


fpspreadsheetctrls: Class TsCellCombobox

Class TsCellCombobox

Description
Hierarchy
Fields
Methods
Properties

Unit

fpspreadsheetctrls

Declaration

type TsCellCombobox = class(TCustomCombobox, IsSpreadsheetControl)

Description

TsCellCombobox is a multi-purpose combobox for selection of formatting items of a cell

Hierarchy

  • TCustomCombobox
  • TsCellCombobox

Overview

Methods

Public | constructor Create(AOwner: TComponent); override;
Public | destructor Destroy; override;
Protected | function GetActiveCell: PCell;
Public | procedure AddColor(AColor: TsColor; AColorName: String);
Public | procedure ListenerNotification(AChangedItems: TsNotificationItems; AData: Pointer = nil);
Public | procedure RemoveWorkbookSource;
Protected | procedure ApplyFormat(ARow, ACol: cardinal);
Protected | procedure ApplyFormatToCell(ARow, ACol: Cardinal); virtual;
Protected | procedure ApplyFormatToCol(ACol: Cardinal); virtual;
Protected | procedure ApplyFormatToDefault; virtual;
Protected | procedure ApplyFormatToRow(ARow: Cardinal); virtual;
Protected | procedure Change; override;
Protected | procedure DrawItem(AIndex: Integer; ARect: TRect; AState: TOwnerDrawState); override;
Protected | procedure ExtractFromCell(ARow, ACol: Cardinal); virtual;
Protected | procedure ExtractFromCol(ACol: Cardinal); virtual;
Protected | procedure ExtractFromDefault; virtual;
Protected | procedure ExtractFromRow(ARow: Cardinal); virtual;
Protected | procedure ExtractFromSheet;
Protected | procedure Loaded; override;
Protected | procedure Notification(AComponent: TComponent; Operation: TOperation); override;
Protected | procedure Populate; virtual;
Protected | procedure ProcessItem;
Protected | procedure Select; override;

Properties

Published | property Align;
Published | property Anchors;
Published | property ArrowKeysTraverseList;
Published | property AutoComplete;
Published | property AutoCompleteText;
Published | property AutoDropDown;
Published | property AutoSelect;
Published | property AutoSize;
Published | property BidiMode;
Published | property BorderSpacing;
Published | property BorderStyle;
Published | property CellFormatItem: TsCellFormatItem read FFormatItem write SetFormatItem default cfiFontName;
Published | property CharCase;
Published | property Color;
Published | property ColorRectOffset: Integer read FColorRectOffset write SetColorRectOffset default 2;
Published | property ColorRectWidth: Integer read FColorRectWidth write SetColorRectWidth default 10;
Published | property Constraints;
Published | property DragCursor;
Published | property DragKind;
Published | property DragMode;
Published | property DropDownCount;
Published | property Enabled;
Published | property Font;
Published | property FormatTarget: TsFormatTarget read FFormatTarget write SetFormatTarget default ftCell;
Published | property ItemIndex;
Protected | property Items stored false;
Published | property ItemWidth;
Published | property MaxLength;
Published | property OnAddColors: TNotifyEvent read FOnAddColors write FOnAddColors;
Published | property OnChange;
Published | property OnChangeBounds;
Published | property OnClick;
Published | property OnCloseUp;
Published | property OnContextPopup;
Published | property OnDblClick;
Published | property OnDragDrop;
Published | property OnDragOver;
Published | property OnDrawItem;
Published | property OnDropDown;
Published | property OnEditingDone;
Published | property OnEndDrag;
Published | property OnEnter;
Published | property OnExit;
Published | property OnGetColorName: TsColorNameEvent read FOnGetColorName write FOnGetColorName;
Published | property OnGetItems;
Published | property OnKeyDown;
Published | property OnKeyPress;
Published | property OnKeyUp;
Published | property OnMeasureItem;
Published | property OnMouseDown;
Published | property OnMouseEnter;
Published | property OnMouseLeave;
Published | property OnMouseMove;
Published | property OnMouseUp;
Published | property OnMouseWheel;
Published | property OnMouseWheelDown;
Published | property OnMouseWheelUp;
Published | property OnSelect;
Published | property OnStartDrag;
Published | property OnUTF8KeyPress;
Published | property ParentBidiMode;
Published | property ParentColor;
Published | property ParentFont;
Published | property ParentShowHint;
Published | property PopupMenu;
Published | property ShowHint;
Published | property Sorted;
Published | property TabOrder;
Published | property TabStop;
Published | property Text;
Published | property Visible;
Public | property Workbook: TsWorkbook read GetWorkbook;
Published | property WorkbookSource: TsWorkbookSource read FWorkbookSource write SetWorkbookSource;
Public | property Worksheet: TsWorksheet read GetWorksheet;

Description

Methods

Public constructor Create(AOwner: TComponent); override;

Constructor of the Cell Combobox. Populates the items list

Public destructor Destroy; override;

Destructor of the WorkbookTabControl. Removes itself from the WorkbookSource's listener list.

Protected function GetActiveCell: PCell;

Returns the currently active cell of the worksheet

Public procedure AddColor(AColor: TsColor; AColorName: String);

Adds a named color to the combobox items

Public procedure ListenerNotification(AChangedItems: TsNotificationItems; AData: Pointer = nil);

Notification procedure received whenver "something" changes in the workbook. Reacts on all events.

Parameters
AChangedItems
Set with elements identifying whether workbook, worksheet cell or selection has changed.
AData
If AChangedItems contains nliCell then AData points to the modified cell.
Public procedure RemoveWorkbookSource;

Removes the link of the CellCombobox to the WorkbookSource. Required before destruction.

Protected procedure ApplyFormat(ARow, ACol: cardinal);

Apply the selected format style to the cell, column, row or default format (depending in FFormatTarget)

Protected procedure ApplyFormatToCell(ARow, ACol: Cardinal); virtual;

Applies the format to a cell. Override according to the format item for which the combobox is responsible.

Protected procedure ApplyFormatToCol(ACol: Cardinal); virtual;

Applies the format to a column format record. Override according to the format item for which the combobox is responsible.

Protected procedure ApplyFormatToDefault; virtual;

This item has no description.

Protected procedure ApplyFormatToRow(ARow: Cardinal); virtual;

Applies the format to a row format record. Override according to the format item for which the combobox is responsible.

Protected procedure Change; override;

The text of the currently selected combobox item has been changed. Calls "ProcessValue" to changes the selected cells according to the Mode property by calling ApplyFormat.

Protected procedure DrawItem(AIndex: Integer; ARect: TRect; AState: TOwnerDrawState); override;

Customdraws an item in the combobox. This is overridden to paint a color box for the color-related format items.

Protected procedure ExtractFromCell(ARow, ACol: Cardinal); virtual;

Extracts the format item the combobox is responsible for from the cell and selectes the corresponding combobox item.

Protected procedure ExtractFromCol(ACol: Cardinal); virtual;

This item has no description.

Protected procedure ExtractFromDefault; virtual;

This item has no description.

Protected procedure ExtractFromRow(ARow: Cardinal); virtual;

This item has no description.

Protected procedure ExtractFromSheet;

This item has no description.

Protected procedure Loaded; override;

Standard method. Overridden to populate combobox since items are not stored in lfm file.

Protected procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Standard component notification method called when the WorkbookSource is deleted.

Protected procedure Populate; virtual;

Descendants override this method to populate the items of the combobox. Color index into the workbook's palette is stored in the "Objects" property.

Protected procedure ProcessItem;

Processes the selected combobox item after a new item has been selected or the item text has been edited.

Changes the selected cells according to the Mode property by calling ApplyFormatToCell.

Protected procedure Select; override;

A new item in the combobox is selected. Calls "ProcessValue" to changes the selected cells according to the Mode property by calling ApplyFormatToCell.

Properties

Published property Align;

This item has no description.

Published property Anchors;

This item has no description.

Published property ArrowKeysTraverseList;

This item has no description.

Published property AutoComplete;

This item has no description.

Published property AutoCompleteText;

This item has no description.

Published property AutoDropDown;

This item has no description.

Published property AutoSelect;

This item has no description.

Published property AutoSize;

This item has no description.

Published property BidiMode;

This item has no description.

Published property BorderSpacing;

This item has no description.

Published property BorderStyle;

This item has no description.

Published property CellFormatItem: TsCellFormatItem read FFormatItem write SetFormatItem default cfiFontName;

Identifies the cell format property to be used in the combobox

Published property CharCase;

This item has no description.

Published property Color;

This item has no description.

Published property ColorRectOffset: Integer read FColorRectOffset write SetColorRectOffset default 2;

Margin around the color box

Published property ColorRectWidth: Integer read FColorRectWidth write SetColorRectWidth default 10;

Width of the color box shown for the color-related format items

Published property Constraints;

This item has no description.

Published property DragCursor;

This item has no description.

Published property DragKind;

This item has no description.

Published property DragMode;

This item has no description.

Published property DropDownCount;

This item has no description.

Published property Enabled;

This item has no description.

Published property Font;

This item has no description.

Published property FormatTarget: TsFormatTarget read FFormatTarget write SetFormatTarget default ftCell;

Determine whether the selected color applies to a cell, row, column or default format

Published property ItemIndex;

This item has no description.

Protected property Items stored false;

This item has no description.

Published property ItemWidth;

This item has no description.

Published property MaxLength;

This item has no description.

Published property OnAddColors: TNotifyEvent read FOnAddColors write FOnAddColors;

Event which adds the colors to the combobox

Published property OnChange;

This item has no description.

Published property OnChangeBounds;

This item has no description.

Published property OnClick;

This item has no description.

Published property OnCloseUp;

This item has no description.

Published property OnContextPopup;

This item has no description.

Published property OnDblClick;

This item has no description.

Published property OnDragDrop;

This item has no description.

Published property OnDragOver;

This item has no description.

Published property OnDrawItem;

This item has no description.

Published property OnDropDown;

This item has no description.

Published property OnEditingDone;

This item has no description.

Published property OnEndDrag;

This item has no description.

Published property OnEnter;

This item has no description.

Published property OnExit;

This item has no description.

Published property OnGetColorName: TsColorNameEvent read FOnGetColorName write FOnGetColorName;

Event to get a decent name of the colors of the combo

Published property OnGetItems;

This item has no description.

Published property OnKeyDown;

This item has no description.

Published property OnKeyPress;

This item has no description.

Published property OnKeyUp;

This item has no description.

Published property OnMeasureItem;

This item has no description.

Published property OnMouseDown;

This item has no description.

Published property OnMouseEnter;

This item has no description.

Published property OnMouseLeave;

This item has no description.

Published property OnMouseMove;

This item has no description.

Published property OnMouseUp;

This item has no description.

Published property OnMouseWheel;

This item has no description.

Published property OnMouseWheelDown;

This item has no description.

Published property OnMouseWheelUp;

This item has no description.

Published property OnSelect;

This item has no description.

Published property OnStartDrag;

This item has no description.

Published property OnUTF8KeyPress;

This item has no description.

Published property ParentBidiMode;

This item has no description.

Published property ParentColor;

This item has no description.

Published property ParentFont;

This item has no description.

Published property ParentShowHint;

This item has no description.

Published property PopupMenu;

This item has no description.

Published property ShowHint;

This item has no description.

Published property Sorted;

This item has no description.

Published property TabOrder;

This item has no description.

Published property TabStop;

This item has no description.

Published property Text;

This item has no description.

Published property Visible;

This item has no description.

Public property Workbook: TsWorkbook read GetWorkbook;

Refers to the underlying workbook

Published property WorkbookSource: TsWorkbookSource read FWorkbookSource write SetWorkbookSource;

Link to the WorkbookSource which provides the workbook and worksheet.

Public property Worksheet: TsWorksheet read GetWorksheet;

Refers to the underlying worksheet containing the displayed cell


fpspreadsheetctrls: Class TsSpreadsheetInspector

Class TsSpreadsheetInspector

Description
Hierarchy
Fields
Methods
Properties

Unit

fpspreadsheetctrls

Declaration

type TsSpreadsheetInspector = class(TValueListEditor, IsSpreadsheetControl)

Description

TsSpreadsheetInspector displays all properties of a workbook, worksheet, cell content and cell formatting in a way similar to the Object Inspector of Lazarus.

Hierarchy

  • TValueListEditor
  • TsSpreadsheetInspector

Overview

Methods

Public | constructor Create(AOwner: TComponent); override;
Public | destructor Destroy; override;
Public | procedure ListenerNotification(AChangedItems: TsNotificationItems; AData: Pointer = nil);
Public | procedure RemoveWorkbookSource;
Protected | procedure DblClick; override;
Protected | procedure DoUpdate; virtual;
Protected | procedure Notification(AComponent: TComponent; Operation: TOperation); override;
Protected | procedure UpdateCellProperties(ACell: PCell; AStrings: TStrings); virtual;
Protected | procedure UpdateCellValue(ACell: PCell; AStrings: TStrings); virtual;
Protected | procedure UpdateCol(ACol: Integer; AStrings: TStrings); virtual;
Protected | procedure UpdateFormatProperties(AFormatIndex: integer; AStrings: TStrings); virtual;
Protected | procedure UpdateRow(ARow: Integer; AStrings: TStrings); virtual;
Protected | procedure UpdateWorkbook(AWorkbook: TsWorkbook; AStrings: TStrings); virtual;
Protected | procedure UpdateWorksheet(ASheet: TsWorksheet; AStrings: TStrings); virtual;

Properties

Published | property DisplayOptions default [doColumnTitles, doAutoColResize];
Published | property ExpandedNodes: TsInspectorExpandedNodes read FExpanded write SetExpanded default [ienFormatSettings, ienConditionalFormats, ienPageLayout, ienFonts, ienFormats, ienEmbeddedObj, ienImages, ienCryptoInfo];
Published | property ExtendedColSizing;
Published | property FixedCols default 0;
Published | property Mode: TsInspectorMode read FMode write SetMode;
Public | property Workbook: TsWorkbook read GetWorkbook;
Published | property WorkbookSource: TsWorkbookSource read FWorkbookSource write SetWorkbookSource;
Public | property Worksheet: TsWorksheet read GetWorksheet;

Description

Methods

Public constructor Create(AOwner: TComponent); override;

Constructor of the TsSpreadsheetInspector class. Is overridden to set the default values of DisplayOptions and FixedCols, and to define the column captions.

Public destructor Destroy; override;

Destructor of the spreadsheet inspector. Removes itself from the WorkbookSource's listener list.

Public procedure ListenerNotification(AChangedItems: TsNotificationItems; AData: Pointer = nil);

Notification procedure received whenver "something" changes in the workbook. Reacts on all events.

Parameters
AChangedItems
Set with elements identifying whether workbook, worksheet cell or selection has changed.
AData
If AChangedItems contains nliCell then AData points to the modified cell.
Public procedure RemoveWorkbookSource;

Removes the link of the SpreadsheetInspector to the WorkbookSource. Required before destruction.

Protected procedure DblClick; override;

Double-click on an expandable line expands or collapsed the sub-items

Protected procedure DoUpdate; virtual;

Updates the data shown by the inspector grid. Display depends on the FMode setting (workbook, worksheet, cell values, cell properties).

Protected procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Standard component notification method called when the WorkbookSource is deleted.

Protected procedure UpdateCellProperties(ACell: PCell; AStrings: TStrings); virtual;

Creates a string list containing the formatting properties of a specific cell. The string list items are name-value pairs in the format "name=value". The string list is displayed in the inspector's grid.

Parameters
ACell
Pointer to cell under investigation
AStrings
Stringlist receiving the name-value pairs.
Protected procedure UpdateCellValue(ACell: PCell; AStrings: TStrings); virtual;

Creates a string list containing the value data of a specific cell. The string list items are name-value pairs in the format "name=value". The string list is displayed in the inspector's grid.

Parameters
ACell
Pointer to cell under investigation
AStrings
Stringlist receiving the name-value pairs.
Protected procedure UpdateCol(ACol: Integer; AStrings: TStrings); virtual;

Creates a string list containing the properties of a column. The string list items are name-value pairs in the format "name=value". The string list is displayed in the inspector's grid.

Parameters
ACol
index of the investigated column
AStrings
Stringlist receiving the name-value pairs.
Protected procedure UpdateFormatProperties(AFormatIndex: integer; AStrings: TStrings); virtual;

This item has no description.

Protected procedure UpdateRow(ARow: Integer; AStrings: TStrings); virtual;

Creates a string list containing the properties of a row. The string list items are name-value pairs in the format "name=value". The string list is displayed in the inspector's grid.

Parameters
ARow
index of the investigated row
AStrings
Stringlist receiving the name-value pairs.
Protected procedure UpdateWorkbook(AWorkbook: TsWorkbook; AStrings: TStrings); virtual;

Creates a string list containing the properties of the workbook. The string list items are name-value pairs in the format "name=value". The string list is displayed in the inspector's grid.

Parameters
AWorkbook
Workbook under investigation
AStrings
Stringlist receiving the name-value pairs.
Protected procedure UpdateWorksheet(ASheet: TsWorksheet; AStrings: TStrings); virtual;

Creates a string list containing the properties of a worksheet. The string list items are name-value pairs in the format "name=value". The string list is displayed in the inspector's grid.

Parameters
ASheet
Worksheet under investigation
AStrings
Stringlist receiving the name-value pairs.

Properties

Published property DisplayOptions default [doColumnTitles, doAutoColResize];

inherited from TValueListEditor, activates column titles and automatic column width adjustment by default

Published property ExpandedNodes: TsInspectorExpandedNodes read FExpanded write SetExpanded default [ienFormatSettings, ienConditionalFormats, ienPageLayout, ienFonts, ienFormats, ienEmbeddedObj, ienImages, ienCryptoInfo];

Displays subproperties

Published property ExtendedColSizing;

inherited from TStringGrid, but not published in TValueListEditor.

Published property FixedCols default 0;

inherited from TValueListEditor. Turns of the fixed column by default

Published property Mode: TsInspectorMode read FMode write SetMode;

Classification of data displayed by the SpreadsheetInspector. Each mode can be assigned to a tab of a TabControl.

Public property Workbook: TsWorkbook read GetWorkbook;

Refers to the underlying workbook which is displayed by the inspector.

Published property WorkbookSource: TsWorkbookSource read FWorkbookSource write SetWorkbookSource;

Refers to the underlying worksheet from which the active cell is taken

Public property Worksheet: TsWorksheet read GetWorksheet;

Refers to the underlying worksheet which is displayed by the inspector.


fpspreadsheetgrid

Unit fpspreadsheetgrid

Description
Uses
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Constants
Variables

Description

Unit fpSpreadsheetGrid implements a grid component which can load and write data from/to FPSpreadsheet documents.

Can either be used alone or in combination with a TsWorkbookSource component. The latter method requires less written code.

AUTHORS: Felipe Monteiro de Carvalho, Werner Pamler

LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus distribution, for details about the license.

Overview

Classes, Interfaces, Objects and Records

Name | Description
Class TsSelPen |
Class TsMultilineStringCellEditor |
Class TsCustomWorksheetGrid |
Class TsWorksheetGrid |

Types

TsAutoExpandMode = (...);
TsAutoExpandModes = set of TsAutoExpandMode;
TsEditorLineMode = (...);
TsGetCellTextEvent = procedure(Sender: TObject; AIndex: Integer; var AText: String) of object;
TsHyperlinkClickEvent = procedure(Sender: TObject; const AHyperlink: TsHyperlink) of object;

Variables

CELL_BORDER_DELTA: Integer = 4;
crDragCopy: Integer;
DEFAULT_COL_COUNT: Integer = 26;
DEFAULT_ROW_COUNT: Integer = 100;

Description

Types

TsAutoExpandMode = (...);

This item has no description.

Values
  • aeData: Expands grid dimensions if a cell is written outside current grid dimensions
  • aeNavigation: Expands grid dimensions if navigation goes outside current grid dimensions
  • aeDefault: Expands grid dimensions to DEFAULT_ROW_COUNT and DEFAULT_COL_COUNT
TsAutoExpandModes = set of TsAutoExpandMode;

This item has no description.

TsEditorLineMode = (...);

This item has no description.

Values
  • elmSingleLine
  • elmMultiLine
TsGetCellTextEvent = procedure(Sender: TObject; AIndex: Integer; var AText: String) of object;

This item has no description.

TsHyperlinkClickEvent = procedure(Sender: TObject; const AHyperlink: TsHyperlink) of object;

This item has no description.

Variables

CELL_BORDER_DELTA: Integer = 4;

Tolerance for mouse for hitting cell border

crDragCopy: Integer;

Cursor for copy operation during drag and drop

DEFAULT_COL_COUNT: Integer = 26;

Default number of columns prepared for a new empty worksheet

DEFAULT_ROW_COUNT: Integer = 100;

Default number of rows prepared for a new empty worksheet


fpspreadsheetgrid: Class TsSelPen

Class TsSelPen

Description
Hierarchy
Fields
Methods
Properties

Unit

fpspreadsheetgrid

Declaration

type TsSelPen = class(TPen)

Description

This item has no description.

Hierarchy

  • TPen
  • TsSelPen

Overview

Methods

Public constructor Create; override;

Properties

Published | property JoinStyle default pjsMiter;
Published | property Width stored true default 3;

Description

Methods

Public constructor Create; override;

This item has no description.

Properties

Published property JoinStyle default pjsMiter;

This item has no description.

Published property Width stored true default 3;

This item has no description.


fpspreadsheetgrid: Class TsMultilineStringCellEditor

Class TsMultilineStringCellEditor

Description
Hierarchy
Fields
Methods
Properties

Unit

fpspreadsheetgrid

Declaration

type TsMultilineStringCellEditor = class(TMemo)

Description

This item has no description.

Hierarchy

  • TMemo
  • TsMultilineStringCellEditor

Overview

Methods

Public | constructor Create(AOwner: TComponent); override;
Public | procedure EditingDone; override;
Protected | procedure Change; override;
Protected | procedure KeyDown(var AKey: Word; AShift: TShiftState); override;
Protected | procedure msg_GetGrid(var AMsg: TGridMessage); message GM_GETGRID;
Protected | procedure msg_GetValue(var AMsg: TGridMessage); message GM_GETVALUE;
Protected | procedure msg_SelectAll(var AMsg: TGridMessage); message GM_SELECTALL;
Protected | procedure msg_SetGrid(var AMsg: TGridMessage); message GM_SETGRID;
Protected | procedure msg_SetPos(var AMsg: TGridMessage); message GM_SETPOS;
Protected | procedure msg_SetValue(var AMsg: TGridMessage); message GM_SETVALUE;
Protected | procedure WndProc(var AMsg: TLMessage); override;

Properties

Public property OnEditingDone;

Description

Methods

Public constructor Create(AOwner: TComponent); override;

This item has no description.

Public procedure EditingDone; override;

This item has no description.

Protected procedure Change; override;

This item has no description.

Protected procedure KeyDown(var AKey: Word; AShift: TShiftState); override;

This item has no description.

Protected procedure msg_GetGrid(var AMsg: TGridMessage); message GM_GETGRID;

This item has no description.

Protected procedure msg_GetValue(var AMsg: TGridMessage); message GM_GETVALUE;

This item has no description.

Protected procedure msg_SelectAll(var AMsg: TGridMessage); message GM_SELECTALL;

This item has no description.

Protected procedure msg_SetGrid(var AMsg: TGridMessage); message GM_SETGRID;

This item has no description.

Protected procedure msg_SetPos(var AMsg: TGridMessage); message GM_SETPOS;

This item has no description.

Protected procedure msg_SetValue(var AMsg: TGridMessage); message GM_SETVALUE;

This item has no description.

Protected procedure WndProc(var AMsg: TLMessage); override;

This item has no description.

Properties

Public property OnEditingDone;

This item has no description.


fpspreadsheetgrid: Class TsCustomWorksheetGrid

Class TsCustomWorksheetGrid

Description
Hierarchy
Fields
Methods
Properties

Unit

fpspreadsheetgrid

Declaration

type TsCustomWorksheetGrid = class(TCustomDrawGrid, IsSpreadsheetControl)

Description

TsCustomWorksheetGrid is the ancestor of TsWorksheetGrid and is able to display spreadsheet data along with their formatting.

Hierarchy

  • TCustomDrawGrid
  • TsCustomWorksheetGrid

Overview

Methods

Public | constructor Create(AOwner: TComponent); override;
Public | destructor Destroy; override;
Public | function CellRect(ACol1, ARow1, ACol2, ARow2: Integer): TRect; overload;
Public | function EditorByStyle(Style: TColumnButtonStyle): TWinControl; override;
Public | function GetGridCol(ASheetCol: Cardinal): Integer; inline;
Public | function GetGridRow(ASheetRow: Cardinal): Integer; inline;
Public | function GetWorksheetCol(AGridCol: Integer): Cardinal; inline;
Public | function GetWorksheetRow(AGridRow: Integer): Cardinal; inline;
Protected | function CalcTopLeft(AHeaderOnly: Boolean): TPoint;
Protected | function CalcWorksheetColWidth(AValue: Integer): Single;
Protected | function CalcWorksheetRowHeight(AValue: Integer): Single;
Protected | function CanEditShow: boolean; override;
Protected | function CellOverflow(ACol, ARow: Integer; AState: TGridDrawState; out ACol1, ACol2: Integer; var ARect: TRect): Boolean;
Protected | function GetCellHeight(ACol, ARow: Integer): Integer;
Protected | function GetCellHintText(ACol, ARow: Integer): String; override;
Protected | function GetCells(ACol, ARow: Integer): String; override;
Protected | function GetCellText(ACol, ARow: Integer; ATrim: Boolean = true): String;
Protected | function GetDefaultColumnTitle(Column: Integer): string; override;
Protected | function GetEditText(ACol, ARow: Integer): String; override;
Protected | function GetIsCellTitle(ACol, ARow: Integer): boolean; override;
Protected | function HasBorder(ACell: PCell; ABorder: TsCellBorder): Boolean;
Protected | function MouseOnCellBorder(const APoint: TPoint; const ACellRect: TGridRect): Boolean;
Protected | function MouseOnHeader(X, Y: Integer): Boolean;
Protected | function MoveNextSelectable(Relative: Boolean; DCol, DRow: Integer): Boolean; override;
Protected | function RelaxAutoExpand: TsAutoExpandModes;
Protected | function SelectCell(ACol, ARow: Integer): Boolean; override;
Protected | function ToPixels(AValue: Double): Integer;
Protected | function TrimToCell(ACell: PCell): String;
Protected | function ValidFormula(AExpression: String; out AErrMsg: String): Boolean;
Public | procedure AutoColWidth(ACol: Integer);
Public | procedure AutoRowHeight(ARow: Integer);
Public | procedure BeginUpdate;
Public | procedure Clear;
Public | procedure Convert_Font_to_sFont(AFont: TFont; sFont: TsFont);
Public | procedure Convert_sFont_to_Font(sFont: TsFont; AFont: TFont);
Public | procedure DefaultDrawCell(ACol, ARow: Integer; var ARect: TRect; AState: TGridDrawState); override;
Public | procedure DeleteCol(AGridCol: Integer); reintroduce;
Public | procedure DeleteRow(AGridRow: Integer); reintroduce;
Public | procedure DragDrop(Source: TObject; X, Y: Integer); override;
Public | procedure EndUpdate(ARefresh: Boolean = true);
Public | procedure GetSheets(const ASheets: TStrings);
Public | procedure HideCol(ACol: Integer);
Public | procedure HideRow(ARow: Integer);
Public | procedure InsertCol(AGridCol: Integer);
Public | procedure InsertRow(AGridRow: Integer);
Public | procedure ListenerNotification(AChangedItems: TsNotificationItems; AData: Pointer = nil);
Public | procedure LoadFromSpreadsheetFile(AFileName: string; AFormatID: TsSpreadFormatID = sfidUnknown; AWorksheetIndex: Integer = -1); overload;
Public | procedure LoadFromSpreadsheetFile(AFileName: string; AFormat: TsSpreadsheetFormat; AWorksheetIndex: Integer = -1); overload;
Public | procedure LoadFromWorkbook(AWorkbook: TsWorkbook; AWorksheetIndex: Integer = -1);
Public | procedure LoadSheetFromSpreadsheetFile(AFileName: String; AWorksheetIndex: Integer = -1; AFormatID: TsSpreadFormatID = sfidUnknown);
Public | procedure MergeCells; overload;
Public | procedure MergeCells(ARect: TGridRect); overload;
Public | procedure MergeCells(ALeft, ATop, ARight, ABottom: Integer); overload;
Public | procedure NewWorkbook(AColCount, ARowCount: Integer);
Public | procedure RemoveWorkbookSource;
Public | procedure SaveToSpreadsheetFile(AFileName: string; AOverwriteExisting: Boolean = true); overload;
Public | procedure SaveToSpreadsheetFile(AFileName: string; AFormatID: TsSpreadFormatID; AOverwriteExisting: Boolean = true); overload;
Public | procedure SaveToSpreadsheetFile(AFileName: string; AFormat: TsSpreadsheetFormat; AOverwriteExisting: Boolean = true); overload; deprecated;
Public | procedure SelectSheetByIndex(AIndex: Integer);
Public | procedure ShowCellBorders(ALeft, ATop, ARight, ABottom: Integer; const ALeftOuterStyle, ATopOuterStyle, ARightOuterStyle, ABottomOuterStyle, AHorInnerStyle, AVertInnerStyle: TsCellBorderStyle);
Public | procedure ShowCol(ACol: Integer);
Public | procedure ShowRow(ARow: Integer);
Public | procedure Sort(AColSorting: Boolean; AIndex, AIndxFrom, AIndxTo:Integer); override;
Public | procedure UnmergeCells(ACol, ARow: Integer); overload;
Public | procedure UnmergeCells; overload;
Public | procedure UpdateColWidth(ACol: Integer);
Public | procedure UpdateColWidths(AStartIndex: Integer = 0);
Public | procedure UpdateRowHeight(ARow: Integer; AEnforceCalcRowHeight: Boolean = false);
Public | procedure UpdateRowHeights(AStartRow: Integer = -1; AEnforceCalcRowHeight: Boolean = false);
Protected | procedure AdaptToZoomFactor;
Protected | procedure AutoAdjustColumn(ACol: Integer); override;
Protected | procedure AutoAdjustRow(ARow: Integer); virtual;
Protected | procedure AutoExpandToCol(ACol: Integer; AMode: TsAutoExpandMode);
Protected | procedure AutoExpandToRow(ARow: Integer; AMode: TsAutoExpandMode);
Protected | procedure ColRowMoved(IsColumn: Boolean; FromIndex,ToIndex: Integer); override;
Protected | procedure CreateHandle; override;
Protected | procedure CreateNewWorkbook;
Protected | procedure DblClick; override;
Protected | procedure DefineProperties(Filer: TFiler); override;
Protected | procedure DoCopyToClipboard; override;
Protected | procedure DoCutToClipboard; override;
Protected | procedure DoEditorShow; override;
Protected | procedure DoEnter; override;
Protected | procedure DoExit; override;
Protected | procedure DoOnResize; override;
Protected | procedure DoPasteFromClipboard; override;
Protected | procedure DoPrepareCanvas(ACol, ARow: Integer; AState: TGridDrawState); override;
Protected | procedure DragOver(ASource: TObject; X, Y: Integer; AState: TDragState; var Accept: Boolean); override;
Protected | procedure DrawAllRows; override;
Protected | procedure DrawCellBorders(ACol, ARow: Integer; ARect: TRect; ACell: PCell); overload;
Protected | procedure DrawCellBorders(AGridPart: Integer = 0); overload;
Protected | procedure DrawCellGrid(ACol,ARow: Integer; ARect: TRect; AState: TGridDrawState); override;
Protected | procedure DrawCommentMarker(ARect: TRect);
Protected | procedure DrawDragSelection;
Protected | procedure DrawFocusRect(aCol,aRow:Integer; ARect:TRect); override;
Protected | procedure DrawFrozenPaneBorder(AStart, AEnd, ACoord: Integer; IsHor: Boolean);
Protected | procedure DrawFrozenPanes;
Protected | procedure DrawImages(AGridPart: Integer = 0);
Protected | procedure DrawPageBreaks(AClipRect: TRect); virtual;
Protected | procedure DrawRow(aRow: Integer); override;
Protected | procedure DrawSelection;
Protected | procedure DrawTextInCell(ACol, ARow: Integer; ARect: TRect; AState: TGridDrawState); override;
Protected | procedure EditorDoGetValue; override;
Protected | procedure ExecuteHyperlink;
Protected | procedure GenericPenChangeHandler(Sender: TObject);
Protected | procedure HeaderSized(IsColumn: Boolean; AIndex: Integer); override;
Protected | procedure HeaderSizing(const IsColumn:boolean; const AIndex,ASize:Integer); override;
Protected | procedure InternalDrawCell(ACol, ARow: Integer; AClipRect, ACellRect: TRect; AState: TGridDrawState);
Protected | procedure InternalDrawRow(ARow, AFirstCol, ALastCol: Integer; AClipRect: TRect);
Protected | procedure InternalDrawSelection(ASel: TGridRect; IsNormalSelection: boolean);
Protected | procedure InternalDrawTextInCell(AText: String; ARect: TRect; ACellHorAlign: TsHorAlignment; ACellVertAlign: TsVertAlignment; ATextRot: TsTextRotation; ATextWrap: Boolean; AFontIndex: Integer; AOverrideTextColor: TColor; ARichTextParams: TsRichTextParams; AIsRightToLeft: Boolean);
Protected | procedure KeyDown(var Key : Word; Shift : TShiftState); override;
Protected | procedure KeyUp(var Key : Word; Shift : TShiftState); override;
Protected | procedure MouseDown(Button: TMouseButton; Shift:TShiftState; X,Y:Integer); override;
Protected | procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
Protected | procedure MouseUp(Button: TMouseButton; Shift:TShiftState; X,Y:Integer); override;
Protected | procedure MoveSelection; override;
Protected | procedure Notification(AComponent: TComponent; Operation: TOperation); override;
Protected | procedure PrepareCanvasFont;
Protected | procedure RestoreAutoExpand(AValue: TsAutoExpandModes);
Protected | procedure SetEditText(ACol, ARow: Longint; const AValue: string); override;
Protected | procedure Setup;
Protected | procedure TopLeftChanged; override;
Protected | procedure ValidateInput(var Msg: TLMessage); message UM_VALIDATEINPUT;
Protected | procedure WMHScroll(var message: TLMHScroll); message LM_HSCROLL;
Protected | procedure WMVScroll(var message: TLMVScroll); message LM_VSCROLL;

Properties

Protected | property AllowDragAndDrop: Boolean read FAllowDragAndDrop write FAllowDragAndDrop default true;
Protected | property AutoCalc: Boolean read FAutoCalc write SetAutoCalc default false;
Protected | property AutoDetectCellType: Boolean read FAutoDetectCellType write SetAutoDetectCellType default true;
Protected | property AutoExpand: TsAutoExpandModes read FAutoExpand write FAutoExpand default [aeData, aeNavigation, aeDefault];
Public | property BackgroundColor[ACol,ARow: Integer]: TsColor read GetBackgroundColor write SetBackgroundColor;
Public | property BackgroundColors[ALeft,ATop,ARight,ABottom: Integer]: TsColor read GetBackgroundColors write SetBackgroundColors;
Public | property CellBiDiMode[ACol,ARow: Integer]: TsBiDiMode read GetCellBiDiMode write SetCellBiDiMode;
Public | property CellBorder[ACol,ARow: Integer]: TsCellBorders read GetCellBorder write SetCellBorder;
Public | property CellBorders[ALeft,ATop,ARight,ABottom: Integer]: TsCellBorders read GetCellBorders write SetCellBorders;
Public | property CellBorderStyle[ACol,ARow: Integer; ABorder: TsCellBorder]: TsCellBorderStyle read GetCellBorderStyle write SetCellBorderStyle;
Public | property CellBorderStyles[ALeft,ATop,ARight,ABottom: Integer; ABorder: TsCellBorder]: TsCellBorderStyle read GetCellBorderStyles write SetCellBorderStyles;
Public | property CellComment[ACol,ARow: Integer]: String read GetCellComment write SetCellComment;
Public | property CellFont[ACol,ARow: Integer]: TFont read GetCellFont write SetCellFont;
Public | property CellFontColor[ACol,ARow: Integer]: TsColor read GetCellFontColor write SetCellFontColor;
Public | property CellFontColors[ALeft,ATop,ARight,ABottom: Integer]: TsColor read GetCellFontColors write SetCellFontColors;
Public | property CellFontName[ACol,ARow: Integer]: String read GetCellFontName write SetCellFontName;
Public | property CellFontNames[ALeft,ATop,ARight,ABottom: Integer]: String read GetCellFontNames write SetCellFontNames;
Public | property CellFonts[ALeft,ATop,ARight,ABottom: Integer]: TFont read GetCellFonts write SetCellFonts;
Public | property CellFontSize[ACol,ARow: Integer]: Single read GetCellFontSize write SetCellFontSize;
Public | property CellFontSizes[ALeft,ATop,ARight,ABottom: Integer]: Single read GetCellFontSizes write SetCellFontSizes;
Public | property CellFontStyle[ACol,ARow: Integer]: TsFontStyles read GetCellFontStyle write SetCellFontStyle;
Public | property CellFontStyles[ALeft,ATop,ARight,ABottom: Integer]: TsFontStyles read GetCellFontStyles write SetCellFontStyles;
Public | property CellFormula[ACol,ARow: Integer]: String read GetCellFormula write SetCellFormula;
Public | property CellProtection[ACol,ARow: Integer]: TsCellProtections read GetCellProtection write SetCellProtection;
Public | property CellProtections[ALeft,ATop,ARight,ABottom: Integer]: TsCellProtections read GetCellProtections write SetCellProtections;
Public | property Cells[ACol,ARow: Integer]: Variant read GetCellValue write SetCellValue;
Public | property ColWidths[ACol: Integer]: Integer read GetColWidths write SetColWidths;
Public | property DefaultColWidth: Integer read GetDefColWidth write SetDefColWidth;
Public | property DefaultRowHeight: Integer read GetDefRowHeight write SetDefRowHeight;
Protected | property DisplayFixedColRow: Boolean read GetShowHeaders write SetShowHeaders default true;
Protected | property EditorLineMode: TsEditorLineMode read FLineMode write SetEditorLineMode default elmSingleLine;
Protected | property FixedColWidth: Integer read FFixedColWidth write SetFixedColWidth default 0;
Protected | property FrozenBorderPen: TPen read FFrozenBorderPen write SetFrozenBorderPen;
Protected | property FrozenCols: Integer read FFrozenCols write SetFrozenCols;
Protected | property FrozenRows: Integer read FFrozenRows write SetFrozenRows;
Public | property HeaderCount: Integer read FHeaderCount;
Public | property HorAlignment[ACol,ARow: Integer]: TsHorAlignment read GetHorAlignment write SetHorAlignment;
Public | property HorAlignments[ALeft,ATop,ARight,ABottom: Integer]: TsHorAlignment read GetHorAlignments write SetHorAlignments;
Public | property Hyperlink[ACol,ARow: Integer]: String read GetHyperlink write SetHyperlink;
Public | property NumberFormat[ACol,ARow: Integer]: String read GetNumberFormat write SetNumberFormat;
Public | property NumberFormats[ALeft,ATop,ARight,ABottom: Integer]: String read GetNumberFormats write SetNumberFormats;
Protected | property OnClickHyperlink: TsHyperlinkClickEvent read FOnClickHyperlink write FOnClickHyperlink;
Protected | property OnGetColHeaderText: TsGetCellTextEvent read FGetColHeaderText write FGetColHeaderText;
Protected | property OnGetRowHeaderText: TsGetCellTextEvent read FGetRowHeaderText write FGetRowHeaderText;
Protected | property PageBreakPen: TPen read FPageBreakPen write SetPageBreakPen;
Public | property RangeSelectMode default rsmMulti;
Protected | property ReadFormulas: Boolean read FReadFormulas write SetReadFormulas;
Public | property RowHeights[ARow: Integer]: Integer read GetRowHeights write SetRowHeights;
Protected | property SelectionPen: TsSelPen read FSelPen write SetSelPen;
Protected | property ShowFormulas: Boolean read FShowFormulas write SetShowFormulas default false;
Protected | property ShowGridLines: Boolean read GetShowGridLines write SetShowGridLines default true;
Protected | property ShowHeaders: Boolean read GetShowHeaders write SetShowHeaders default true;
Protected | property ShowPageBreaks: Boolean read FShowPageBreaks write SetShowPageBreaks default true;
Protected | property TextOverflow: Boolean read FTextOverflow write FTextOverflow default false;
Public | property TextRotation[ACol,ARow: Integer]: TsTextRotation read GetTextRotation write SetTextRotation;
Public | property TextRotations[ALeft,ATop,ARight,ABottom: Integer]: TsTextRotation read GetTextRotations write SetTextRotations;
Public | property TopLeftPx: TPoint read GetPxTopLeft;
Public | property VertAlignment[ACol,ARow: Integer]: TsVertAlignment read GetVertAlignment write SetVertAlignment;
Public | property VertAlignments[ALeft,ATop,ARight,ABottom: Integer]: TsVertAlignment read GetVertAlignments write SetVertAlignments;
Public | property Wordwrap[ACol,ARow: Integer]: Boolean read GetWordwrap write SetWordwrap;
Public | property Wordwraps[ALeft,ATop,ARight,ABottom: Integer]: Boolean read GetWordwraps write SetWordwraps;
Public | property Workbook: TsWorkbook read GetWorkbook;
Public | property WorkbookSource: TsWorkbookSource read GetWorkbookSource write SetWorkbookSource;
Public | property Worksheet: TsWorksheet read GetWorksheet;
Public | property ZoomFactor: Double read GetZoomFactor write SetZoomFactor;

Description

Methods

Public constructor Create(AOwner: TComponent); override;

Constructor of the grid. Activates the display of column and row headers and creates an internal "CellFont". Creates a pre-defined number of empty rows and columns.

Parameters
AOwner
Owner of the grid
Public destructor Destroy; override;

Destructor of the grid: Destroys the workbook and the internal CellFont.

Public function CellRect(ACol1, ARow1, ACol2, ARow2: Integer): TRect; overload;

This item has no description.

Public function EditorByStyle(Style: TColumnButtonStyle): TWinControl; override;

This item has no description.

Public function GetGridCol(ASheetCol: Cardinal): Integer; inline;

Converts a column index of the worksheet to a column index usable in the grid. This is required because worksheet indexes always start at zero while grid indexes also have to account for the column/row headers.

Parameters
ASheetCol
Worksheet column index
Returns

Grid column index

Public function GetGridRow(ASheetRow: Cardinal): Integer; inline;

Converts a row index of the worksheet to a row index usable in the grid. This is required because worksheet indexes always start at zero while grid indexes also have to account for the column/row headers.

Parameters
ASheetRow
Worksheet row index
Returns

Grid row index

Public function GetWorksheetCol(AGridCol: Integer): Cardinal; inline;

Calculates the index of the worksheet column that is displayed in the given column of the grid. If the sheet headers are turned on, both numbers differ by 1, otherwise they are equal. Saves an "if" in some cases.

Parameters
AGridCol
Index of a grid column
Returns

Index of a the corresponding worksheet column

Public function GetWorksheetRow(AGridRow: Integer): Cardinal; inline;

Calculates the index of the worksheet row that is displayed in the given row of the grid. If the sheet headers are turned on, both numbers differ by 1, otherwise they are equal. Saves an "if" in some cases.

Parameters
AGridRow
Index of a grid row
Returns

Index of the corresponding worksheet row.

Protected function CalcTopLeft(AHeaderOnly: Boolean): TPoint;

Calculates the top-left corner (in pixels) of the area which can be scrolled. Is bordered by the fixed header cells and the frozen columns and rows.

Protected function CalcWorksheetColWidth(AValue: Integer): Single;

Converts the column height given in screen pixels to the units used by the worksheet.

Parameters
AValue
Column width in pixels
Returns

Column width expressed in units defined by the workbook.

Protected function CalcWorksheetRowHeight(AValue: Integer): Single;

Converts the row height given in screen pixels to the units used by the worksheet.

Parameters
AValue
Row height in pixels
Returns

Row height expressed in units defined by the workbook.

Protected function CanEditShow: boolean; override;

This item has no description.

Protected function CellOverflow(ACol, ARow: Integer; AState: TGridDrawState; out ACol1, ACol2: Integer; var ARect: TRect): Boolean;

Looks for overflowing cells: if the text of the given cell is longer than the cell width the function calculates the column indexes and the rectangle to show the complete text.

Ony for non-wordwrapped label cells and for horizontal orientation. Function returns false if text overflow needs not to be considered.

Parameters
ACol,ARow
Column and row indexes (in grid coordinates) of the cell to be drawn
AState
GridDrawState of the cell (normal, fixed, selected etc)
ACol1,ACol2
(output) Index of the first and last column covered by the overflowing text
ARect
(output) Pixel rectangle enclosing the cell and its neighbors affected
Returns

True if text overflow into neighbor cells is to be considered, False if not.

Protected function GetCellHeight(ACol, ARow: Integer): Integer;

Returns the height (in pixels) of the cell at ACol/ARow (of the grid).

Parameters
ACol
Grid column index of the cell.
ARow
Grid row index of the cell.
Returns

Height of the cell in pixels. Wrapped text is handled correctly. Value contains the zoom factor.

Protected function GetCellHintText(ACol, ARow: Integer): String; override;

This function defines the text to be displayed as a cell hint. By default, it is the comment and/or the hyperlink attached to a cell; it can further be modified by using the OnGetCellHint event.

Option goCellHints must be active for the cell hint feature to work.

Protected function GetCells(ACol, ARow: Integer): String; override;

This item has no description.

Protected function GetCellText(ACol, ARow: Integer; ATrim: Boolean = true): String;

This function returns the text to be shown in a grid cell. The text is looked up in the corresponding cell of the worksheet by calling its ReadAsUTF8Text method. In case of "stacked" text rotation, line endings are inserted after each character.

Parameters
ACol
Grid column index of the cell
ARow
Grid row index of the cell
ATrim
If true show replacement characters if numerical data are wider than cell.
Returns

Text to be displayed in the cell.

Protected function GetDefaultColumnTitle(Column: Integer): string; override;

This item has no description.

Protected function GetEditText(ACol, ARow: Integer): String; override;

Determines the text to be passed to the cell editor. The text is determined from the underlying worksheet cell, but it is possible to intercept this by adding a handler for the OnGetEditText event.

Parameters
ACol
Grid column index of the cell being edited
ARow
Grid row index of the grid cell being edited
Returns

Text to be passed to the cell editor.

Protected function GetIsCellTitle(ACol, ARow: Integer): boolean; override;

Inherited method. Is overridden to make sure that no column headers are drawn when ShowHeaders is false.

Protected function HasBorder(ACell: PCell; ABorder: TsCellBorder): Boolean;

Returns true if the cell has the given border. In case of merged cell the borders of the merge base are checked. Inner merged cells don't have a border.

Parameters
ACell
Pointer to cell considered
ABorder
Indicator for border to be checked for visibility
Protected function MouseOnCellBorder(const APoint: TPoint; const ACellRect: TGridRect): Boolean;

Checks whether the specified point is on the border of a given cell. The tolerance is defined by the global variable CELL_BORDER_DELTA

Protected function MouseOnHeader(X, Y: Integer): Boolean;

This item has no description.

Protected function MoveNextSelectable(Relative: Boolean; DCol, DRow: Integer): Boolean; override;

This item has no description.

Protected function RelaxAutoExpand: TsAutoExpandModes;

This item has no description.

Protected function SelectCell(ACol, ARow: Integer): Boolean; override;

Standard method inherited from TCustomGrid. Is overridden to prevent selection of cells in a protected worksheet. Details depend on whether the elements spSelectLockedCells and/or spSelectUnlockedCells are included in the worksheet's set of protections, and whether the cell to be selected is locked or not.

Protected function ToPixels(AValue: Double): Integer;

Converts a coordinate given in workbook units to pixels using the current screen resolution

Protected function TrimToCell(ACell: PCell): String;

Modifies the text that is shown for cells which are too narrow to hold the entire text. The method follows the behavior of Excel and Open/LibreOffice: If the specified cell contains a non-formatted number, then it is formatted such that the text fits into the cell. If the text is still too long or the cell does not contain a label then the cell is filled by '#' characters. Label cell texts are not modified, they can overflow into the adjacent cells.

Protected function ValidFormula(AExpression: String; out AErrMsg: String): Boolean;

Checks whether the provided expression is a valid spreadsheet formula. If not, a descriptive error message is returned in "AErrMsg", and the function result becomes False.

Decimal separator and date/time formats are expected to be localized. In contrast to the Office applications, however, formula names are never localized in fpspreadsheet.

Public procedure AutoColWidth(ACol: Integer);

This item has no description.

Public procedure AutoRowHeight(ARow: Integer);

This item has no description.

Public procedure BeginUpdate;

The BeginUpdate/EndUpdate pair suppresses unnecessary painting of the grid.

Call BeginUpdate to stop refreshing the grid, and call EndUpdate to release the lock and to repaint the grid again.

Public procedure Clear;

Clears the grid contents

Public procedure Convert_Font_to_sFont(AFont: TFont; sFont: TsFont);

Converts a font used for painting (TCanvas.Font) to a spreadsheet font.

Parameters
AFont
Font as used by TCanvas for painting (input)
sFont
Font as used by fpspreadsheet (output)
Public procedure Convert_sFont_to_Font(sFont: TsFont; AFont: TFont);

Converts a spreadsheet font to a font used for painting (TCanvas.Font).

Parameters
sFont
Font as used by fpspreadsheet (input)
AFont
Font as used by TCanvas for painting (output)
Public procedure DefaultDrawCell(ACol, ARow: Integer; var ARect: TRect; AState: TGridDrawState); override;

This is one of the main painting methods inherited from TsCustomGrid. It is overridden here to achieve the feature of "frozen" cells which should be painted in the same style as normal cells.

Internally, "frozen" cells are "fixed" cells of the grid. Therefore, it is not possible to select any cell within the frozen panes - in contrast to the standard spreadsheet applications.

Parameters
ACol
Column index of the cell being drawn
ARow
Row index of the cell beging drawn
ARect
Rectangle, in grid pixels, covered by the cell
AState
Grid drawing state, as defined by TsCustomGrid
Public procedure DeleteCol(AGridCol: Integer); reintroduce;

Deletes the column specified.

Parameters
AGridCol
Grid index of the column to be deleted
Public procedure DeleteRow(AGridRow: Integer); reintroduce;

Deletes the row specified.

Parameters
AGridRow
Grid index of the row to be deleted
Public procedure DragDrop(Source: TObject; X, Y: Integer); override;

This item has no description.

Public procedure EndUpdate(ARefresh: Boolean = true);

The BeginUpdate/EndUpdate pair suppresses unnecessary painting of the grid. Call BeginUpdate to stop refreshing the grid, and call EndUpdate to release the lock and to repaint the grid again.

Public procedure GetSheets(const ASheets: TStrings);

Returns a list of worksheets contained in the file. Useful for assigning to user controls like TabControl, Combobox etc. in order to select a sheet.

Parameters
ASheets
List of strings containing the names of the worksheets of the workbook
Public procedure HideCol(ACol: Integer);

Hides the column with the specifed index

Public procedure HideRow(ARow: Integer);

Hides the row with the specifed index

Public procedure InsertCol(AGridCol: Integer);

Inserts an empty column before the column specified

Public procedure InsertRow(AGridRow: Integer);

Inserts an empty row before the row specified

Public procedure ListenerNotification(AChangedItems: TsNotificationItems; AData: Pointer = nil);

Notification message received from the WorkbookLink telling which item of the spreadsheet has changed.

Public procedure LoadFromSpreadsheetFile(AFileName: string; AFormatID: TsSpreadFormatID = sfidUnknown; AWorksheetIndex: Integer = -1); overload;

Creates a new workbook and loads the given file into it. The file is assumed to have the given file format. Shows the sheet with the given sheet index.

Call this method for both built-in and user-provided file formats.

Parameters
AFileName
Name of the file to be loaded
AFormatID
Spreadsheet file format identifier assumed for the file (automatic detection if empty)
AWorksheetIndex
Index of the worksheet to be displayed in the grid (If empty then the active worksheet is loaded)
Public procedure LoadFromSpreadsheetFile(AFileName: string; AFormat: TsSpreadsheetFormat; AWorksheetIndex: Integer = -1); overload;

Creates a new workbook and loads the given file into it. The file is assumed to have the given file format. Shows the sheet with the given sheet index.

Call this method only for built-in file formats.

Parameters
AFileName
Name of the file to be loaded
AFormat
Spreadsheet file format assumed for the file
AWorksheetIndex
Index of the worksheet to be displayed in the grid (If empty then the active worksheet is loaded)
Public procedure LoadFromWorkbook(AWorkbook: TsWorkbook; AWorksheetIndex: Integer = -1);

Loads an existing workbook into the grid.

Note
THE CALLING PROCEDURE MUST NOT DESTROY THE WORKBOOK! The workbook will be destroyed by the workbook source.

Parameters
AWorkbook
Workbook that had been created/loaded before.
AWorksheetIndex
Index of the worksheet to be shown in the grid (If empty then the active worksheet is loaded)
Public procedure LoadSheetFromSpreadsheetFile(AFileName: String; AWorksheetIndex: Integer = -1; AFormatID: TsSpreadFormatID = sfidUnknown);

Creates a new workbook and loads the given file into it. Shows the sheet with the specified sheet index. The file format is determined automatically.

Parameters
AFileName
Name of the file to be loaded
AWorksheetIndex
Index of the worksheet to be shown in the grid (If empty then the active worksheet is loaded)
AFormatID
Spreadsheet file format identifier assumed for the file (automatic detection if empty)
Public procedure MergeCells; overload;

Merges the selected cells to a single large cell Only the upper left cell can have content and formatting (which is extended into the other cells).

Public procedure MergeCells(ARect: TGridRect); overload;

Merges the cells of the specified cell block to a single large cell Only the upper left cell can have content and formatting (which is extended into the other cells).

Public procedure MergeCells(ALeft, ATop, ARight, ABottom: Integer); overload;

Merges the cells of the specified cell block to a single large cell Only the upper left cell can have content and formatting (which is extended into the other cells).

Public procedure NewWorkbook(AColCount, ARowCount: Integer);

Creates a new empty workbook with the specified number of columns and rows.

Parameters
AColCount
Number of columns
ARowCount
Number of rows
Public procedure RemoveWorkbookSource;

Removes the link of the WorksheetGrid to the WorkbookSource. Required before destruction.

Public procedure SaveToSpreadsheetFile(AFileName: string; AOverwriteExisting: Boolean = true); overload;

Writes the workbook represented by the grid to a spreadsheet file.

Call this method only for built-in file formats.

Parameters
AFileName
Name of the file to which the workbook is to be saved.
AFormat
Spreadsheet file format in which the file is to be saved.
AOverwriteExisting
If the file already exists, it is overwritten in the case of AOverwriteExisting = True, or an exception is raised if AOverwriteExisting = False
Public procedure SaveToSpreadsheetFile(AFileName: string; AFormatID: TsSpreadFormatID; AOverwriteExisting: Boolean = true); overload;

Saves the workbook into a file with the specified file name. If this file name already exists the file is overwritten if AOverwriteExisting is true.

Parameters
AFileName
Name of the file to which the workbook is to be saved. If the file format is not known it is written as BIFF8/XLS.
AOverwriteExisting
If this file already exists it is overwritten if AOverwriteExisting = True, or an exception is raised if AOverwriteExisting = False.
Public procedure SaveToSpreadsheetFile(AFileName: string; AFormat: TsSpreadsheetFormat; AOverwriteExisting: Boolean = true); overload; deprecated;

Warning: this symbol is deprecated.

Writes the workbook represented by the grid to a spreadsheet file.

Call this method for both built-in and user-provided file formats.

Parameters
AFileName
Name of the file to which the workbook is to be saved.
AFormatID
Identifier for the spreadsheet file format in which the file is to be saved.
AOverwriteExisting
If the file already exists, it is overwritten in the case of AOverwriteExisting = True, or an exception is raised if AOverwriteExisting = False
Public procedure SelectSheetByIndex(AIndex: Integer);

Loads the workbook into the grid and selects the sheet with the given index. "Selected" means here that the sheet is loaded into the grid.

Parameters
AIndex
Index of the worksheet to be shown in the grid
Public procedure ShowCellBorders(ALeft, ATop, ARight, ABottom: Integer; const ALeftOuterStyle, ATopOuterStyle, ARightOuterStyle, ABottomOuterStyle, AHorInnerStyle, AVertInnerStyle: TsCellBorderStyle);

Shows cell borders for the cells in the range between columns ALeft and ARight and rows ATop and ABottom. The border of the block's left outer edge is defined by ALeftOuterStyle, that of the block's top outer edge by ATopOuterStyle, etc. Set the color of a border style to scNotDefined or scTransparent in order to hide the corresponding border line, or use the constant NO_CELL_BORDER.

Public procedure ShowCol(ACol: Integer);

Shows the column with the specified index previously hidden.

Public procedure ShowRow(ARow: Integer);

Shows the row with the specified index previously hidden

Public procedure Sort(AColSorting: Boolean; AIndex, AIndxFrom, AIndxTo:Integer); override;

Sorts the grid by calling the corresponding method of the worksheet. Sorting extends across the entire worksheet. Sort direction is determined by the property "SortOrder". Other sorting criteria are "case-sensitive" and "numbers first".

Parameters
AColSorting
If True the grid is sorted from top to bottom and the next parameter, "Index", refers to a column. Otherwise sorting goes from left to right and "Index" refers to a row.
AIndex
Index of the column (if ColSorting=True) or row (ColSorting=False) which is sorted.
AIndxFrom
Sorting starts at this row (ColSorting=True) / column (ColSorting=False)
AIndxTo
Sorting ends at this row (ColSorting=True) / column (ColSorting=False)
Public procedure UnmergeCells(ACol, ARow: Integer); overload;

If the specified cell belongs to a merged block, the merged block is split into single cells

Public procedure UnmergeCells; overload;

Splits a merged cell block into single cells

Public procedure UpdateColWidth(ACol: Integer);

This item has no description.

Public procedure UpdateColWidths(AStartIndex: Integer = 0);

Updates column widths according to the data in the TCol records

Public procedure UpdateRowHeight(ARow: Integer; AEnforceCalcRowHeight: Boolean = false);

Updates the height if the specified row in the grid with the value stored in the worksheet multiplied by the current zoom factor. If the stored row height type is rhtAuto (meaning: "row height is auto-calculated") and the current row height in the row record is 0 then the row height is calculated by iterating over all cells in this row. This happens also if the parameter AEnforceCalcRowHeight is True.

Public procedure UpdateRowHeights(AStartRow: Integer = -1; AEnforceCalcRowHeight: Boolean = false);

Updates grid row heights by using the data from the TRow records.

Protected procedure AdaptToZoomFactor;

This item has no description.

Protected procedure AutoAdjustColumn(ACol: Integer); override;

Is called when goDblClickAutoSize is in the grid's options and a double click has occured at the border of a column header. Sets optimum column with.

Protected procedure AutoAdjustRow(ARow: Integer); virtual;

Is called when goDblClickAutoSize is in the grid's options and a double click has occured at the border of a row header. Sets optimum row height.

Protected procedure AutoExpandToCol(ACol: Integer; AMode: TsAutoExpandMode);

Automatically expands the ColCount such that the specified column fits in

Protected procedure AutoExpandToRow(ARow: Integer; AMode: TsAutoExpandMode);

Automatically expands the RowCount such that the specified column fits in

Protected procedure ColRowMoved(IsColumn: Boolean; FromIndex,ToIndex: Integer); override;

This item has no description.

Protected procedure CreateHandle; override;

This item has no description.

Protected procedure CreateNewWorkbook;

Creates a new empty workbook into which a file will be loaded. Destroys the previously used workbook.

Protected procedure DblClick; override;

Is called when a Double-click occurs. Overrides the inherited method to react on double click on cell border in row headers to auto-adjust the row heights

Protected procedure DefineProperties(Filer: TFiler); override;

This item has no description.

Protected procedure DoCopyToClipboard; override;

This item has no description.

Protected procedure DoCutToClipboard; override;

This item has no description.

Protected procedure DoEditorShow; override;

This item has no description.

Protected procedure DoEnter; override;

This item has no description.

Protected procedure DoExit; override;

This item has no description.

Protected procedure DoOnResize; override;

This item has no description.

Protected procedure DoPasteFromClipboard; override;

This item has no description.

Protected procedure DoPrepareCanvas(ACol, ARow: Integer; AState: TGridDrawState); override;

Adjusts the grid's canvas before painting a given cell. Considers background color, horizontal alignment, vertical alignment, etc.

Parameters
ACol
Column index of the cell being painted
ARow
Row index of the cell being painted
AState
Grid drawing state – see TsCustomGrid.
Protected procedure DragOver(ASource: TObject; X, Y: Integer; AState: TDragState; var Accept: Boolean); override;

This item has no description.

Protected procedure DrawAllRows; override;

This method is inherited from TsCustomGrid, but is overridden here in order to paint the cell borders and the selection rectangle. Both features can extend into the neighboring cells and thus would be clipped at the cell borders by the standard painting mechanism. At the time when DrawAllRows is called, however, clipping at cell borders is no longer active.

Protected procedure DrawCellBorders(ACol, ARow: Integer; ARect: TRect; ACell: PCell); overload;

Draws the border lines around a given cell. Note that when this procedure is called the output is clipped by the cell rectangle, but thick and double border styles extend into the neighboring cell. Therefore, these border lines are drawn in parts.

Parameters
ACol
Column Index
ARow
Row index
ARect
Rectangle in pixels occupied by the cell.
Protected procedure DrawCellBorders(AGridPart: Integer = 0); overload;

Draws the borders of all cells. Calls DrawCellBorders for each individual cell. AGridPart denotes where the cells are painted:

  • 0 = normal grid area

  • 1 = FrozenRows

  • 2 = FrozenCols

  • 3 = Top-left corner where FrozenCols and FrozenRows intersect

Protected procedure DrawCellGrid(ACol,ARow: Integer; ARect: TRect; AState: TGridDrawState); override;

Method inherited method from TCustomGrid. Is overridden here to avoid painting of the border of frozen cells in black under some circumstances.

Protected procedure DrawCommentMarker(ARect: TRect);

Draws the red rectangle in the upper right corner of a cell to indicate that this cell contains a popup comment

Protected procedure DrawDragSelection;

This item has no description.

Protected procedure DrawFocusRect(aCol,aRow:Integer; ARect:TRect); override;

This procedure is responsible for painting the focus rectangle. We don't want the red dashed rectangle here, but prefer the thick Excel-like black border line. This new focus rectangle is drawn by the method DrawSelection because the thick Excel border reaches into adjacent cells.

Parameters
ACol
Grid column index of the focused cell
ARow
Grid row index of the focused cell
ARect
Rectangle in pixels covered by the focused cell
Protected procedure DrawFrozenPaneBorder(AStart, AEnd, ACoord: Integer; IsHor: Boolean);

Draws a solid line along the borders of frozen panes.

Parameters
AStart
Start coordinate of the pane border line
AEnd
End coordinate of the pane border line
ACoord
Other coordinate of the border line (y if horizontal, x if vertical)
IsHor
Determines whether a horizontal or vertical line is drawn and, thus, how AStart, AEnd and ACoord are interpreted.
Protected procedure DrawFrozenPanes;

This item has no description.

Protected procedure DrawImages(AGridPart: Integer = 0);

Draws the embedded images of the worksheet. Is called at the end of the painting process.

Protected procedure DrawPageBreaks(AClipRect: TRect); virtual;

Draws lines with the PageBreakPen along the cell border indicating the position of page breaks

Protected procedure DrawRow(aRow: Integer); override;

Draws a complete row of cells. Is mostly duplicated from Grids.pas, but adds code for merged cells and overflow text, the section for drawing the default focus rectangle is removed.

Parameters
ARow
Index of the row to be drawn (in grid coordinates)
Protected procedure DrawSelection;

Draws the selection rectangle around selected cells.

Protected procedure DrawTextInCell(ACol, ARow: Integer; ARect: TRect; AState: TGridDrawState); override;

Draws the cell text. Calls "GetCellText" to determine the text for the cell. Takes care of horizontal and vertical text alignment, text rotation and text wrapping.

Parameters
ACol
Grid column index of the cell
ARow
Grid row index of the cell
ARect
Rectangle in pixels occupied by the cell
AState
Drawing state of the grid – see TCustomGrid
Protected procedure EditorDoGetValue; override;

Is called when editing is complete; checks whether input is valid already have been done. The method must transfer the edited cell text to the worksheet cell

Protected procedure ExecuteHyperlink;

Executes a hyperlink stored in the FHyperlinkCell

Protected procedure GenericPenChangeHandler(Sender: TObject);

Event handler which fires when an element of the SelectionPen changes.

Protected procedure HeaderSized(IsColumn: Boolean; AIndex: Integer); override;

Inherited from TCustomGrid. Is called when column widths or row heights have changed. Stores the new column width or row height in the worksheet.

Parameters
IsColumn
Specifies whether the changed parameter is a column width (True) or a row height (False)
Index
Index of the changed column or row
Protected procedure HeaderSizing(const IsColumn:boolean; const AIndex,ASize:Integer); override;

HeaderSizing is called while a column width or row height is resized by the mouse. Is overridden here to enforce a grid repaint if merged cells are affected by the resizing column/row. Otherwise parts of the merged cells would not be updated if the cell text moves during the resizing action.

Protected procedure InternalDrawCell(ACol, ARow: Integer; AClipRect, ACellRect: TRect; AState: TGridDrawState);

This item has no description.

Protected procedure InternalDrawRow(ARow, AFirstCol, ALastCol: Integer; AClipRect: TRect);

This item has no description.

Protected procedure InternalDrawSelection(ASel: TGridRect; IsNormalSelection: boolean);

This item has no description.

Protected procedure InternalDrawTextInCell(AText: String; ARect: TRect; ACellHorAlign: TsHorAlignment; ACellVertAlign: TsVertAlignment; ATextRot: TsTextRotation; ATextWrap: Boolean; AFontIndex: Integer; AOverrideTextColor: TColor; ARichTextParams: TsRichTextParams; AIsRightToLeft: Boolean);

Internal general text drawing method.

Note
The reason to separate AJustification from ACellHorAlign and ACelVertAlign is the output of nfAccounting formatted numbers where the numbers are always right-aligned, and the currency symbol is left-aligned. THIS FEATURE IS CURRENTLY NO LONGER SUPPORTED.

Parameters
AText
Text to be drawn
AMeasureText
Text used for checking if the text fits into the text rectangle. If too large and ReplaceTooLong = True, a series of # characters is drawn.
ARect
Rectangle in which the text is drawn.
AJustification
Determines whether the text is drawn at the "start" (0), "center" (1) or "end" (2) of the drawing rectangle. Start/center/end are seen along the text drawing direction.
ACellHorAlign
Is the HorAlignment property stored in the cell.
ACellVertAlign
Is the VertAlignment property stored in the cell.
ATextRot
Determines the rotation angle of the text.
ATextWrap
Determines if the text can wrap into multiple lines.
AFontIndex
Font index to be used for drawing non-rich-text.
ARichTextParams
An array of character and font index combinations for rich-text formatting of text in cell
AIsRightToLeft
If True cell must be drawn in right-to-left mode.
Protected procedure KeyDown(var Key : Word; Shift : TShiftState); override;

Standard key handling method inherited from TCustomGrid. Is overridden to catch some keys for special processing.

Parameters
Key
Key which has been pressed
Shift
Additional shift keys which are pressed
Protected procedure KeyUp(var Key : Word; Shift : TShiftState); override;

This item has no description.

Protected procedure MouseDown(Button: TMouseButton; Shift:TShiftState; X,Y:Integer); override;

Standard mouse down handler. Is overridden here to handle hyperlinks and to enter "enhanced edit mode" which removes formatting from the values and presents formulas for editing.

Protected procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;

Standard mouse move handler. Is overridden because, if TextOverflow is active, overflown cell may be erased when the mouse leaves them; repaints entire grid instead.

Protected procedure MouseUp(Button: TMouseButton; Shift:TShiftState; X,Y:Integer); override;

This item has no description.

Protected procedure MoveSelection; override;

Standard method inherited from TCustomGrid. Notifies the WorkbookSource of the changed selected cell. Repaints the grid after moving selection to avoid spurious rests of the old thick selection border.

Protected procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Standard component notification: The grid is notified that the WorkbookLink is being removed.

Protected procedure PrepareCanvasFont;

Prepares the Canvas default font for methods determining text size

Protected procedure RestoreAutoExpand(AValue: TsAutoExpandModes);

This item has no description.

Protected procedure SetEditText(ACol, ARow: Longint; const AValue: string); override;

Standard method inherited from TCustomGrid. Fetches the text that is currently in the editor. It is not yet transferred to the worksheet because input will be checked only at the end of editing.

Parameters
ACol
Grid column index of the cell being edited
ARow
Grid row index of the cell being edited
AValue
String which is currently in the cell editor
Protected procedure Setup;

Helper method for setting up the rows and columns after a new workbook is loaded or created. Sets up the grid's column and row count, as well as the initial column widths and row heights.

Protected procedure TopLeftChanged; override;

Is called whenever the worksheet is scrolled. Stores the coordinates of the TopLeft cell in the worksheet

Protected procedure ValidateInput(var Msg: TLMessage); message UM_VALIDATEINPUT;

This item has no description.

Protected procedure WMHScroll(var message: TLMHScroll); message LM_HSCROLL;

This item has no description.

Protected procedure WMVScroll(var message: TLMVScroll); message LM_VSCROLL;

This item has no description.

Properties

Protected property AllowDragAndDrop: Boolean read FAllowDragAndDrop write FAllowDragAndDrop default true;

Allow built-in drag and drop

Protected property AutoCalc: Boolean read FAutoCalc write SetAutoCalc default false;

Automatically recalculate formulas whenever a cell value changes.

Protected property AutoDetectCellType: Boolean read FAutoDetectCellType write SetAutoDetectCellType default true;

Automatically detect the cell's content type

Protected property AutoExpand: TsAutoExpandModes read FAutoExpand write FAutoExpand default [aeData, aeNavigation, aeDefault];

Automatically expand grid dimensions

Public property BackgroundColor[ACol,ARow: Integer]: TsColor read GetBackgroundColor write SetBackgroundColor;

Background color of the cell at the given column and row. Expressed as index into the workbook's color palette.

Public property BackgroundColors[ALeft,ATop,ARight,ABottom: Integer]: TsColor read GetBackgroundColors write SetBackgroundColors;

Common background color of the cells covered by the given rectangle. Expressed as index into the workbook's color palette.

Public property CellBiDiMode[ACol,ARow: Integer]: TsBiDiMode read GetCellBiDiMode write SetCellBiDiMode;

Override system or sheet right-to-left mode for cell

Public property CellBorder[ACol,ARow: Integer]: TsCellBorders read GetCellBorder write SetCellBorder;

Set of flags indicating at which cell border a border line is drawn.

Public property CellBorders[ALeft,ATop,ARight,ABottom: Integer]: TsCellBorders read GetCellBorders write SetCellBorders;

Set of flags indicating at which border of a range of cells a border line is drawn

Public property CellBorderStyle[ACol,ARow: Integer; ABorder: TsCellBorder]: TsCellBorderStyle read GetCellBorderStyle write SetCellBorderStyle;

Style of the border line at the given border of the cell at column ACol and row ARow. Requires the cellborder flag of the border to be set for the border line to be shown

Public property CellBorderStyles[ALeft,ATop,ARight,ABottom: Integer; ABorder: TsCellBorder]: TsCellBorderStyle read GetCellBorderStyles write SetCellBorderStyles;

Style of the border line at the given border of the cells within the range of colum/row indexes defined by the rectangle. Requires the cellborder flag of the border to be set for the border line to be shown

Public property CellComment[ACol,ARow: Integer]: String read GetCellComment write SetCellComment;

Comment assigned to the cell at column ACol and row ARow

Public property CellFont[ACol,ARow: Integer]: TFont read GetCellFont write SetCellFont;

Font to be used for text in the cell at column ACol and row ARow.

Public property CellFontColor[ACol,ARow: Integer]: TsColor read GetCellFontColor write SetCellFontColor;

Color of the font used for the cell in column ACol and row ARow

Public property CellFontColors[ALeft,ATop,ARight,ABottom: Integer]: TsColor read GetCellFontColors write SetCellFontColors;

Color of the font used for the cells within the range of column/row indexes defined by the rectangle, scUndefined if not constant.

Public property CellFontName[ACol,ARow: Integer]: String read GetCellFontName write SetCellFontName;

Name of the font used for the cell in column ACol and row ARow

Public property CellFontNames[ALeft,ATop,ARight,ABottom: Integer]: String read GetCellFontNames write SetCellFontNames;

Name of the font used for the cells within the range of column/row indexes defined by the rectangle.

Public property CellFonts[ALeft,ATop,ARight,ABottom: Integer]: TFont read GetCellFonts write SetCellFonts;

Font to be used for the cells in the column/row index range given by the rectangle

Public property CellFontSize[ACol,ARow: Integer]: Single read GetCellFontSize write SetCellFontSize;

Size of the font (in points) used for the cell at column ACol and row ARow

Public property CellFontSizes[ALeft,ATop,ARight,ABottom: Integer]: Single read GetCellFontSizes write SetCellFontSizes;

Size of the font (in points) used for the cells within the range of column/row indexes defined by the rectangle.

Public property CellFontStyle[ACol,ARow: Integer]: TsFontStyles read GetCellFontStyle write SetCellFontStyle;

Style of the font (bold, italic, ...) used for text in the cell at column ACol and row ARow.

Public property CellFontStyles[ALeft,ATop,ARight,ABottom: Integer]: TsFontStyles read GetCellFontStyles write SetCellFontStyles;

Style of the font (bold, italic, ...) used for the cells within the range of column/row indexes defined by the rectangle.

Public property CellFormula[ACol,ARow: Integer]: String read GetCellFormula write SetCellFormula;

Formula in the given cell, empty if there is no formula

Public property CellProtection[ACol,ARow: Integer]: TsCellProtections read GetCellProtection write SetCellProtection;

Cell protection elements assigned to the given cell

Public property CellProtections[ALeft,ATop,ARight,ABottom: Integer]: TsCellProtections read GetCellProtections write SetCellProtections;

Cell protection elements assigned to the given cell range. Empty if not consistent with all cells.

Public property Cells[ACol,ARow: Integer]: Variant read GetCellValue write SetCellValue;

Cell values

Public property ColWidths[ACol: Integer]: Integer read GetColWidths write SetColWidths;

Column width, in pixels

Public property DefaultColWidth: Integer read GetDefColWidth write SetDefColWidth;

Default column width, in pixels

Public property DefaultRowHeight: Integer read GetDefRowHeight write SetDefRowHeight;

Default row height, in pixels

Protected property DisplayFixedColRow: Boolean read GetShowHeaders write SetShowHeaders default true;

Displays column and row headers in the fixed col/row style of the grid. Deprecated. Use ShowHeaders instead.

Protected property EditorLineMode: TsEditorLineMode read FLineMode write SetEditorLineMode default elmSingleLine;

Determines whether a single- or multi-line cell editor is used

Protected property FixedColWidth: Integer read FFixedColWidth write SetFixedColWidth default 0;

Width of the fixed row header column. 0 = auto width detection

Protected property FrozenBorderPen: TPen read FFrozenBorderPen write SetFrozenBorderPen;

Pen for the line separating the frozen cols/rows from the regular grid

Protected property FrozenCols: Integer read FFrozenCols write SetFrozenCols;

This number of columns at the left is "frozen", i.e. it is not possible to scroll these columns

Protected property FrozenRows: Integer read FFrozenRows write SetFrozenRows;

This number of rows at the top is "frozen", i.e. it is not possible to scroll these rows.

Public property HeaderCount: Integer read FHeaderCount;

Count of header lines - for conversion between grid- and workbook-based row and column indexes. Either 1 if row and column headers are shown or 0 if not

Public property HorAlignment[ACol,ARow: Integer]: TsHorAlignment read GetHorAlignment write SetHorAlignment;

Parameter for horizontal text alignment within the cell at column ACol and row ARow

Public property HorAlignments[ALeft,ATop,ARight,ABottom: Integer]: TsHorAlignment read GetHorAlignments write SetHorAlignments;

Parameter for the horizontal text alignments in all cells within the range cf column/row indexes defined by the rectangle.

Public property Hyperlink[ACol,ARow: Integer]: String read GetHyperlink write SetHyperlink;

Hyperlink assigned to the cell in row ARow and column ACol

Public property NumberFormat[ACol,ARow: Integer]: String read GetNumberFormat write SetNumberFormat;

Number format (as Excel string) to be applied to cell at column ACol and row ARow.

Public property NumberFormats[ALeft,ATop,ARight,ABottom: Integer]: String read GetNumberFormats write SetNumberFormats;

Number format (as Excel string) to be applied to all cells within the range of column/row indexes defined by the rectangle.

Protected property OnClickHyperlink: TsHyperlinkClickEvent read FOnClickHyperlink write FOnClickHyperlink;

Event called when an external hyperlink is clicked

Protected property OnGetColHeaderText: TsGetCellTextEvent read FGetColHeaderText write FGetColHeaderText;

Event allowing to modifiy the text displayed in a column header

Protected property OnGetRowHeaderText: TsGetCellTextEvent read FGetRowHeaderText write FGetRowHeaderText;

Event allowing to modifiy the text displayed in a row header

Protected property PageBreakPen: TPen read FPageBreakPen write SetPageBreakPen;

Defines the pen used for the line drawn at the position of page breaks

Public property RangeSelectMode default rsmMulti;

Allow multiple selections

Protected property ReadFormulas: Boolean read FReadFormulas write SetReadFormulas;

Activates reading of RPN formulas. Should be turned off when non-implemented formulas crashe reading of the spreadsheet file.

Public property RowHeights[ARow: Integer]: Integer read GetRowHeights write SetRowHeights;

Row height in pixels

Protected property SelectionPen: TsSelPen read FSelPen write SetSelPen;

Pen used for drawing the selection rectangle

Protected property ShowFormulas: Boolean read FShowFormulas write SetShowFormulas default false;

Shows/hides formulas in grid when AutoCalc is off

Protected property ShowGridLines: Boolean read GetShowGridLines write SetShowGridLines default true;

Shows/hides vertical and horizontal grid lines

Protected property ShowHeaders: Boolean read GetShowHeaders write SetShowHeaders default true;

Shows/hides column and row headers in the fixed col/row style of the grid.

Protected property ShowPageBreaks: Boolean read FShowPageBreaks write SetShowPageBreaks default true;

Shows/hides lines at the position of page breaks

Protected property TextOverflow: Boolean read FTextOverflow write FTextOverflow default false;

Activates text overflow (cells reaching into neighbors)

Public property TextRotation[ACol,ARow: Integer]: TsTextRotation read GetTextRotation write SetTextRotation;

Rotation of the text in the cell at column ACol and row ARow.

Public property TextRotations[ALeft,ATop,ARight,ABottom: Integer]: TsTextRotation read GetTextRotations write SetTextRotations;

Rotation of the text in the cells within the range of column/row indexes defined by the rectangle.

Public property TopLeftPx: TPoint read GetPxTopLeft;

Pixel coordinates of the top-left corner of the grid's cell area

Public property VertAlignment[ACol,ARow: Integer]: TsVertAlignment read GetVertAlignment write SetVertAlignment;

Parameter for vertical text alignment in the cell at column ACol and row ARow.

Public property VertAlignments[ALeft,ATop,ARight,ABottom: Integer]: TsVertAlignment read GetVertAlignments write SetVertAlignments;

Parameter for vertical text alignment in the cells having column/row indexes defined by the rectangle.

Public property Wordwrap[ACol,ARow: Integer]: Boolean read GetWordwrap write SetWordwrap;

If true, word-wrapping of text within the cell at column ACol and row ARow is activated.

Public property Wordwraps[ALeft,ATop,ARight,ABottom: Integer]: Boolean read GetWordwraps write SetWordwraps;

If true, word-wrapping of text within all cells within the range defined by the rectangle is activated.

Public property Workbook: TsWorkbook read GetWorkbook;

Workbook displayed in the grid

Public property WorkbookSource: TsWorkbookSource read GetWorkbookSource write SetWorkbookSource;

Link to the workbook

Public property Worksheet: TsWorksheet read GetWorksheet;

Currently selected worksheet of the workbook

Public property ZoomFactor: Double read GetZoomFactor write SetZoomFactor;

Zoomfactor of the grid


fpspreadsheetgrid: Class TsWorksheetGrid

Class TsWorksheetGrid

Description
Hierarchy
Fields
Methods
Properties

Unit

fpspreadsheetgrid

Declaration

type TsWorksheetGrid = class(TsCustomWorksheetGrid)

Description

TsWorksheetGrid is a grid which displays spreadsheet data along with formatting. As it is linked to an instance of TsWorkbook, it provides methods for reading data from or writing to spreadsheet files. It has the same funtionality as TsCustomWorksheetGrid, but has published all properties.

Hierarchy

  • TCustomDrawGrid
  • TsCustomWorksheetGrid
  • TsWorksheetGrid

Overview

Properties

Published | property Align;
Published | property AllowDragAndDrop;
Published | property Anchors;
Published | property AutoAdvance;
Published | property AutoCalc;
Published | property AutoDetectCellType;
Published | property AutoEdit;
Published | property AutoExpand;
Published | property AutoFillColumns;
Published | property BorderSpacing;
Published | property BorderStyle;
Published | property CellHintPriority;
Published | property ColCount default 27;
Published | property Color;
Published | property Constraints;
Published | property DefaultColWidth;
Published | property DefaultDrawing;
Published | property DefaultRowHeight;
Published | property DisplayFixedColRow; deprecated 'Use ShowHeaders';
Published | property DragCursor;
Published | property DragKind;
Published | property DragMode;
Published | property EditorLineMode;
Published | property Enabled;
Published | property ExtendedSelect default true;
Published | property FixedColor;
Published | property FixedColWidth;
Published | property Flat;
Published | property Font;
Published | property FrozenBorderPen;
Published | property FrozenCols;
Published | property FrozenRows;
Published | property GridLineWidth;
Published | property HeaderHotZones;
Published | property HeaderPushZones;
Published | property MouseWheelOption;
Published | property OnBeforeSelection;
Published | property OnChangeBounds;
Published | property OnClick;
Published | property OnClickHyperlink;
Published | property OnColRowDeleted;
Published | property OnColRowExchanged;
Published | property OnColRowInserted;
Published | property OnColRowMoved;
Published | property OnContextPopup;
Published | property OnDblClick;
Published | property OnDragDrop;
Published | property OnDragOver;
Published | property OnDrawCell;
Published | property OnEditButtonClick;
Published | property OnEditingDone;
Published | property OnEndDock;
Published | property OnEndDrag;
Published | property OnEnter;
Published | property OnExit;
Published | property OnGetColHeaderText;
Published | property OnGetEditMask;
Published | property OnGetEditText;
Published | property OnGetRowHeaderText;
Published | property OnHeaderClick;
Published | property OnHeaderSized;
Published | property OnHeaderSizing;
Published | property OnKeyDown;
Published | property OnKeyPress;
Published | property OnKeyUp;
Published | property OnMouseDown;
Published | property OnMouseMove;
Published | property OnMouseUp;
Published | property OnMouseWheel;
Published | property OnMouseWheelDown;
Published | property OnMouseWheelUp;
Published | property OnPickListSelect;
Published | property OnPrepareCanvas;
Published | property OnResize;
Published | property OnSelectCell;
Published | property OnSelectEditor;
Published | property OnSelection;
Published | property OnSetEditText;
Published | property OnShowHint;
Published | property OnStartDock;
Published | property OnStartDrag;
Published | property OnTopLeftChanged;
Published | property OnUTF8KeyPress;
Published | property OnValidateEntry;
Published | property Options;
Published | property PageBreakPen;
Published | property ParentBiDiMode;
Published | property ParentColor default false;
Published | property ParentFont;
Published | property ParentShowHint;
Published | property PopupMenu;
Published | property ReadFormulas;
Published | property RowCount default 101;
Published | property ScrollBars;
Published | property SelectionPen;
Published | property ShowFormulas;
Published | property ShowGridLines;
Published | property ShowHeaders;
Published | property ShowHint;
Published | property ShowPageBreaks;
Published | property TabOrder;
Published | property TabStop;
Published | property TextOverflow;
Published | property TitleFont;
Published | property TitleImageList;
Published | property TitleStyle;
Published | property UseXORFeatures;
Published | property Visible;
Published | property VisibleColCount;
Published | property VisibleRowCount;
Published | property WorkbookSource;

Description

Properties

Published property Align;

inherited from ancestors

Published property AllowDragAndDrop;

Allow built-in drag and drop

Published property Anchors;

inherited from ancestors

Published property AutoAdvance;

inherited from ancestors

Published property AutoCalc;

Automatically recalculates the worksheet formulas if a cell value changes.

Published property AutoDetectCellType;

Automatically detect the cell's content type

Published property AutoEdit;

inherited from ancestors

Published property AutoExpand;

Automatically expand grid dimensions

Published property AutoFillColumns;

inherited from ancestors

Published property BorderSpacing;

inherited from ancestors

Published property BorderStyle;

inherited from ancestors

Published property CellHintPriority;

inherited from ancestors

Published property ColCount default 27;

inherited from ancestors

Published property Color;

inherited from ancestors

Published property Constraints;

inherited from ancestors

Published property DefaultColWidth;

inherited from ancestors

Published property DefaultDrawing;

inherited from ancestors

Published property DefaultRowHeight;

inherited from ancestors

Published property DisplayFixedColRow; deprecated 'Use ShowHeaders';

Warning: this symbol is deprecated: Use ShowHeaders

Displays column and row headers in the fixed col/row style of the grid. Deprecated. Use ShowHeaders instead.

Published property DragCursor;

inherited from ancestors

Published property DragKind;

inherited from ancestors

Published property DragMode;

inherited from ancestors

Published property EditorLineMode;

Determines whether a single- or multiline cell editor is used

Published property Enabled;

inherited from ancestors

Published property ExtendedSelect default true;

inherited from ancestors

Published property FixedColor;

inherited from ancestors

Published property FixedColWidth;

Width of the first fixed column (= row headers), in pixels

Published property Flat;

inherited from ancestors

Published property Font;

inherited from ancestors

Published property FrozenBorderPen;

Pen for the line separating the frozen cols/rows from the regular grid

Published property FrozenCols;

This number of columns at the left is "frozen", i.e. it is not possible to scroll these columns.

Published property FrozenRows;

This number of rows at the top is "frozen", i.e. it is not possible to scroll these rows.

Published property GridLineWidth;

inherited from ancestors

Published property HeaderHotZones;

inherited from ancestors

Published property HeaderPushZones;

inherited from ancestors

Published property MouseWheelOption;

inherited from ancestors

Published property OnBeforeSelection;

inherited from ancestors

Published property OnChangeBounds;

inherited from ancestors

Published property OnClick;

inherited from ancestors

Published property OnClickHyperlink;

inherited from TCustomWorksheetGrid

Published property OnColRowDeleted;

inherited from ancestors

Published property OnColRowExchanged;

inherited from ancestors

Published property OnColRowInserted;

inherited from ancestors

Published property OnColRowMoved;

inherited from ancestors

Published property OnContextPopup;

inherited from ancestors

Published property OnDblClick;

inherited from ancestors

Published property OnDragDrop;

inherited from ancestors

Published property OnDragOver;

inherited from ancestors

Published property OnDrawCell;

inherited from ancestors

Published property OnEditButtonClick;

inherited from ancestors

Published property OnEditingDone;

inherited from ancestors

Published property OnEndDock;

inherited from ancestors

Published property OnEndDrag;

inherited from ancestors

Published property OnEnter;

inherited from ancestors

Published property OnExit;

inherited from ancestors

Published property OnGetColHeaderText;

inherited from TCustomWorksheetGrid

Published property OnGetEditMask;

inherited from ancestors

Published property OnGetEditText;

inherited from ancestors

Published property OnGetRowHeaderText;

inherited from TCustomWorksheetGrid

Published property OnHeaderClick;

inherited from ancestors

Published property OnHeaderSized;

inherited from ancestors

Published property OnHeaderSizing;

inherited from ancestors

Published property OnKeyDown;

inherited from ancestors

Published property OnKeyPress;

inherited from ancestors

Published property OnKeyUp;

inherited from ancestors

Published property OnMouseDown;

inherited from ancestors

Published property OnMouseMove;

inherited from ancestors

Published property OnMouseUp;

inherited from ancestors

Published property OnMouseWheel;

inherited from ancestors

Published property OnMouseWheelDown;

inherited from ancestors

Published property OnMouseWheelUp;

inherited from ancestors

Published property OnPickListSelect;

inherited from ancestors

Published property OnPrepareCanvas;

inherited from ancestors

Published property OnResize;

inherited from ancestors

Published property OnSelectCell;

inherited from ancestors

Published property OnSelectEditor;

inherited from ancestors

Published property OnSelection;

inherited from ancestors

Published property OnSetEditText;

inherited from ancestors

Published property OnShowHint;

inherited from ancestors

Published property OnStartDock;

inherited from ancestors

Published property OnStartDrag;

inherited from ancestors

Published property OnTopLeftChanged;

inherited from ancestors

Published property OnUTF8KeyPress;

inherited from ancestors

Published property OnValidateEntry;

inherited from ancestors

Published property Options;

inherited from TCustomGrid. Select the option goEditing to make the grid editable!

Published property PageBreakPen;

Defines the pen used for the lines drawn at the position of page breaks

Published property ParentBiDiMode;

inherited from ancestors

Published property ParentColor default false;

inherited from ancestors

Published property ParentFont;

inherited from ancestors

Published property ParentShowHint;

inherited from ancestors

Published property PopupMenu;

inherited from ancestors

Published property ReadFormulas;

Activates reading of RPN formulas. Should be turned off when non-implemented formulas crashes reading of the spreadsheet file.

Published property RowCount default 101;

inherited from ancestors

Published property ScrollBars;

inherited from ancestors

Published property SelectionPen;

Pen used for drawing the selection rectangle

Published property ShowFormulas;

Shows/hides formulas in grid cells when AutoCalc is off.

Published property ShowGridLines;

Shows/hides vertical and horizontal grid lines.

Published property ShowHeaders;

Shows/hides column and row headers in the fixed col/row style of the grid.

Published property ShowHint;

inherited from ancestors

Published property ShowPageBreaks;

Shows/hides lines at the position of page breaks

Published property TabOrder;

inherited from ancestors

Published property TabStop;

inherited from ancestors

Published property TextOverflow;

Activates text overflow (cells reaching into neighbors)

Published property TitleFont;

inherited from ancestors

Published property TitleImageList;

inherited from ancestors

Published property TitleStyle;

inherited from ancestors

Published property UseXORFeatures;

inherited from ancestors

Published property Visible;

inherited from ancestors

Published property VisibleColCount;

inherited from ancestors

Published property VisibleRowCount;

inherited from ancestors

Published property WorkbookSource;

Link to the workbook


fpsRPN

Unit fpsRPN

Description
Uses
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Constants
Variables

Description

The unit fpsRPN contains methods for simple creation of an RPNFormula array to be used in fpSpreadsheet.

AUTHORS: Werner Pamler

LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus distribution, for details about the license.

Overview

Classes, Interfaces, Objects and Records

Name | Description
Record TRPNItem |

Functions and Procedures

function CreateRPNFormula(AItem: PRPNItem; AReverse: Boolean = false): TsRPNFormula;
procedure DestroyRPNFormula(AItem: PRPNItem);
function RPNBool(AValue: Boolean; ANext: PRPNItem): PRPNItem;
function RPNCellOffset(ARowOffset, AColOffset: Integer; AFlags: TsRelFlags; ANext: PRPNItem): PRPNItem;
function RPNCellRange(ARow, ACol, ARow2, ACol2: Cardinal; AFlags: TsRelFlags; ANext: PRPNItem): PRPNItem; overload;
function RPNCellRange(ACellRangeAddress: String; ANext: PRPNItem): PRPNItem; overload;
function RPNCellRange3D(ASheet1, ARow1, ACol1, ASheet2, ARow2, ACol2: Cardinal; AFlags: TsRelFlags; ANext: PRPNItem): PRPNItem;
function RPNCellRef(ACellAddress: String; ANext: PRPNItem): PRPNItem; overload;
function RPNCellRef(ARow, ACol: Integer; AFlags: TsRelFlags; ANext: PRPNItem): PRPNItem; overload;
function RPNCellRef3D(ASheet, ARow, ACol: Cardinal; AFlags: TsRelFlags; ANext: PRPNItem): PRPNItem;
function RPNCellValue(ACellAddress: String; ANext: PRPNItem): PRPNItem; overload;
function RPNCellValue(ARow, ACol: Integer; AFlags: TsRelFlags; ANext: PRPNItem): PRPNItem; overload;
function RPNCellValue3D(ASheet, ARow, ACol: Cardinal; AFlags: TsRelflags; ANext: PRPNItem): PRPNItem;
function RPNErr(AErrCode: TsErrorValue; ANext: PRPNItem): PRPNItem;
function RPNFunc(AFuncName: String; ANumParams: Byte; ANext: PRPNItem): PRPNItem; overload;
function RPNFunc(AToken: TFEKind; ANext: PRPNItem): PRPNItem; overload;
function RPNFunc(AFuncName: String; ANext: PRPNItem): PRPNItem; overload;
function RPNInteger(AValue: Int64; ANext: PRPNItem): PRPNItem;
function RPNMissingArg(ANext: PRPNItem): PRPNItem;
function RPNNumber(AValue: Double; ANext: PRPNItem): PRPNItem;
function RPNParenthesis(ANext: PRPNItem): PRPNItem;
function RPNString(AValue: String; ANext: PRPNItem): PRPNItem;

Types

PRPNItem = ˆTRPNItem;

Description

Functions and Procedures

function CreateRPNFormula(AItem: PRPNItem; AReverse: Boolean = false): TsRPNFormula;

Creates an RPN formula by a single call using nested RPN items.

For each formula element, use one of the RPNxxxx functions implemented here. They are designed to be nested into each other. Terminate the chain by using nil.

Example: The RPN formula for the string expression "$A1+2" can be created as follows:

var
  f: TsRPNFormula;
begin
  f := CreateRPNFormula(
    RPNCellValue('$A1',
    RPNNumber(2,
    RPNFunc(fekAdd,
    nil))));

Parameters
AItem
Pointer to the first RPN item representing the formula. Each item contains a pointer to the next item in the list. The list is terminated by nil.
AReverse
If True the first rpn item in the chained list becomes the last item in the token array. This feature is needed for reading an xls file.
procedure DestroyRPNFormula(AItem: PRPNItem);

Destroys the RPN formula starting with the given RPN item.

Parameters
AItem
Pointer to the first RPN items representing the formula. Each item contains a pointer to the next item in the list. The list is terminated by nil.
function RPNBool(AValue: Boolean; ANext: PRPNItem): PRPNItem;

Creates a boolean value entry in the RPN array.

Parameters
AValue
Boolean value to be stored in the RPN item
ANext
Pointer to the next RPN item in the list
function RPNCellOffset(ARowOffset, AColOffset: Integer; AFlags: TsRelFlags; ANext: PRPNItem): PRPNItem;

Creates an entry in the RPN array for a relative cell reference as used in shared formulas. The given parameters indicate the relativ offset between the current cell coordinates and a reference rell.

Parameters
ARowOffset
Offset between current row and the row of a reference cell
AColOffset
Offset between current column and the column of a reference cell
AFlags
Flags specifying absolute or relative cell addresses
ANext
Pointer to the next RPN item in the list
function RPNCellRange(ARow, ACol, ARow2, ACol2: Cardinal; AFlags: TsRelFlags; ANext: PRPNItem): PRPNItem; overload;

Creates an entry in the RPN array for a range of cells, specified by the row/column indexes of the top/left and bottom/right corners of the block. The flags indicate relative indexes.

Parameters
ARow
Row index of the top/left cell
ACol
Column index of the top/left cell
ARow2
Row index of the bottom/right cell
ACol2
Column index of the bottom/right cell
AFlags
Flags specifying absolute or relative cell addresses
ANext
Pointer to the next RPN item in the list
function RPNCellRange(ACellRangeAddress: String; ANext: PRPNItem): PRPNItem; overload;

Creates an entry in the RPN array for a range of cells, specified by an Excel-style address, e.g. A1:G5. As in Excel, use a $ sign to indicate absolute addresses.

Parameters
ACellRangeAddress
Adress of the cell range given in Excel notation, such as A1:G5
ANext
Pointer to the next RPN item in the list
function RPNCellRange3D(ASheet1, ARow1, ACol1, ASheet2, ARow2, ACol2: Cardinal; AFlags: TsRelFlags; ANext: PRPNItem): PRPNItem;

This item has no description.

function RPNCellRef(ACellAddress: String; ANext: PRPNItem): PRPNItem; overload;

Creates an entry in the RPN array for a cell reference, specifed by its address, e.g. 'A1'. Takes care of absolute and relative cell addresses. "Cell reference" means that all properties of the cell can be handled. Note that most Excel formulas with cells require the cell value only (–> RPNCellValue)

Parameters
ACellAddress
Adress of the cell given in Excel A1 notation
ANext
Pointer to the next RPN item in the list
function RPNCellRef(ARow, ACol: Integer; AFlags: TsRelFlags; ANext: PRPNItem): PRPNItem; overload;

Creates an entry in the RPN array for a cell reference, specifed by its row and column index and flags containing information on relative addresses. "Cell reference" means that all properties of the cell can be handled. Note that most Excel formulas with cells require the cell value only (–> RPNCellValue)

Parameters
ARow
Row index of the cell
ACol
Column index of the cell
AFlags
Flags specifying absolute or relative cell addresses
ANext
Pointer to the next RPN item in the list
function RPNCellRef3D(ASheet, ARow, ACol: Cardinal; AFlags: TsRelFlags; ANext: PRPNItem): PRPNItem;

This item has no description.

function RPNCellValue(ACellAddress: String; ANext: PRPNItem): PRPNItem; overload;

Creates an entry in the RPN array for a cell value, specifed by its address, e.g. 'A1'. Takes care of absolute and relative cell addresses.

Parameters
ACellAddress
Adress of the cell given in Excel A1 notation
ANext
Pointer to the next RPN item in the list
function RPNCellValue(ARow, ACol: Integer; AFlags: TsRelFlags; ANext: PRPNItem): PRPNItem; overload;

Creates an entry in the RPN array for a cell value, specifed by its row and column index and a flag containing information on relative addresses.

Parameters
ARow
Row index of the cell
ACol
Column index of the cell
AFlags
Flags specifying absolute or relative cell addresses
ANext
Pointer to the next RPN item in the list
function RPNCellValue3D(ASheet, ARow, ACol: Cardinal; AFlags: TsRelflags; ANext: PRPNItem): PRPNItem;

This item has no description.

function RPNErr(AErrCode: TsErrorValue; ANext: PRPNItem): PRPNItem;

Creates an entry in the RPN array with an error value.

Parameters
AErrCode
Error code to be inserted (see TsErrorValue
ANext
Pointer to the next RPN item in the list
See also
TsErrorValue
function RPNFunc(AFuncName: String; ANumParams: Byte; ANext: PRPNItem): PRPNItem; overload;

Creates an entry in the RPN array for an Excel spreadsheet function specified by its name. Specify the number of parameters used. They must have been created before.

Parameters
AFuncName
Name of the spreadsheet function (as used by Excel).
ANumParams
Number of arguments used in the formula.
ANext
Pointer to the next RPN item in the list
function RPNFunc(AToken: TFEKind; ANext: PRPNItem): PRPNItem; overload;

Creates an entry in the RPN array for an operation specified by its TokenID (–> TFEKind). Note that array elements for all needed parameters must have been created before.

Parameters
AToken
Formula element indicating the function to be executed, see the TFEKind enumeration for possible values.
ANext
Pointer to the next RPN item in the list
See also
TFEKind
function RPNFunc(AFuncName: String; ANext: PRPNItem): PRPNItem; overload;

Creates an entry in the RPN array for an Excel function or operation specified by its name. Note that array elements for all needed parameters must have been created before.

Parameters
AFuncName
Name of the spreadsheet function (as used by Excel)
ANext
Pointer to the next RPN item in the list
function RPNInteger(AValue: Int64; ANext: PRPNItem): PRPNItem;

Creates an entry in the RPN array for an integer value

Parameters
AValue
Integer value to be inserted into the formula
ANext
Pointer to the next RPN item in the list
function RPNMissingArg(ANext: PRPNItem): PRPNItem;

Creates an entry in the RPN array for a missing argument in of function call. Use this in a formula to indicate a missing argument

Parameters
ANext
Pointer to the next RPN item in the list.
function RPNNumber(AValue: Double; ANext: PRPNItem): PRPNItem;

Creates an entry in the RPN array for a floating point number.

Parameters
AValue
Number value to be inserted into the formula
ANext
Pointer to the next RPN item in the list
function RPNParenthesis(ANext: PRPNItem): PRPNItem;

Creates an entry in the RPN array which puts the current operator in parenthesis. For display purposes only, does not affect calculation.

Parameters
ANext
Pointer to the next RPN item in the list
function RPNString(AValue: String; ANext: PRPNItem): PRPNItem;

Creates an entry in the RPN array for a string.

Parameters
AValue
String to be inserted into the formula
ANext
Pointer to the next RPN item in the list

Types

PRPNItem = ˆTRPNItem;

Pointer to a TPRNItem record

See also
TRPNItem


fpsRPN: Record TRPNItem

Record TRPNItem

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsRPN

Declaration

type TRPNItem = record

Description

Helper record for simplification of RPN formula creation

Parameters
FE
Formula element record stored in the RPN item
Next
Pointer to the next RPN item of the formula
See also
TsFormulaElement

Overview

Fields

Public | FE: TsFormulaElement;
Public | Next: PRPNItem;

Description

Fields

Public FE: TsFormulaElement;

This item has no description.

Public Next: PRPNItem;

This item has no description.


fpsTypes

Unit fpsTypes

Description
Uses
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Constants
Variables

Description

Unit fpsTypes collects the most fundamental declarations used throughout the fpspreadsheet library. It is very likey that this unit must be added to the uses clause of the application.

AUTHORS: Werner Pamler

LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus distribution, for details about the license.

Overview

Classes, Interfaces, Objects and Records

Name | Description
Record TsSpreadsheetFormatLimitations |
Record TsCSVParams |
Record TsFormulaElement |
Record TsComment |
Record TsHyperlink |
Class TsFont |
Record TsRichTextParam |
Record TsCellBorderStyle |
Record TsFillPattern |
Record TsCellCoord |
Record TsCellRange |
Record TsCellRange3d |
Record TsRowColRange |
Record TsSortKey |
Record TsSortParams |
Record TsCryptoInfo |
Record TsCellFormat |
Record TCell |
Record TRow |
Record TCol |
Record TsImage |
Record TsHeaderFooterImage |
Record TsSearchParams |
Record TsReplaceParams |
Class TsMetaData |
Class TsBasicWorksheet |
Class TsBasicWorkbook |
Class EFpSpreadsheet |
Class EFpSpreadsheetReader |
Class EFpSpreadsheetWriter |

Functions and Procedures

procedure InitUTF8FormatSettings(out AFormatSettings: TFormatSettings);

Types

PCell = ˆTCell;
PCol = ˆTCol;
PRow = ˆTRow;
PsCellFormat = ˆTsCellFormat;
PsCellRange = ˆTsCellRange;
PsComment = ˆTsComment;
PsHyperlink = ˆTsHyperlink;
PsImage = ˆTsImage;
TBasicOperationTokens = fekAdd..fekParen;
TCellContentType = (...);
TFEKind = (...);
TOperandTokens = fekCell..fekMissingArg;
TsBiDiMode = (...);
TsCalcState = (...);
TsCallback = procedure (data, arg: Pointer) of object;
TsCellBorder = (...);
TsCellBorders = set of TsCellBorder;
TsCellBorderStyles = array[TsCellBorder] of TsCellBorderStyle;
TsCellFlag = (...);
TsCellFlags = set of TsCellFlag;
TsCellProtection = (...);
TsCellProtections = set of TsCellProtection;
TsCellRange3dArray = array of TsCellRange3d;
TsCellRangeArray = array of TsCellRange;
TsColor = DWord;
TsColRowOption = (...);
TsColRowOptions = set of TsColRowOption;
TsColWidthtype = (...);
TsCompareOperation = (...);
TsCopyOperation = (...);
TsCryptoAlgorithm = (...);
TsCSVLineEnding = (...);
TsErrorValue = (...);
TsFillStyle = (...);
TsFontArray = array of TsFont;
TsFontPosition = (...);
TsFontStyle = (...);
TsFontStyles = set of TsFontStyle;
TsFormulaDialect = (...);
TsFormulaFlag = (...);
TsFormulaFlags = set of TsFormulaFlag;
TsHeaderFooterImages = array[TsHeaderFooterSectionIndex] of TsHeaderFooterImage;
TsHeaderFooterSectionIndex = (...);
TsHorAlignment = (...);
TsLineStyle = (...);
TsNumberFormat = (...);
TsOnQueryPassword = function: String of object;
TsPageOrientation = (...);
TsPrintOption = (...);
TsPrintOptions = set of TsPrintOption;
TsReadWriteFlag = (...);
TsRelFlag = (...);
TsRelFlags = set of TsRelFlag;
TsReplaceOption = (...);
TsReplaceOptions = set of TsReplaceOption;
TsRichTextParams = array of TsRichTextParam;
TsRowHeightType = (...);
TsRPNFormula = array of TsFormulaElement;
TsSearchOption = (...);
TsSearchOptions = set of TsSearchOption;
TsSearchWithin = (...);
TsSheetOption = (...);
TsSheetOptions = set of TsSheetOption;
TsSizeUnits = (...);
TsSortKeys = array of TsSortKey;
TsSortOption = (...);
TsSortOptions = set of TsSortOption;
TsSortPriority = (...);
TsSpreadFormatID = integer;
TsSpreadFormatIDArray = array of TsSpreadFormatID;
TsSpreadsheetFormat = (...);
TsStreamParam = (...);
TsStreamParams = set of TsStreamParam;
TsTextRotation = (...);
TsUsedFormattingField = (...);
TsUsedFormattingFields = set of TsUsedFormattingField;
TsVertAlignment = (...);
TsWorkbookOption = (...);
TsWorkbookOptions = set of TsWorkbookOption;
TsWorkbookProtection = (...);
TsWorkbookProtections = set of TsWorkbookProtection;
TsWorksheetProtection = (...);
TsWorksheetProtections = set of TsWorksheetProtection;

Constants

ALL_BORDERS: TsCellBorders = [cbNorth, cbEast, cbSouth, cbWest];
ALL_SHEET_PROTECTIONS = [spFormatCells, spFormatColumns, spFormatRows, spDeleteColumns, spDeleteRows, spInsertColumns, spInsertRows, spInsertHyperlinks, spCells, spSort, spObjects, spSelectLockedCells, spSelectUnlockedCells ];
BOLD_FONTINDEX = 2;
ColWidthTypeNames: array[TsColWidthType] of string = ( 'Default', 'Custom');
DEFAULT_BORDERSTYLES: TsCellBorderStyles = ( (LineStyle: lsThin; Color: scBlack), (LineStyle: lsThin; Color: scBlack), (LineStyle: lsThin; Color: scBlack), (LineStyle: lsThin; Color: scBlack), (LineStyle: lsThin; Color: scBlack), (LineStyle: lsThin; Color: scBlack) );
DEFAULT_CELL_PROTECTION = [cpLockCell];
DEFAULT_FONTINDEX = 0;
DEFAULT_FONTNAME = 'Arial';
DEFAULT_FONTSIZE = 10;
DEFAULT_SHEET_PROTECTION = ALL_SHEET_PROTECTIONS - [spSelectLockedCells, spSelectUnlockedcells];
EMPTY_FILL: TsFillPattern = ( Style: fsNoFill; FgColor: scTransparent; BgColor: scTransparent; );
FPS_LINE_ENDING = #10;
FPS_REPLACEMENT_CHAR = '?';
HEADER_FOOTER_INDEX_ALL = 1;
HEADER_FOOTER_INDEX_EVEN = 2;
HEADER_FOOTER_INDEX_FIRST = 0;
HEADER_FOOTER_INDEX_ODD = 1;
HYPERLINK_FONTINDEX = 1;
ITALIC_FONTINDEX = 3;
MAX_COL_COUNT = 65535;
ncfBCSVB = 14;
ncfBCVB = 0;
ncfBVCB = 4;
ncfBVSCB = 15;
ncfCMV = 2;
ncfCSMV = 12;
ncfCSVM = 11;
ncfCVM = 3;
ncfDefault = -1;
ncfMCSV = 9;
ncfMCV = 1;
ncfMVC = 5;
ncfMVSC = 8;
ncfVCM = 7;
ncfVMC = 6;
ncfVMSC = 13;
ncfVSCM = 10;
NO_CELL_BORDER: TsCellBorderStyle = (LineStyle: lsThin; Color: scNotDefined);
pcfCSV = 2;
pcfCV = 0;
pcfDefault = -1;
pcfVC = 1;
pcfVSC = 3;
rfAllRel = [rfRelRow, rfRelCol, rfRelRow2, rfRelCol2];
RowHeightTypeNames: array[TsRowHeightType] of string = ( 'Default', 'Custom', 'Auto');
ROW_HEIGHT_CORRECTION = 0.3;
scAqua = scCyan deprecated;
scBeige = $00DCF5F5 deprecated;
scBlack = $00000000;
scBlue = $00FF0000;
scBlueGray = $00996666 deprecated;
scBlueGrey = scBlueGray deprecated;
scBrown = $00003399 deprecated;
scCoral = $008080FF deprecated;
scCyan = $00FFFF00;
scDarkBlue = $00800000;
scDarkBrown = $002D52A0 deprecated;
scDarkGreen = $00008000;
scDarkPurple = $00660066 deprecated;
scDarkRed = $00000080;
scDarkTeal = $00663300 deprecated;
scFuchsia = scMagenta deprecated;
scGold = $0000CCFF deprecated;
scGray = $00808080;
scGray10pct = $00E6E6E6 deprecated;
scGray20pct = $00CCCCCC deprecated;
scGray25pct = scSilver deprecated;
scGray40pct = $00969696 deprecated;
scGray50pct = scGray deprecated;
scGray80pct = $00333333 deprecated;
scGreen = $0000FF00;
scGrey = scGray;
scGrey10pct = scGray10pct deprecated;
scGrey20pct = scGray20pct deprecated;
scIceBlue = $00FFCCCC deprecated;
scIndigo = $00993333 deprecated;
scIvory = $00CCFFFF deprecated;
scLavander = $00FF99CC deprecated;
scLightBlue = $00FF6633 deprecated;
scLightGreen = $00CCFFCC deprecated;
scLightOrange = $000099FF deprecated;
scLightTurquoise = $00FFFFCC deprecated;
scLightYellow = $0099FFFF deprecated;
scLime = scGreen deprecated;
scMagenta = $00FF00FF;
scMaroon = scDarkRed deprecated;
scNavy = scDarkBlue deprecated;
scNotDefined = $40000000;
scOceanBlue = $00CC6600 deprecated;
scOlive = $00008080;
scOliveGreen = $00003333 deprecated;
scOrange = $000066FF deprecated;
scPaleBlue = $00FFCC99 deprecated;
scPaletteIndexMask = $80000000;
scPeriwinkle = $00FF9999 deprecated;
scPink = $00FE00FE deprecated;
scPlum = $00663399 deprecated;
scPurple = $00800080;
scRed = $000000FF;
scRGBMask = $00FFFFFF;
scRose = $00CC99FF deprecated;
scSeaGreen = $00669933 deprecated;
scSilver = $00C0C0C0;
scSkyBlue = $00FFCC00 deprecated;
scTan = $0099CCFF deprecated;
scTeal = $00808000;
scTransparent = $20000000;
scTurquoise = scCyan deprecated;
scVeryDarkGreen = $00003300 deprecated;
scWheat = $00B3DEF5 deprecated;
scWhite = $00FFFFFF;
scYellow = $0000FFFF;
sfidUnknown = -1;
SHEETSEPARATOR = '!';
SizeUnitNames: array[TsSizeUnits] of string = ( 'chars', 'lines', 'mm', 'cm', 'pt', 'in');
STR_COMMA_SEPARATED_EXTENSION = '.csv';
STR_ERR_ARG_ERROR = '#N/A';
STR_ERR_DIVIDE_BY_ZERO = '#DIV/0!';
STR_ERR_EMPTY_INTERSECTION = '#NULL!';
STR_ERR_FORMULA_NOT_SUPPORTED= '<FMLA?>';
STR_ERR_ILLEGAL_REF = '#REF!';
STR_ERR_OVERFLOW = '#NUM!';
STR_ERR_UNKNOWN = '#UNKNOWN!';
STR_ERR_WRONG_NAME = '#NAME?';
STR_ERR_WRONG_TYPE = '#VALUE!';
STR_EXCEL_EXTENSION = '.xls';
STR_FALSE = 'FALSE';
STR_FILEFORMAT_CSV = 'CSV';
STR_FILEFORMAT_EXCEL_2 = 'Excel 2.1';
STR_FILEFORMAT_EXCEL_5 = 'Excel 5';
STR_FILEFORMAT_EXCEL_8 = 'Excel 97-2003';
STR_FILEFORMAT_EXCEL_XLSX = 'Excel 2007+ XML';
STR_FILEFORMAT_EXCEL_XML = 'Excel XP/2003 XML';
STR_FILEFORMAT_HTML = 'HTML';
STR_FILEFORMAT_OPENDOCUMENT = 'OpenDocument';
STR_FILEFORMAT_WIKITABLE_PIPES = 'WikiTable (Pipes)';
STR_FILEFORMAT_WIKITABLE_WIKIMEDIA = 'WikiTable (WikiMedia)';
STR_HTML_EXTENSION = '.html';
STR_OOXML_EXCEL_EXTENSION = '.xlsx';
STR_OPENDOCUMENT_CALC_EXTENSION = '.ods';
STR_TRUE = 'TRUE';
STR_WIKITABLE_PIPES_EXTENSION = '.wikitable_pipes';
STR_WIKITABLE_WIKIMEDIA_EXTENSION = '.wikitable_wikimedia';
STR_XML_EXCEL_EXTENSION = '.xml';
UNASSIGNED_ROW_COL_INDEX = $FFFFFFFF;
ZERO_WIDTH_FACTOR = 351/640;

Variables

CSVParams: TsCSVParams = ( SheetIndex: 0; LineEnding: leSystem; Delimiter: ';'; QuoteChar: '"'; QuoteOuterWhiteSpace: true; IgnoreOuterWhiteSpace: false; Encoding: ''; DetectContentType: true; NumberFormat: ''; AutoDetectNumberFormat: true; TrueText: 'TRUE'; FalseText: 'FALSE'; );

Description

Functions and Procedures

procedure InitUTF8FormatSettings(out AFormatSettings: TFormatSettings);

Creates a localized FPC format settings record in which all strings are encoded as UTF8.

Types

PCell = ˆTCell;

Pointer to a TCell record

PCol = ˆTCol;

Pointer to a TCol record

PRow = ˆTRow;

Pointer to a TRow record

PsCellFormat = ˆTsCellFormat;

Pointer to a TsCellFormat record

PsCellRange = ˆTsCellRange;

Pointer to a TsCellRange record

PsComment = ˆTsComment;

Pointer to a TsComment record

PsHyperlink = ˆTsHyperlink;

Pointer to a TsHyperlink record

PsImage = ˆTsImage;

Pointer to a TsImage record

TBasicOperationTokens = fekAdd..fekParen;

These tokens identify basic operations in RPN formulas.

TCellContentType = (...);

Describes the type of content in a cell of a TsWorksheet

See also
TsErrorValue
Values
  • cctEmpty: The cell is empty, however, can carry a format.
  • cctFormula: The cell contains a formula which has not yet been calculated
  • cctNumber: The cell contains a number (integer or float)
  • cctUTF8String: The cell contains a string which is considered to be UTF8-encoded.
  • cctDateTime: The cell contains a date/time value.
  • cctBool: The cell contains a boolean value
  • cctError: The cell contains an error value
TFEKind = (...);

Tokens to identify the elements in an expanded RPN formula.

Note
When adding or rearranging items

  • make sure that the subtypes TOperandTokens and TBasicOperationTokens are complete

  • make sure to keep the table "TokenIDs" in unit xlscommon in sync

Values
  • fekCell
  • fekCellRef
  • fekCellRange
  • fekCellOffset
  • fekCell3d
  • fekCellRef3d
  • fekCellRange3d
  • fekNum
  • fekInteger
  • fekString
  • fekBool
  • fekErr
  • fekMissingArg
  • fekAdd
  • fekSub
  • fekMul
  • fekDiv
  • fekPercent
  • fekPower
  • fekUMinus
  • fekUPlus
  • fekConcat
  • fekEqual
  • fekGreater
  • fekGreaterEqual
  • fekLess
  • fekLessEqual
  • fekNotEqual
  • fekList
  • fekParen
  • fekFunc
TOperandTokens = fekCell..fekMissingArg;

These tokens identify operands in RPN formulas.

TsBiDiMode = (...);

Switch a cell from left-to-right to right-to-left orientation

Values
  • bdDefault
  • bdLTR
  • bdRTL
TsCalcState = (...);

Cell calculation state

being calculated. result is stored in the cell's data fields.

Values
  • csNotCalculated: The cell formula has not yet been calculated.
  • csCalculating: The flag indicates that the cell is currently
  • csCalculated: The cell formula has been calculated, and the
TsCallback = procedure (data, arg: Pointer) of object;

Callback function, e.g. for iterating the internal AVL trees of the workbook/sheet

TsCellBorder = (...);

Indicates the border for a cell. If included in the CellBorders set the corresponding border is drawn in the style defined by the CellBorderStyle.

See also
TsCellBorderStyle
Values
  • cbNorth: Horizontal border line at the top of the cell
  • cbWest: Vertical border line at the left of the cell
  • cbEast: Vertical border line at the right of the cell
  • cbSouth: Horizontal border line at the bottom of the cell
  • cbDiagUp: Diagonal border line running from the bottom-left to the top-right corner of the cell (/)
  • cbDiagDown: Diagonal border line running from the top-left to the bottom-right corner of the cell (\)
TsCellBorders = set of TsCellBorder;

Indicates the border for a cell

TsCellBorderStyles = array[TsCellBorder] of TsCellBorderStyle;

The cell border styles of each cell border are collected in this array.

TsCellFlag = (...);

Cell flag providing particular information about the state of a cell

Values
  • cfHasComment: The cell has a comment record
  • cfHyperlink: The cell has a hyperlink record
  • cfMerged: The cell belongs to a block of merged cells
  • cfHasFormula: The cell has a formula.
  • cf3dFormula: The cell formula links to other worksheets.
TsCellFlags = set of TsCellFlag;

Set of cell flags

TsCellProtection = (...);

Cell protection options

Values
  • cpLockCell
  • cpHideFormulas
TsCellProtections = set of TsCellProtection;

This item has no description.

TsCellRange3dArray = array of TsCellRange3d;

Array of 3d cell ranges

TsCellRangeArray = array of TsCellRange;

Array with cell ranges

TsColor = DWord;

Colors in fpspreadsheet are given as rgb values in little-endian notation (i.e. "r" is the low-value byte). The highest-value byte, if not zero, indicates special colors.

Note
This byte order in TsColor is opposite to that in HTML colors.

TsColRowOption = (...);

Column or row options

Values
  • croHidden: Column or row is hidden
  • croPageBreak: Enforces a pagebreak before this column/row during printing
TsColRowOptions = set of TsColRowOption;

This item has no description.

TsColWidthtype = (...);

Types of column widths

Values
  • cwtDefault: Default column width
  • cwtCustom: Userdefined column width (dragging the column header border in the grid, or by changed by code)
TsCompareOperation = (...);

Identifier for a compare operation

Values
  • coNotUsed
  • coEqual
  • coNotEqual
  • coLess
  • coGreater
  • coLessEqual
  • coGreaterEqual
TsCopyOperation = (...);

Identifier for a copy operation

Values
  • coNone
  • coCopyFormat
  • coCopyValue
  • coCopyFormula
  • coCopyCell
TsCryptoAlgorithm = (...);

Algorithm used for encryption/decryption

Values
  • caUnknown
  • caExcel
  • caMD2
  • caMD4
  • caMD5
  • caRIPEMD128
  • caRIPEMD160
  • caSHA1
  • caSHA256
  • caSHA384
  • caSHA512
  • caWHIRLPOOL
TsCSVLineEnding = (...);

Line ending used in CSV files

Values
  • leSystem
  • leCRLF
  • leCR
  • leLF
TsErrorValue = (...);

Error code values

Values
  • errOK: ok, no error
  • errEmptyIntersection: A space was used in formulas that reference multiple ranges; a comma separates range references (#NULL!)
  • errDivideByZero: Trying to divide by zero (#DIV/0!)
  • errWrongType: The wrong type of operand or function argument is used (#VALUE!)
  • errIllegalRef: A reference is invalid (#REF!)
  • errWrongName: Text in the formula is not recognized (#NAME?)
  • errOverflow: A formula has invalid numeric data for the type of operation (#NUM!)
  • errArgError: A formula or a function inside a formula cannot find the referenced data (#N/A)
  • errFormulaNotSupported: This formula is not suppored by fpSpreadsheet (error code not used by Excel and Calc)
TsFillStyle = (...);

Style of fill pattern for cell backgrounds

Values
  • fsNoFill
  • fsSolidFill
  • fsGray75
  • fsGray50
  • fsGray25
  • fsGray12
  • fsGray6
  • fsStripeHor
  • fsStripeVert
  • fsStripeDiagUp
  • fsStripeDiagDown
  • fsThinStripeHor
  • fsThinStripeVert
  • fsThinStripeDiagUp
  • fsThinStripeDiagDown
  • fsHatchDiag
  • fsThinHatchDiag
  • fsThickHatchDiag
  • fsThinHatchHor
TsFontArray = array of TsFont;

Array of font records

TsFontPosition = (...);

Font position (subscript or superscript)

Values
  • fpNormal: Normals character position
  • fpSuperscript: Superscripted characters, like in '10²'
  • fpSubscript: Subscripted characters
TsFontStyle = (...);

Font style (redefined to avoid usage of graphics unit)

Values
  • fssBold: Bold text
  • fssItalic: Italic text
  • fssStrikeOut: Strike-through text (there is only a single strike-out line)
  • fssUnderline: Underlined text (there is only a single underline)
TsFontStyles = set of TsFontStyle;

Set of font styles

TsFormulaDialect = (...);

Formula dialect

Values
  • fdExcelA1: Default A1 syntax of Excel cell references: Cells are identified by column letters ('A', 'B', ...) and 1-based row numbers ('1', '2')
  • fdExcelR1C1: R1C1 syntax of excel
  • fdOpenDocument: Syntax of OpenOffice/LibreOffice Calc.
  • fdLocalized: The formula uses localized format settings in A1 syntax.
TsFormulaFlag = (...);

Flag indicating the calculation state of a formula.

Values
  • ffCalculating: The formula is currently being calculated.
  • ffCalculated: The calculation of the formula is completed.
TsFormulaFlags = set of TsFormulaFlag;

Set of formula calculation state flags, TsFormulaFlag

TsHeaderFooterImages = array[TsHeaderFooterSectionIndex] of TsHeaderFooterImage;

Array with all possible images in a header or a footer

TsHeaderFooterSectionIndex = (...);

Headers and footers are divided into three parts: left, center and right

Values
  • hfsLeft
  • hfsCenter
  • hfsRight
TsHorAlignment = (...);

Indicates horizontal text alignment in cells

Values
  • haDefault: Default text alignment (left for alphanumeric, right for numbers and dates)
  • haLeft: Left-aligned cell text
  • haCenter: Centered cell text
  • haRight: Right-aligned cell text
  • haJustified: Adjusts spaces to fill entire cell width, except for last line
  • haDistributed: like haJustified, but also applied to last line
  • haFilled: text is repeated over width of cell.
TsLineStyle = (...);

Line style (for cell borders)

Values
  • lsThin: Thin solid line
  • lsMedium: Medium thick solid line
  • lsDashed: Dashed line, thin
  • lsDotted: Dotted line, thin
  • lsThick: Very thick solid line
  • lsDouble: Double line (solid)
  • lsHair: Very thin line
  • lsMediumDash: Dashed line, medium thickness
  • lsDashDot: Dash-dot line, thin
  • lsMediumDashDot: Dash-dot line, medium thickness
  • lsDashDotDot: Dash-dot-dot line, thin
  • lsMediumDashDotDot: Dash-dot-dot line, medium thickness
  • lsSlantDashDot: Dash-dot line, slanted segment ends
TsNumberFormat = (...);

Builtin number formats. Only uses a subset of the default formats, enough to be able to read/write date/time values. nfCustom allows to apply a format string directly.

Values
  • nfGeneral
  • nfFixed
  • nfFixedTh
  • nfExp
  • nfPercentage
  • nfFraction
  • nfCurrency
  • nfCurrencyRed
  • nfShortDateTime
  • nfShortDate
  • nfLongDate
  • nfShortTime
  • nfLongTime
  • nfShortTimeAM
  • nfLongTimeAM
  • nfDayMonth
  • nfMonthYear
  • nfTimeInterval
  • nfText
  • nfCustom
TsOnQueryPassword = function: String of object;

This item has no description.

TsPageOrientation = (...);

Page orientation for printing

Values
  • spoPortrait: Printed page is in portrait orientation
  • spoLandscape: Printed page is in landscape orientation
TsPrintOption = (...);

Options for the print layout records

Values
  • poPrintGridLines
  • poPrintHeaders
  • poPrintPagesByRows
  • poMonochrome
  • poDraftQuality
  • poPrintCellComments
  • poDefaultOrientation
  • poUseStartPageNumber
  • poCommentsAtEnd
  • poHorCentered
  • poVertCentered
  • poDifferentOddEven
  • poDifferentFirst
  • poFitPages
TsPrintOptions = set of TsPrintOption;

Set of options used by the page layout

TsReadWriteFlag = (...);

Flag set during reading or writing of a workbook

Values
  • rwfNormal: The workbook is in normal read/write state, i.e. it is currently neither being read nor being written.
  • rwfRead: The workbook is currently being read.
  • rwfWrite: The workbook is currently being written.
TsRelFlag = (...);

Flags to mark the address or a cell or a range of cells to be absolute or relative. They are used in the set TsRelFlags.

Values
  • rfRelRow: Signals that the row reference is relative
  • rfRelCol: Signals that the column reference is relative
  • rfRelRow2: Signals that the reference to the last row of a cell block is relative
  • rfRelCol2: Signals that the reference to the last column of a cell block is relative
TsRelFlags = set of TsRelFlag;

Flags to mark the address of a cell or a range of cells to be absolute or relative. It is a set consisting of TsRelFlag elements.

TsReplaceOption = (...);

Replace option

Values
  • roReplaceEntirecell
  • roReplaceAll
  • roConfirm
TsReplaceOptions = set of TsReplaceOption;

A set of replace options

TsRichTextParams = array of TsRichTextParam;

Parameters describing formatting of text ranges in cell text

TsRowHeightType = (...);

Types of row heights

Values
  • rhtDefault: Default row height
  • rhtCustom: User-determined row height (dragging the row header borders in the grid, or changed by code)
  • rhtAuto: Automatically determined row height, depends on font size, text rotation, rich-text parameters, word-wrap
TsRPNFormula = array of TsFormulaElement;

RPN formula. Similar to the expanded formula, but in RPN notation. Simplifies the task of format writers which need RPN

TsSearchOption = (...);

Search option

Values
  • soCompareEntireCell
  • soMatchCase
  • soRegularExpr
  • soAlongRows
  • soBackward
  • soWrapDocument
  • soEntireDocument
  • soSearchInComment
TsSearchOptions = set of TsSearchOption;

A set of search options

TsSearchWithin = (...);

Defines which part of document is scanned

Values
  • swWorkbook
  • swWorksheet
  • swColumn
  • swRow
  • swColumns
  • swRows
TsSheetOption = (...);

Worksheet user interface options:

Values
  • soShowGridLines: Show or hide the grid lines in the spreadsheet
  • soShowHeaders: Show or hide the column or row headers of the spreadsheet
  • soHasFrozenPanes: If set a number of rows and columns of the spreadsheet is fixed and does not scroll. The number is defined by LeftPaneWidth and TopPaneHeight.
  • soHidden: Worksheet is hidden.
  • soProtected: Worksheet is protected
  • soPanesProtection: Panes are locked due to workbook protection
  • soAutoDetectCellType: Auomatically detect type of cell content
TsSheetOptions = set of TsSheetOption;

Set of user interface options (

See also
TsSheetOption
TsSizeUnits = (...);

Units for size dimensions

Adjustment of the fpsutils.ScreenPixelsPerInch is required for accurate values in case of high-resolution monitors.

Values
  • suChars: Horizontal size is given as the count of '0' characters in the default font (not very exact)
  • suLines: Vertical size is given as the count of lines measured by the height of the default font (not very exact)
  • suMillimeters: Size is given in millimeters
  • suCentimeters: Size is given in centimeters
  • suPoints: Size is given in points
  • suInches: Size is given in inches
TsSortKeys = array of TsSortKey;

Array of sort keys for multiple sorting criteria

TsSortOption = (...);

Options for sorting numeric characters

Values
  • ssoDescending: Sort values in descending order
  • ssoCaseInsensitive: Ignore character case for sorting
  • ssoAlphaBeforeNum: Sort alphanumeric characters to be before
TsSortOptions = set of TsSortOption;

Set of options for sorting

TsSortPriority = (...);

Sort priority i.e. will be put before text i.e. will be sorted after text.

Values
  • spNumAlpha: Numbers are considered to be "smaller" than Alpha-Text,
  • spAlphaNum: Numbers are considered to be "larger" than Alpha-Text,
TsSpreadFormatID = integer;

Numerical identifier for file formats, built-in and user-provided

TsSpreadFormatIDArray = array of TsSpreadFormatID;

Array of file format identifiers

TsSpreadsheetFormat = (...);

Built-in file formats of fpspreadsheet

Values
  • sfExcel2: File format of Excel 2.1
  • sfExcel5: File format of Excel 5
  • sfExcel8: File format of Excel 97
  • sfExcelXML: XML file format of Excel 2003
  • sfOOXML: Default file format of Excel 2007 and later
  • sfOpenDocument: File format of LibreOffice/OpenOffice Calc
  • sfCSV: Comma-separated text file
  • sfHTML: HTML file format
  • sfWikiTable_Pipes: Wiki table file format
  • sfWikiTable_WikiMedia: Wiki media file format
  • sfUser: User-defined file format. The user must provide the reader and writer classes.
TsStreamParam = (...);

Parameters for stream access

Values
  • spClipboard
  • spWindowsClipboardHTML
TsStreamParams = set of TsStreamParam;

This item has no description.

TsTextRotation = (...);

Text rotation formatting. The text is rotated relative to the standard orientation, which is from left to right horizontal:

       >
       ABC

So 90 degrees clockwise means that the text will be:

|  A
|  B
v  C

And 90 degree counter clockwise will be:

ˆ  C
|  B
|  A

Due to limitations of the text mode the characters are not rotated here. There is, however, also a "stacked" variant which looks exactly like the 90-degrees-clockwise case.

Values
  • trHorizontal: Text is written horizontally as usual.
  • rt90DegreeClockwiseRotation: Text is written vertically from top to bottom
  • rt90DegreeCounterClockwiseRotation: Text is written vertically from bottom to top
  • rtStacked: Text is written vertically from top to bottom, but with horizontal chararacters.
TsUsedFormattingField = (...);

List of possible formatting fields

Values
  • uffTextRotation: The cell format supports text rotation.
  • uffFont: The cell format supports using font different from default.
  • uffBorder: The cell format supports decorating the cell with a border.
  • uffBackground: The cell format supports a dedicated background color and fill style.
  • uffNumberFormat: The cell format supports individual number formats of numeric cell values.
  • uffWordWrap: The cell format supports wrapping of long cell text into new lines.
  • uffHorAlign: The cell format supports horizontal text alignment.
  • uffVertAlign: The cell format supports vertical text alignment
  • uffBiDi: The cell format supports right-to-left text display.
  • uffProtection: The cell format supports locking of cells.
  • uffDoNotPrint: The cell is not printed.
TsUsedFormattingFields = set of TsUsedFormattingField;

Describes which formatting fields are active (see TsUsedFormattingField).

TsVertAlignment = (...);

Indicates vertical text alignment in cells

Values
  • vaDefault: Default vertical alignment (bottom)
  • vaTop: Top-aligned cell text
  • vaCenter: Vertically centered cell text
  • vaBottom: Bottom-aligned cell text
TsWorkbookOption = (...);

Option flags for the workbook

Values
  • boVirtualMode: If in virtual mode date are not taken from cells when a spreadsheet is written to file, but are provided by means of the event OnWriteCellData. Similarly, when data are read they are not added as cells but passed the the event OnReadCellData;
  • boBufStream: When this option is set a buffered stream is used for writing (a memory stream swapping to disk) or reading (a file stream pre-reading chunks of data to memory)
  • boFileStream: Uses file streams and temporary files during reading and writing. Lowest memory consumptions, but slow.
  • boAutoCalc: Automatically recalculate formulas whenever a cell value changes, in particular when file is loaded.
  • boCalcBeforeSaving: Calculates formulas before saving the file. Otherwise there are no results when the file is loaded back by fpspreadsheet.
  • boReadFormulas: Allows to turn off reading of rpn formulas; this is a precaution since formulas not correctly implemented by fpspreadsheet could crash the reading operation.
  • boWriteZoomFactor: Instructs the writer to write the current zoom factors of the worksheets to file.
  • boAbortReadOnFormulaError: Aborts reading if a formula error is encountered
  • boIgnoreFormulas: Formulas are not checked and not calculated. Cannot be used for biff formats.
TsWorkbookOptions = set of TsWorkbookOption;

Set of option flags for the workbook (see TsWorkbookOption

TsWorkbookProtection = (...);

Workbook protection options

Values
  • bpLockRevision
  • bpLockStructure
  • bpLockWindows
TsWorkbookProtections = set of TsWorkbookProtection;

This item has no description.

TsWorksheetProtection = (...);

Worksheet protection options. All used items are locked.

Values
  • spFormatCells
  • spFormatColumns
  • spFormatRows
  • spDeleteColumns
  • spDeleteRows
  • spInsertColumns
  • spInsertRows
  • spInsertHyperlinks
  • spCells
  • spSort
  • spObjects
  • spSelectLockedCells
  • spSelectUnlockedCells
TsWorksheetProtections = set of TsWorksheetProtection;

This item has no description.

Constants

ALL_BORDERS: TsCellBorders = [cbNorth, cbEast, cbSouth, cbWest];

Default border style in which all borders are used.

ALL_SHEET_PROTECTIONS = [spFormatCells, spFormatColumns, spFormatRows, spDeleteColumns, spDeleteRows, spInsertColumns, spInsertRows, spInsertHyperlinks, spCells, spSort, spObjects, spSelectLockedCells, spSelectUnlockedCells ];

This item has no description.

BOLD_FONTINDEX = 2;

Index of bold default font in workbook's font list

ColWidthTypeNames: array[TsColWidthType] of string = ( 'Default', 'Custom');

This item has no description.

DEFAULT_BORDERSTYLES: TsCellBorderStyles = ( (LineStyle: lsThin; Color: scBlack), (LineStyle: lsThin; Color: scBlack), (LineStyle: lsThin; Color: scBlack), (LineStyle: lsThin; Color: scBlack), (LineStyle: lsThin; Color: scBlack), (LineStyle: lsThin; Color: scBlack) );

Border styles for each cell border used by default: a thin, black, solid line

DEFAULT_CELL_PROTECTION = [cpLockCell];

This item has no description.

DEFAULT_FONTINDEX = 0;

Index of the default font in workbook's font list

DEFAULT_FONTNAME = 'Arial';

Name of the default font

DEFAULT_FONTSIZE = 10;

Size of the default font

DEFAULT_SHEET_PROTECTION = ALL_SHEET_PROTECTIONS - [spSelectLockedCells, spSelectUnlockedcells];

This item has no description.

EMPTY_FILL: TsFillPattern = ( Style: fsNoFill; FgColor: scTransparent; BgColor: scTransparent; );

Parameters for a non-filled cell background

FPS_LINE_ENDING = #10;

Line ending character in cell texts with fixed line break. Using a unique value simplifies many things...

FPS_REPLACEMENT_CHAR = '?';

Replacement character used in broken UTF8 strings. Alternate replacement chars could be: #$E2#$8E#$95 = box, or #$EF#$BF#$BD = "unicode replacement character"

HEADER_FOOTER_INDEX_ALL = 1;

Index of the header/footer to be used for all pages

HEADER_FOOTER_INDEX_EVEN = 2;

Index of the header/footer to be used for even page numbers

HEADER_FOOTER_INDEX_FIRST = 0;

Index of the first header/footer to be used

HEADER_FOOTER_INDEX_ODD = 1;

Index of the header/footer to be used for odd page numbers

HYPERLINK_FONTINDEX = 1;

Index of the hyperlink font in workbook's font list

ITALIC_FONTINDEX = 3;

Index of italic default font in workbook's font list - not used directly

MAX_COL_COUNT = 65535;

Maximum count of worksheet columns

ncfBCSVB = 14;

This item has no description.

ncfBCVB = 0;

This item has no description.

ncfBVCB = 4;

This item has no description.

ncfBVSCB = 15;

This item has no description.

ncfCMV = 2;

This item has no description.

ncfCSMV = 12;

This item has no description.

ncfCSVM = 11;

This item has no description.

ncfCVM = 3;

This item has no description.

ncfDefault = -1;

This item has no description.

ncfMCSV = 9;

This item has no description.

ncfMCV = 1;

This item has no description.

ncfMVC = 5;

This item has no description.

ncfMVSC = 8;

This item has no description.

ncfVCM = 7;

This item has no description.

ncfVMC = 6;

This item has no description.

ncfVMSC = 13;

This item has no description.

ncfVSCM = 10;

This item has no description.

NO_CELL_BORDER: TsCellBorderStyle = (LineStyle: lsThin; Color: scNotDefined);

Border style to be used for "no border"

pcfCSV = 2;

This item has no description.

pcfCV = 0;

This item has no description.

pcfDefault = -1;

Codes for curreny format according to FormatSettings.CurrencyFormat: "C" = currency symbol, "V" = currency value, "S" = space character For the negative value formats, we use also: "B" = bracket, "M" = Minus

The order of these characters represents the order of these items.

Example: 1000 dollars –> "$1000" for pCV, or "1000 $" for pVsC 1000 dollars –> "($1000)" for nbCVb, or "-$ 1000" for nMCSV

Assignment taken from "sysstr.inc"

pcfVC = 1;

This item has no description.

pcfVSC = 3;

This item has no description.

rfAllRel = [rfRelRow, rfRelCol, rfRelRow2, rfRelCol2];

Abbreviation of all-relative cell reference flags ()

See also
TsRelFlag
RowHeightTypeNames: array[TsRowHeightType] of string = ( 'Default', 'Custom', 'Auto');

This item has no description.

ROW_HEIGHT_CORRECTION = 0.3;

Takes account of effect of cell margins on row height by adding this value to the nominal row height. Note that this is an empirical value and may be wrong.

scAqua = scCyan deprecated;

Warning: this symbol is deprecated.

This item has no description.

scBeige = $00DCF5F5 deprecated;

Warning: this symbol is deprecated.

This item has no description.

scBlack = $00000000;

rgb value of black color, BIFF2 palette index 0, BIFF8 index 8

scBlue = $00FF0000;

rgb value of blue color, BIFF2 palette index 4, BIFF8 indexes 12 and 39

scBlueGray = $00996666 deprecated;

Warning: this symbol is deprecated.

This item has no description.

scBlueGrey = scBlueGray deprecated;

Warning: this symbol is deprecated.

This item has no description.

scBrown = $00003399 deprecated;

Warning: this symbol is deprecated.

This item has no description.

scCoral = $008080FF deprecated;

Warning: this symbol is deprecated.

This item has no description.

scCyan = $00FFFF00;

rgb value of cyan color, BIFF2 palette index 7, BIFF8 indexes 15

scDarkBlue = $00800000;

rgb value of dark blue color

scDarkBrown = $002D52A0 deprecated;

Warning: this symbol is deprecated.

This item has no description.

scDarkGreen = $00008000;

rgb value of dark green color, BIFF8 index 17

scDarkPurple = $00660066 deprecated;

Warning: this symbol is deprecated.

This item has no description.

scDarkRed = $00000080;

rgb value of dark red color, BIFF8 indexes 16 and 35

scDarkTeal = $00663300 deprecated;

Warning: this symbol is deprecated.

This item has no description.

scFuchsia = scMagenta deprecated;

Warning: this symbol is deprecated.

This item has no description.

scGold = $0000CCFF deprecated;

Warning: this symbol is deprecated.

This item has no description.

scGray = $00808080;

rgb value of grey color

scGray10pct = $00E6E6E6 deprecated;

Warning: this symbol is deprecated.

This item has no description.

scGray20pct = $00CCCCCC deprecated;

Warning: this symbol is deprecated.

This item has no description.

scGray25pct = scSilver deprecated;

Warning: this symbol is deprecated.

This item has no description.

scGray40pct = $00969696 deprecated;

Warning: this symbol is deprecated.

This item has no description.

scGray50pct = scGray deprecated;

Warning: this symbol is deprecated.

This item has no description.

scGray80pct = $00333333 deprecated;

Warning: this symbol is deprecated.

This item has no description.

scGreen = $0000FF00;

rgb value of green color, BIFF2 palette index 3, BIFF8 index 11

scGrey = scGray;

rgb value of gray color

scGrey10pct = scGray10pct deprecated;

Warning: this symbol is deprecated.

This item has no description.

scGrey20pct = scGray20pct deprecated;

Warning: this symbol is deprecated.

This item has no description.

scIceBlue = $00FFCCCC deprecated;

Warning: this symbol is deprecated.

This item has no description.

scIndigo = $00993333 deprecated;

Warning: this symbol is deprecated.

This item has no description.

scIvory = $00CCFFFF deprecated;

Warning: this symbol is deprecated.

This item has no description.

scLavander = $00FF99CC deprecated;

Warning: this symbol is deprecated.

This item has no description.

scLightBlue = $00FF6633 deprecated;

Warning: this symbol is deprecated.

This item has no description.

scLightGreen = $00CCFFCC deprecated;

Warning: this symbol is deprecated.

This item has no description.

scLightOrange = $000099FF deprecated;

Warning: this symbol is deprecated.

This item has no description.

scLightTurquoise = $00FFFFCC deprecated;

Warning: this symbol is deprecated.

This item has no description.

scLightYellow = $0099FFFF deprecated;

Warning: this symbol is deprecated.

This item has no description.

scLime = scGreen deprecated;

Warning: this symbol is deprecated.

This item has no description.

scMagenta = $00FF00FF;

rgb value of magenta color, BIFF2 palette index 6, BIFF8 index 14 and 33

scMaroon = scDarkRed deprecated;

Warning: this symbol is deprecated.

This item has no description.

scNavy = scDarkBlue deprecated;

Warning: this symbol is deprecated.

This item has no description.

scNotDefined = $40000000;

Identifier for not-defined color

scOceanBlue = $00CC6600 deprecated;

Warning: this symbol is deprecated.

This item has no description.

scOlive = $00008080;

rgb value of olive color

scOliveGreen = $00003333 deprecated;

Warning: this symbol is deprecated.

This item has no description.

scOrange = $000066FF deprecated;

Warning: this symbol is deprecated.

This item has no description.

scPaleBlue = $00FFCC99 deprecated;

Warning: this symbol is deprecated.

This item has no description.

scPaletteIndexMask = $80000000;

Identifier for palette index encoded into the TsColor

scPeriwinkle = $00FF9999 deprecated;

Warning: this symbol is deprecated.

This item has no description.

scPink = $00FE00FE deprecated;

Warning: this symbol is deprecated.

This item has no description.

scPlum = $00663399 deprecated;

Warning: this symbol is deprecated.

This item has no description.

scPurple = $00800080;

rgb value of purple color, BIFF8 palette indexes 20 and 36

scRed = $000000FF;

rgb value of red color, BIFF2 palette index 2, BIFF8 index 10

scRGBMask = $00FFFFFF;

Mask for the rgb components contained in the TsColor

scRose = $00CC99FF deprecated;

Warning: this symbol is deprecated.

This item has no description.

scSeaGreen = $00669933 deprecated;

Warning: this symbol is deprecated.

This item has no description.

scSilver = $00C0C0C0;

rgb value of silver color

scSkyBlue = $00FFCC00 deprecated;

Warning: this symbol is deprecated.

This item has no description.

scTan = $0099CCFF deprecated;

Warning: this symbol is deprecated.

This item has no description.

scTeal = $00808000;

rgb value of teal color, BIFF8 palette index 21 and 38

scTransparent = $20000000;

Identifier for transparent color

scTurquoise = scCyan deprecated;

Warning: this symbol is deprecated.

This item has no description.

scVeryDarkGreen = $00003300 deprecated;

Warning: this symbol is deprecated.

This item has no description.

scWheat = $00B3DEF5 deprecated;

Warning: this symbol is deprecated.

This item has no description.

scWhite = $00FFFFFF;

rgb value of white color, BIFF2 palette index 1, BIFF8 index 9

scYellow = $0000FFFF;

rgb value of yellow color, BIFF2 palette index 5, BIFF8 indexes 13 and 34

sfidUnknown = -1;

Format identifier of an undefined, unknown, etc. file format.

Each unit implementing a reader/writer will define an sfidXXXX value as a numerical identifer of the file format. In case of the built-in formats, the identifier is equal to the ord of the TsSpreadsheetFormat value.

SHEETSEPARATOR = '!';

Separator between worksheet name and cell (range) reference in an address

SizeUnitNames: array[TsSizeUnits] of string = ( 'chars', 'lines', 'mm', 'cm', 'pt', 'in');

Names of the size units

STR_COMMA_SEPARATED_EXTENSION = '.csv';

Default extension of comma-separated-values file

STR_ERR_ARG_ERROR = '#N/A';

This item has no description.

STR_ERR_DIVIDE_BY_ZERO = '#DIV/0!';

This item has no description.

STR_ERR_EMPTY_INTERSECTION = '#NULL!';

Error values

STR_ERR_FORMULA_NOT_SUPPORTED= '<FMLA?>';

This item has no description.

STR_ERR_ILLEGAL_REF = '#REF!';

This item has no description.

STR_ERR_OVERFLOW = '#NUM!';

This item has no description.

STR_ERR_UNKNOWN = '#UNKNOWN!';

This item has no description.

STR_ERR_WRONG_NAME = '#NAME?';

This item has no description.

STR_ERR_WRONG_TYPE = '#VALUE!';

This item has no description.

STR_EXCEL_EXTENSION = '.xls';

Default binary Excel file extension (<= Excel 97)

STR_FALSE = 'FALSE';

String for boolean value False

STR_FILEFORMAT_CSV = 'CSV';

Explanatory name of sfCSV file format

STR_FILEFORMAT_EXCEL_2 = 'Excel 2.1';

Explanatory name of sfBiff2 file format

STR_FILEFORMAT_EXCEL_5 = 'Excel 5';

Explanatory name of sfBiff5 file format

STR_FILEFORMAT_EXCEL_8 = 'Excel 97-2003';

Explanatory name of sfBiff8 file format

STR_FILEFORMAT_EXCEL_XLSX = 'Excel 2007+ XML';

Explanatory name of sfOOXLM file format

STR_FILEFORMAT_EXCEL_XML = 'Excel XP/2003 XML';

Explanatory name of sfExcelXML file format

STR_FILEFORMAT_HTML = 'HTML';

Explanatory name of sfHTML file format

STR_FILEFORMAT_OPENDOCUMENT = 'OpenDocument';

Explanatory name of sfOpenDocument file format

STR_FILEFORMAT_WIKITABLE_PIPES = 'WikiTable (Pipes)';

Explanatory name of sfWikiTablePipes file format

STR_FILEFORMAT_WIKITABLE_WIKIMEDIA = 'WikiTable (WikiMedia)';

Explanatory name of sfWikiTableWikiMedia file format

STR_HTML_EXTENSION = '.html';

Default extension for HTML files

STR_OOXML_EXCEL_EXTENSION = '.xlsx';

Default xml Excel file extension (>= Excel 2007)

STR_OPENDOCUMENT_CALC_EXTENSION = '.ods';

Default OpenDocument spreadsheet file extension

STR_TRUE = 'TRUE';

String for boolean value True

STR_WIKITABLE_PIPES_EXTENSION = '.wikitable_pipes';

Default extension of wikitable files in pipes format

STR_WIKITABLE_WIKIMEDIA_EXTENSION = '.wikitable_wikimedia';

Default extension of wikitable files in wikimedia format

STR_XML_EXCEL_EXTENSION = '.xml';

Default xml Excel file extension (Excel XP, 2003)

UNASSIGNED_ROW_COL_INDEX = $FFFFFFFF;

Unassigned row/col index

ZERO_WIDTH_FACTOR = 351/640;

Ratio of the width of the "0" character to the font size. Empirical value to match Excel and LibreOffice column withs. Needed because Excel defines colum width in terms of count of the "0" character.

Variables

CSVParams: TsCSVParams = ( SheetIndex: 0; LineEnding: leSystem; Delimiter: ';'; QuoteChar: '"'; QuoteOuterWhiteSpace: true; IgnoreOuterWhiteSpace: false; Encoding: ''; DetectContentType: true; NumberFormat: ''; AutoDetectNumberFormat: true; TrueText: 'TRUE'; FalseText: 'FALSE'; );

This item has no description.


fpsTypes: Record TsSpreadsheetFormatLimitations

Record TsSpreadsheetFormatLimitations

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsSpreadsheetFormatLimitations = record

Description

This record collect limitations of a particular file format.

Overview

Fields

Public | MaxRowCount: Cardinal;
Public | MaxColCount: Cardinal;
Public | MaxPaletteSize: Integer;
Public | MaxSheetNameLength: Integer;
Public | MaxCharsInTextCell: Integer;

Description

Fields

Public MaxRowCount: Cardinal;

Gives the maximum number of rows supported by this file format.

Public MaxColCount: Cardinal;

Gives the maximum number of columns supported by this file format.

Public MaxPaletteSize: Integer;

Gives the maximum count of color palette entries supported by this file format

Public MaxSheetNameLength: Integer;

Defines the maximum length of the worksheet name supported by this file format.

Public MaxCharsInTextCell: Integer;

Defines the maximum length of the text in a cell supported by this file format.


fpsTypes: Record TsCSVParams

Record TsCSVParams

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsCSVParams = record

Description

Parameters controlling reading from and writing to CSV files

Overview

Fields

Public | SheetIndex: Integer;
Public | LineEnding: TsCSVLineEnding;
Public | Delimiter: Char;
Public | QuoteChar: Char;
Public | QuoteOuterWhiteSpace: Boolean;
Public | IgnoreOuterWhiteSpace: Boolean;
Public | Encoding: String;
Public | DetectContentType: Boolean;
Public | NumberFormat: String;
Public | AutoDetectNumberFormat: Boolean;
Public | TrueText: String;
Public | FalseText: String;
Public | FormatSettings: TFormatSettings;

Description

Fields

Public SheetIndex: Integer;

Index of the sheet to be written (write-only)

Public LineEnding: TsCSVLineEnding;

Specification for the line endings to be written (write-only)

Public Delimiter: Char;

Column delimiter (read/write)

Public QuoteChar: Char;

Character used for quoting text in special cases (read/write)

Public QuoteOuterWhiteSpace: Boolean;

Determines whether cell content beginning/ending with white space will be quoted (write-only)

Public IgnoreOuterWhiteSpace: Boolean;

Ignores white space before/after cell content (read-only)

Public Encoding: String;

String identifying the endoding of the file, such as 'utf8', 'cp1252' etc (read/write)

Public DetectContentType: Boolean;

Try to convert strings to their content type (read-only)

Public NumberFormat: String;

If empty numbers are written like in worksheet, otherwise this format string is applied (write-only)

Public AutoDetectNumberFormat: Boolean;

Try to detect the decimal and thousand separator used in numbers (read-only)

Public TrueText: String;

String for boolean True (read/write)

Public FalseText: String;

String for boolean False (read/write)

Public FormatSettings: TFormatSettings;

Additional parameter for string conversion (read/write)


fpsTypes: Record TsFormulaElement

Record TsFormulaElement

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsFormulaElement = record

Description

Elements of an expanded RPN formula.

Note
If ElementKind is fekCellOffset, "Row" and "Col" have to be cast to signed integers!

Overview

Fields

Public | ElementKind: TFEKind;
Public | Row: Cardinal;
Public | Row2: Cardinal;
Public | Col: Cardinal;
Public | Col2: Cardinal;
Public | Sheet: Integer;
Public | Sheet2: Integer;
Public | SheetNames: String;
Public | DoubleValue: double;
Public | IntValue: Int64;
Public | StringValue: String;
Public | RelFlags: TsRelFlags;
Public | FuncName: String;
Public | ParamsNum: Byte;

Description

Fields

Public ElementKind: TFEKind;

Identifies the type of the formula element,

See also
TFEKind
Public Row: Cardinal;

Row index of the cell to which this formula refers (zero-based)

Public Row2: Cardinal;

Row index of the last cell in the cell range to which this formula refers (zero-based)

Public Col: Cardinal;

Column index of the cell to which this formula refers (zero-based)

Public Col2: Cardinal;

Column index of the last cell in the cell range to which this formula refers (zero-based)

Public Sheet: Integer;

Index of the worksheet to which this formula refers (zero-based)

Public Sheet2: Integer;

Index of the last worksheet in the 3d cell range to which this formula refers (zero-based)

Public SheetNames: String;

Tab-separated list of the worksheet names refered by this formula (intermediate use only).

Public DoubleValue: double;

Floating point value assigned to this formula element

Public IntValue: Int64;

Integer value assigned to this formula element

Public StringValue: String;

String value assigned to this formula element

Public RelFlags: TsRelFlags;

Information about relative/absolute cell addresses,

See also
TsRelFlags
Public FuncName: String;

Name of the function called by this formula element

Public ParamsNum: Byte;

Count of parameters needed by this formula element


fpsTypes: Record TsComment

Record TsComment

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsComment = record

Description

The record TsComment describes a comment attached to a cell.

Parameters
Row
(0-based) row index of the cell
Col
(0-based) column index of the cell
Text
Comment text

Overview

Fields

Public | Row: Cardinal;
Public | Col: Cardinal;
Public | Text: String;

Description

Fields

Public Row: Cardinal;

This item has no description.

Public Col: Cardinal;

This item has no description.

Public Text: String;

This item has no description.


fpsTypes: Record TsHyperlink

Record TsHyperlink

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsHyperlink = record

Description

The record TsHyperlink contains info on a hyperlink in a cell

Parameters
Row
Row index of the cell containing the hyperlink
Col
Column index of the cell containing the hyperlink
Target
Target of hyperlink: URI of file, web link, mail; or: internal link (# followed by cell address)
Tooltip
Text displayed as a popup hint by Excel

Overview

Fields

Public | Row: Cardinal;
Public | Col: Cardinal;
Public | Target: String;
Public | Tooltip: String;

Description

Fields

Public Row: Cardinal;

This item has no description.

Public Col: Cardinal;

This item has no description.

Public Target: String;

This item has no description.

Public Tooltip: String;

This item has no description.


fpsTypes: Class TsFont

Class TsFont

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsFont = class(TObject)

Description

Font record used in fpspreadsheet. Contains the font name, the font size (in points), the font style, and the font color.

Hierarchy

  • TObject
  • TsFont

Overview

Fields

Public | FontName: String;
Public | Size: Single;
Public | Style: TsFontStyles;
Public | Color: TsColor;
Public | Position: TsFontPosition;

Methods

Public | constructor Create(AFontName: String; ASize: Single; AStyle: TsFontStyles; AColor: TsColor; APosition: TsFontPosition); overload;
Public | procedure CopyOf(AFont: TsFont);

Description

Fields

Public FontName: String;

Name of the font face, such as 'Arial' or 'Times New Roman'

Public Size: Single;

Size of the font, in points

Public Style: TsFontStyles;

Font style, such as bold, italics etc. - see TsFontStyle

Public Color: TsColor;

Text color given as rgb value

Public Position: TsFontPosition;

Text position

Methods

Public constructor Create(AFontName: String; ASize: Single; AStyle: TsFontStyles; AColor: TsColor; APosition: TsFontPosition); overload;

This item has no description.

Public procedure CopyOf(AFont: TsFont);

This item has no description.


fpsTypes: Record TsRichTextParam

Record TsRichTextParam

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsRichTextParam = record

Description

Parameter describing formatting of an text range in cell text

at which the FontIndex should be used. be used for painting the characters following the FirstIndex. the character at FirstIndex.

Overview

Fields

Public | FirstIndex: Integer;
Public | FontIndex: Integer;
Public | HyperlinkIndex: Integer;

Description

Fields

Public FirstIndex: Integer;

One-based index of the utf8 code-point ("character")

Public FontIndex: Integer;

Index of the font in the workbook's font list to

Public HyperlinkIndex: Integer;

Index of the hyperlink assigned to the text following


fpsTypes: Record TsCellBorderStyle

Record TsCellBorderStyle

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsCellBorderStyle = record

Description

The Cell border style reocrd contains the linestyle and color of a cell border. There is a CellBorderStyle for each border.

Overview

Fields

Public | LineStyle: TsLineStyle;
Public | Color: TsColor;

Description

Fields

Public LineStyle: TsLineStyle;

LineStyle to be used for this cell border. See TsLineStyle.

Public Color: TsColor;

Color to be used for this cell border. See TsColor.


fpsTypes: Record TsFillPattern

Record TsFillPattern

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsFillPattern = record

Description

Fill pattern record

Overview

Fields

Public | Style: TsFillStyle;
Public | FgColor: TsColor;
Public | BgColor: TsColor;

Description

Fields

Public Style: TsFillStyle;

This item has no description.

Public FgColor: TsColor;

This item has no description.

Public BgColor: TsColor;

This item has no description.


fpsTypes: Record TsCellCoord

Record TsCellCoord

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsCellCoord = record

Description

Record combining a cell's row and column indexes

Overview

Fields

Public | Row: Cardinal;
Public | Col: Cardinal;

Description

Fields

Public Row: Cardinal;

Row index of the cell (0-based)

Public Col: Cardinal;

Column index of the cell (0-based)


fpsTypes: Record TsCellRange

Record TsCellRange

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsCellRange = record

Description

Record combining row and column corner indexes of a range of cells

Overview

Fields

Public | Row1: Cardinal;
Public | Col1: Cardinal;
Public | Row2: Cardinal;
Public | Col2: Cardinal;

Description

Fields

Public Row1: Cardinal;

The index of the top row of the cell block (0-based)

Public Col1: Cardinal;

The index of the left column of the cell block (0-based)

Public Row2: Cardinal;

The index of the bottom row of the cell block (0-based)

Public Col2: Cardinal;

The index of the right column of the cell block (0-based)


fpsTypes: Record TsCellRange3d

Record TsCellRange3d

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsCellRange3d = record

Description

Record combining sheet index and row/column corner indexes of a 3d cell range

Overview

Fields

Public | Row1: Cardinal;
Public | Col1: Cardinal;
Public | Row2: Cardinal;
Public | Col2: Cardinal;
Public | Sheet1: Integer;
Public | Sheet2: Integer;

Description

Fields

Public Row1: Cardinal;

The index of the top row of the 3d cell block (0-based)

Public Col1: Cardinal;

The index of the left column of the 3d cell block (0-based)

Public Row2: Cardinal;

The index of the bottom row of the 3d cell block (0-based)

Public Col2: Cardinal;

The index of the right column of the 3d cell block (0-based)

Public Sheet1: Integer;

The index of the first sheet of the 3d cell block (0-based)

Public Sheet2: Integer;

The index of the last sheet of the 3d cell block (0-based)


fpsTypes: Record TsRowColRange

Record TsRowColRange

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsRowColRange = record

Description

Record containing limiting indexes of column or row range

Overview

Fields

Public | FirstIndex: Cardinal;
Public | LastIndex: Cardinal;

Description

Fields

Public FirstIndex: Cardinal;

Index of the first column/row of a range of columns/rows

Public LastIndex: Cardinal;

Index of the last column/row of a range of columns/rows


fpsTypes: Record TsSortKey

Record TsSortKey

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsSortKey = record

Description

Sort key: parameters for sorting

See also
TsSortOption

Overview

Fields

Public | ColRowIndex: Integer;
Public | Options: TsSortOptions;

Description

Fields

Public ColRowIndex: Integer;

Index of the sorted column or row

Public Options: TsSortOptions;

Options used for sorting)


fpsTypes: Record TsSortParams

Record TsSortParams

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsSortParams = record

Description

Complete set of sorting parameters

Overview

Fields

Public | SortByCols: Boolean;
Public | Priority: TsSortPriority;
Public | Keys: TsSortKeys;

Description

Fields

Public SortByCols: Boolean;

If true sorting is top-down, otherwise left-right

Public Priority: TsSortPriority;

Determines whether numbers are before or after text.

Public Keys: TsSortKeys;

Array of sorting col/row indexes and sorting directions


fpsTypes: Record TsCryptoInfo

Record TsCryptoInfo

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsCryptoInfo = record

Description

Record collection information for encryption/decryption

Overview

Fields

Public | PasswordHash: String;
Public | Algorithm: TsCryptoAlgorithm;
Public | SaltValue: string;
Public | SpinCount: Integer;

Description

Fields

Public PasswordHash: String;

This item has no description.

Public Algorithm: TsCryptoAlgorithm;

This item has no description.

Public SaltValue: string;

This item has no description.

Public SpinCount: Integer;

This item has no description.


fpsTypes: Record TsCellFormat

Record TsCellFormat

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsCellFormat = record

Description

Record containing all details for cell formatting

Overview

Fields

Public | Name: String;
Public | ID: Integer;
Public | UsedFormattingFields: TsUsedFormattingFields;
Public | FontIndex: Integer;
Public | TextRotation: TsTextRotation;
Public | HorAlignment: TsHorAlignment;
Public | VertAlignment: TsVertAlignment;
Public | Border: TsCellBorders;
Public | BorderStyles: TsCellBorderStyles;
Public | Background: TsFillPattern;
Public | NumberFormatIndex: Integer;
Public | BiDiMode: TsBiDiMode;
Public | Protection: TsCellProtections;
Public | NumberFormat: TsNumberFormat;
Public | NumberFormatStr: String;

Methods

Public | procedure SetBackground(AFillStyle: TsFillStyle; AFgColor, ABgColor: TsColor);
Public | procedure SetBackgroundColor(AColor: TsColor);
Public | procedure SetBorders(ABorders: TsCellBorders; const AColor: TsColor = scBlack; const ALineStyle: TsLineStyle = lsThin);
Public | procedure SetFont(AFontIndex: Integer);
Public | procedure SetHorAlignment(AHorAlign: TsHorAlignment);
Public | procedure SetNumberFormat(AIndex: Integer);
Public | procedure SetTextRotation(ARotation: TsTextRotation);
Public | procedure SetVertAlignment(AVertAlign: TsVertAlignment);

Description

Fields

Public Name: String;

This item has no description.

Public ID: Integer;

This item has no description.

Public UsedFormattingFields: TsUsedFormattingFields;

This item has no description.

Public FontIndex: Integer;

This item has no description.

Public TextRotation: TsTextRotation;

This item has no description.

Public HorAlignment: TsHorAlignment;

This item has no description.

Public VertAlignment: TsVertAlignment;

This item has no description.

Public Border: TsCellBorders;

This item has no description.

Public BorderStyles: TsCellBorderStyles;

This item has no description.

Public Background: TsFillPattern;

This item has no description.

Public NumberFormatIndex: Integer;

This item has no description.

Public BiDiMode: TsBiDiMode;

This item has no description.

Public Protection: TsCellProtections;

This item has no description.

Public NumberFormat: TsNumberFormat;

This item has no description.

Public NumberFormatStr: String;

This item has no description.

Methods

Public procedure SetBackground(AFillStyle: TsFillStyle; AFgColor, ABgColor: TsColor);

This item has no description.

Public procedure SetBackgroundColor(AColor: TsColor);

This item has no description.

Public procedure SetBorders(ABorders: TsCellBorders; const AColor: TsColor = scBlack; const ALineStyle: TsLineStyle = lsThin);

This item has no description.

Public procedure SetFont(AFontIndex: Integer);

This item has no description.

Public procedure SetHorAlignment(AHorAlign: TsHorAlignment);

This item has no description.

Public procedure SetNumberFormat(AIndex: Integer);

This item has no description.

Public procedure SetTextRotation(ARotation: TsTextRotation);

This item has no description.

Public procedure SetVertAlignment(AVertAlign: TsVertAlignment);

This item has no description.


fpsTypes: Record TCell

Record TCell

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TCell = record

Description

Cell structure for TsWorksheet The cell record contains information on the location of the cell (row and column index), on the value contained (number, date, text, ...), on formatting, etc.

Never suppose that all *Value fields are valid, only one of the ContentTypes is valid. For other fields use TsWorksheet.ReadAsText and similar methods

Overview

Fields

Public | Row: Cardinal;
Public | Col: Cardinal;
Public | Worksheet: TsBasicWorksheet;
Public | Flags: TsCellFlags;
Public | FormatIndex: Integer;
Public | ConditionalFormatIndex: array of Integer;
Public | UTF8StringValue: String;
Public | RichTextParams: TsRichTextParams;
Published | ContentType: TCellContentType
Public | Numbervalue: Double
Public | DateTimeValue: TDateTime
Public | BoolValue: boolean
Public | ErrorValue: TsErrorValue

Description

Fields

Public Row: Cardinal;

Row index of the cell (zero-based)

Public Col: Cardinal;

Column index of the cell (zero-based)

Public Worksheet: TsBasicWorksheet;

Worksheet to which this cell belongs. In order to avoid circular unit references the worksheet is declared as TsBasicWorksheet here; usually it must be cast to TsWorksheet when used.

Public Flags: TsCellFlags;

Status flags for this cell (see TsCellFlags)

Public FormatIndex: Integer;

Index to the TsCellFormat record to be applied to this cell. The format records are collected in the workbook's CellFormatList.

Public ConditionalFormatIndex: array of Integer;

Array of indexes to the worksheet's ConditionalalFormats list needed for conditional formatting

Public UTF8StringValue: String;

String to be displayed in the cell if ContentType is cctUTF8String

Public RichTextParams: TsRichTextParams;

Descriptions to be used for individual text formatting of parts of the cell text

Published ContentType: TCellContentType

This item has no description.

Public Numbervalue: Double

This item has no description.

Public DateTimeValue: TDateTime

Date/time value assigned to the cell. It is valid only when ContentType is cctDateTime.

Public BoolValue: boolean

Boolean value assigned to the cell. It is valid only when ContentType is cctBoole.

Public ErrorValue: TsErrorValue

Error value assigned to the cell. The value is valid only when ContentType is cctError. .


fpsTypes: Record TRow

Record TRow

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TRow = record

Description

The record TRow contains information about a spreadsheet row:

Only rows with non-default height or non-default format or non-default Options have a row record.

Overview

Fields

Public | Row: Cardinal;
Public | Height: Single;
Public | RowHeightType: TsRowHeightType;
Public | FormatIndex: Integer;
Public | Options: TsColRowOptions;

Description

Fields

Public Row: Cardinal;

The index of the row (beginning with 0)

Public Height: Single;

The height of the row (expressed in the units defined by the workbook)

Public RowHeightType: TsRowHeightType;

Specifies whether the row has default, custom, or automatic height

Public FormatIndex: Integer;

Row default format, index into the workbook's FCellFormatList

Public Options: TsColRowOptions;

See TsColRowOption


fpsTypes: Record TCol

Record TCol

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TCol = record

Description

The record TCol contains information about a spreadsheet column:

Only columns with non-default width or non-default format or non-default Options have a column record.

Overview

Fields

Public | Col: Cardinal;
Public | Width: Single;
Public | ColWidthType: TsColWidthType;
Public | FormatIndex: Integer;
Public | Options: TsColRowOptions;

Description

Fields

Public Col: Cardinal;

The index of the column (beginning with 0)

Public Width: Single;

The width of the column (expressed in the units defined in the workbook)

Public ColWidthType: TsColWidthType;

Specifies whether the column has default or custom width

Public FormatIndex: Integer;

Column default format, index into the workbook's FCellFormatlist

Public Options: TsColRowOptions;

See TsColRowOptions


fpsTypes: Record TsImage

Record TsImage

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsImage = record

Description

Embedded image

Overview

Fields

Public | Row: Cardinal;
Public | Col: Cardinal;
Public | Index: Integer;
Public | OffsetX: Double;
Public | OffsetY: Double;
Public | ScaleX: Double;
Public | ScaleY: Double;
Public | Picture: TObject;
Public | HyperlinkTarget: String;
Public | HyperlinkToolTip: String;

Description

Fields

Public Row: Cardinal;

Row index of the cell at which the top sie of the image is anchored

Public Col: Cardinal;

Column index of cell at which the left side of the image is anchored

Public Index: Integer;

Index of the image in the workbook's embedded streams list.

Public OffsetX: Double;

Horizontal displacement of the image relative to the top/left corner of the anchor cell (in millimeters)

Public OffsetY: Double;

Vertical displacement of the image relative to the top/left corner of the anchor cell (in millimeters)

Public ScaleX: Double;

Horizontal scaling factor of the image

Public ScaleY: Double;

Vertical scaling factor of the image

Public Picture: TObject;

Used internally by TPicture to display the image in the worksheet grid

Public HyperlinkTarget: String;

Hyperlink assigned to the image

Public HyperlinkToolTip: String;

Tooltip for the hyperlink of the image


fpsTypes: Record TsHeaderFooterImage

Record TsHeaderFooterImage

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsHeaderFooterImage = record

Description

Image embedded in header or footer

Overview

Fields

Public | Index: Integer;
Public | ScaleX: Double;
Public | ScaleY: Double;

Description

Fields

Public Index: Integer;

Index of the image in the workbook's embedded streams list

Public ScaleX: Double;

Scaling factor in horizontal direction

Public ScaleY: Double;

Scaling factor in vertical direction


fpsTypes: Record TsSearchParams

Record TsSearchParams

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsSearchParams = record

Description

Search parameters

Overview

Fields

Public | SearchText: String;
Public | Options: TsSearchOptions;
Public | Within: TsSearchWithin;
Public | ColsRows: String;

Description

Fields

Public SearchText: String;

This item has no description.

Public Options: TsSearchOptions;

This item has no description.

Public Within: TsSearchWithin;

This item has no description.

Public ColsRows: String;

This item has no description.


fpsTypes: Record TsReplaceParams

Record TsReplaceParams

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsReplaceParams = record

Description

Replace parameters

Overview

Fields

Public | ReplaceText: String;
Public | Options: TsReplaceOptions;

Description

Fields

Public ReplaceText: String;

This item has no description.

Public Options: TsReplaceOptions;

This item has no description.


fpsTypes: Class TsMetaData

Class TsMetaData

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsMetaData = class(TObject)

Description

Workbook metadata

Hierarchy

  • TObject
  • TsMetaData

Overview

Methods

Public | constructor Create;
Public | destructor Destroy; override;
Public | function AddCustom(AName, AValue: String): Integer;
Public | function IsEmpty: Boolean;
Public | procedure Clear;

Properties

Public | property Authors: TStrings read FAuthors write FAuthors;
Public | property Comments: TStrings read FComments write FComments;
Public | property CreatedBy: String read GetCreatedBy write SetCreatedBy;
Public | property Custom: TStrings read FCustom write FCustom;
Public | property DateCreated: TDateTime read FDateCreated write FDateCreated;
Public | property DateLastModified: TDatetime read FDateLastModified write FDateLastModified;
Public | property Keywords: TStrings read FKeywords write FKeywords;
Public | property LastModifiedBy: String read FLastModifiedBy write FLastModifiedBy;
Public | property Subject: String read FSubject write FSubject;
Public | property Title: String read FTitle write FTitle;

Description

Methods

Public constructor Create;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public function AddCustom(AName, AValue: String): Integer;

This item has no description.

Public function IsEmpty: Boolean;

This item has no description.

Public procedure Clear;

This item has no description.

Properties

Public property Authors: TStrings read FAuthors write FAuthors;

This item has no description.

Public property Comments: TStrings read FComments write FComments;

This item has no description.

Public property CreatedBy: String read GetCreatedBy write SetCreatedBy;

This item has no description.

Public property Custom: TStrings read FCustom write FCustom;

This item has no description.

Public property DateCreated: TDateTime read FDateCreated write FDateCreated;

This item has no description.

Public property DateLastModified: TDatetime read FDateLastModified write FDateLastModified;

This item has no description.

Public property Keywords: TStrings read FKeywords write FKeywords;

This item has no description.

Public property LastModifiedBy: String read FLastModifiedBy write FLastModifiedBy;

This item has no description.

Public property Subject: String read FSubject write FSubject;

This item has no description.

Public property Title: String read FTitle write FTitle;

This item has no description.


fpsTypes: Class TsBasicWorksheet

Class TsBasicWorksheet

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsBasicWorksheet = class(TObject)

Description

Basic worksheet class to avoid circular unit references. It has only those properties and methods which do not require any other unit than fpstypes.

Hierarchy

  • TObject
  • TsBasicWorksheet

Overview

Fields

Protected | FName: String;
Protected | FOptions: TsSheetOptions;
Protected | FProtection: TsWorksheetProtections;

Methods

Public | constructor Create;
Public | function HasHyperlink(ACell: PCell): Boolean;
Public | function IsProtected: Boolean;
Protected | procedure SetName(const AName: String); virtual; abstract;

Properties

Public | property Name: string read FName write SetName;
Public | property Options: TsSheetOptions read FOptions write FOptions;
Public | property Protection: TsWorksheetProtections read FProtection write FProtection;

Description

Fields

Protected FName: String;

This item has no description.

Protected FOptions: TsSheetOptions;

This item has no description.

Protected FProtection: TsWorksheetProtections;

This item has no description.

Methods

Public constructor Create;

This item has no description.

Public function HasHyperlink(ACell: PCell): Boolean;

Checks whether the specified cell contains a hyperlink

Public function IsProtected: Boolean;

Returns whether the worksheet is protected

Protected procedure SetName(const AName: String); virtual; abstract;

This item has no description.

Properties

Public property Name: string read FName write SetName;

Name of the sheet. In the popular spreadsheet applications this is displayed in the tab of the sheet.

Public property Options: TsSheetOptions read FOptions write FOptions;

Parameters controlling visibility of grid lines and row/column headers, usage of frozen panes etc. See TsSheetOption.

Public property Protection: TsWorksheetProtections read FProtection write FProtection;

Worksheet protection options


fpsTypes: Class TsBasicWorkbook

Class TsBasicWorkbook

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type TsBasicWorkbook = class(TObject)

Description

Basic worksheet class to avoid circular unit references. It contains only those properties and methods which do not require any other unit than fpstypes.

Hierarchy

  • TObject
  • TsBasicWorkbook

Overview

Fields

Protected | FFileName: String;
Protected | FFormatID: TsSpreadFormatID;
Protected | FOptions: TsWorkbookOptions;
Protected | FProtection: TsWorkbookProtections;
Protected | FUnits: TsSizeUnits;
Public | FormatSettings: TFormatSettings;

Methods

Public | constructor Create;
Public | destructor Destroy; override;
Public | function IsProtected: Boolean;
Public | procedure AddErrorMsg(const AMsg: String; const Args: array of const); overload;
Public | procedure AddErrorMsg(const AMsg: String); overload;
Public | procedure ClearErrorList; inline;

Properties

Public | property ErrorMsg: String read GetErrorMsg;
Public | property FileFormatID: TsSpreadFormatID read FFormatID;
Public | property FileName: String read FFileName;
Public | property OnQueryPassword: TsOnQueryPassword read FOnQueryPassword write FOnQueryPassword;
Public | property Options: TsWorkbookOptions read FOptions write FOptions;
Public | property Protection: TsWorkbookProtections read FProtection write FProtection;
Public | property Units: TsSizeUnits read FUnits;

Description

Fields

Protected FFileName: String;

This item has no description.

Protected FFormatID: TsSpreadFormatID;

This item has no description.

Protected FOptions: TsWorkbookOptions;

This item has no description.

Protected FProtection: TsWorkbookProtections;

This item has no description.

Protected FUnits: TsSizeUnits;

This item has no description.

Public FormatSettings: TFormatSettings;

A copy of SysUtil's DefaultFormatSettings (converted to UTF8) to provide some kind of localization of some formatting strings. Can be modified before loading/writing files

Methods

Public constructor Create;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public function IsProtected: Boolean;

Returns whether the workbook is protected

Public procedure AddErrorMsg(const AMsg: String; const Args: array of const); overload;

Adds an error message composed by means of format codes to an internal list

Parameters
AMsg
Error text to be stored in the list
Args
Array of arguments to be used by the Format() function
Public procedure AddErrorMsg(const AMsg: String); overload;

Adds a (simple) error message to an internal list

Parameters
AMsg
Error text to be stored in the list
Public procedure ClearErrorList; inline;

Clears the internal error message list

Properties

Public property ErrorMsg: String read GetErrorMsg;

Retrieves error messages collected during reading/writing

Public property FileFormatID: TsSpreadFormatID read FFormatID;

Identifies the file format which was detected when reading the file

Public property FileName: String read FFileName;

Filename of the saved workbook

Public property OnQueryPassword: TsOnQueryPassword read FOnQueryPassword write FOnQueryPassword;

Event returning the password to open a password-protected workbook

Public property Options: TsWorkbookOptions read FOptions write FOptions;

Option flags for the workbook - see boXXXX declarations

Public property Protection: TsWorkbookProtections read FProtection write FProtection;

Workbook protection flags

Public property Units: TsSizeUnits read FUnits;

Units of row heights and column widths


fpsTypes: Class EFpSpreadsheet

Class EFpSpreadsheet

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type EFpSpreadsheet = class(Exception)

Description

Ancestor of the fpSpreadsheet exceptions

Hierarchy

  • TObject
  • Exception
  • EFpSpreadsheet


fpsTypes: Class EFpSpreadsheetReader

Class EFpSpreadsheetReader

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type EFpSpreadsheetReader = class(EFpSpreadsheet)

Description

Class of exceptions fired by the workbook reader

Hierarchy

  • TObject
  • Exception
  • EFpSpreadsheet
  • EFpSpreadsheetReader


fpsTypes: Class EFpSpreadsheetWriter

Class EFpSpreadsheetWriter

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsTypes

Declaration

type EFpSpreadsheetWriter = class(EFpSpreadsheet)

Description

Class of exceptions fired for the workbook writer

Hierarchy

  • TObject
  • Exception
  • EFpSpreadsheet
  • EFpSpreadsheetWriter


fpsUtils

Unit fpsUtils

Description
Uses
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Constants
Variables

Description

Unit fpsUtils provides a variety of utility functions used throughout the fpspreadsheet library.

LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus distribution, for details about the license.

Overview

Classes, Interfaces, Objects and Records

Name | Description
Record TRGBA |

Functions and Procedures

function AnalyzeCompareStr(AString: String; out ACompareOp: TsCompareOperation): String;
procedure AppendToStream(AStream: TStream; const AString1, AString2: String); inline; overload;
procedure AppendToStream(AStream: TStream; const AString: String); inline; overload;
procedure AppendToStream(AStream: TStream; const AString1, AString2, AString3: String); inline; overload;
function CellBorderStyle(const AColor: TsColor = scBlack; const ALineStyle: TsLineStyle = lsThin): TsCellBorderStyle;
function cmToPts(AValue: Double): Double; inline;
function ColorToHTMLColorStr(AValue: TsColor; AExcelDialect: Boolean = false): String;
function CombineTextAndRichTextParams(AText: String; ARichText: TsRichTextParams): String;
function DWordLEtoN(AValue: Cardinal): Cardinal;
function DWordToLE(AValue: Cardinal): Cardinal;
function EMUToIn(AValue: Int64): Double; inline;
function EMUToMM(AValue: Int64): Double; inline;
procedure EnsureOrder(var a,b: Integer); overload;
procedure EnsureOrder(var a,b: Cardinal); overload;
procedure FixHyperlinkPathDelims(var ATarget: String);
procedure FixLineEndings(var AText: String; var ARichTextParams: TsRichTextParams);
function FlipColorBytes(AColor: TsColor): TsColor;
procedure FloatToFraction(AValue: Double; AMaxDenominator: Int64; out ANumerator, ADenominator: Int64);
function GetCellRangeString(ARange: TsCellRange; AFlags: TsRelFlags = rfAllRel; Compact: Boolean = false): String; overload;
function GetCellRangeString(ARow1, ACol1, ARow2, ACol2: Cardinal; AFlags: TsRelFlags = rfAllRel; Compact: Boolean = false): String; overload;
function GetCellRangeString(ASheet1, ASheet2: String; ARow1, ACol1, ARow2, ACol2: Cardinal; AFlags: TsRelFlags = rfAllRel; Compact: Boolean = false): String; overload;
function GetCellRangeString_ODS(ASheet1, ASheet2: String; ARow1, ACol1, ARow2, ACol2: Cardinal; AFlags: TsRelFlags = rfAllRel; WithBrackets: Boolean = true): String; overload;
function GetCellRangeString_ODS(ARange: TsCellRange; AFlags: TsRelFlags = rfAllRel; Compact: Boolean = false; WithBrackets: Boolean = true): String; overload;
function GetCellRangeString_ODS(ARow1, ACol1, ARow2, ACol2: Cardinal; AFlags: TsRelFlags = rfAllRel; Compact: Boolean = false; WithBrackets: Boolean = true): String; overload;
function GetCellRangeString_R1C1(ARow1, ACol1, ARow2, ACol2: Cardinal; AFlags: TsRelFlags = [rfRelRow, rfRelCol]; ARefRow: Cardinal = Cardinal(-1); ARefCol: Cardinal = Cardinal(-1)): String; overload;
function GetCellRangeString_R1C1(ASheet1, ASheet2: String; ARow1, ACol1, ARow2, ACol2: Cardinal; AFlags: TsRelFlags = [rfRelRow, rfRelCol]; ARefRow: Cardinal = Cardinal(-1); ARefCol: Cardinal = Cardinal(-1)): String; overload;
function GetCellString(ARow,ACol: Cardinal; AFlags: TsRelFlags = [rfRelRow, rfRelCol]): String;
function GetCellString_R1C1(ARow, ACol: Cardinal; AFlags: TsRelFlags = [rfRelRow, rfRelCol]; ARefRow: Cardinal = Cardinal(-1); ARefCol: Cardinal = Cardinal(-1)): String; overload;
function GetColorName(AColor: TsColor): String;
function GetColString(AColIndex: Integer): String;
function GetErrorValueStr(AErrorValue: TsErrorValue): String;
function GetFileFormatName(AFormat: TsSpreadsheetFormat): string; deprecated;
function GetFontAsString(AFont: TsFont): String;
function GetFormatFromFileName(const AFileName: TFileName; out AFormatID: TsSpreadFormatID): Boolean; overload;
function GetFormatFromFileName(const AFileName: TFileName; out SheetType: TsSpreadsheetFormat): Boolean; overload; deprecated 'Use overloaded function with TsSpreadsheetID';
function GetRowString(ARowIndex: Integer): String;
function GetSheetCellRangeString_ODS(ASheet1, ASheet2: String; ARow1, ACol1, ARow2, ACol2: Cardinal; AFlags: TsRelFlags = rfAllRel; WithBrackets: Boolean = true): String;
function GetSheetCellString_ODS(ASheet: String; ARow, ACol: Cardinal; AFlags: TsRelFlags = rfAllRel; WithBrackets: Boolean = true): String;
function Has3dFormula(ACell: PCell): Boolean;
function HasFormula(ACell: PCell): Boolean;
function HasZipHeader(AStream: TStream): Boolean;
function HighContrastColor(AColor: TsColor): TsColor;
function HTMLColorStrToColor(AValue: String): TsColor;
function HTMLLengthStrToPts(AValue: String; DefaultUnits: String = 'pt'): Double;
function IfThen(ACondition: Boolean; AValue1,AValue2: TsNumberFormat): TsNumberFormat; overload;
function IfThen(ACondition: Boolean; AValue1,AValue2: Char): Char; overload;
procedure InitCell(AWorksheet: TsBasicWorksheet; ARow, ACol: Cardinal; out ACell: TCell); overload;
procedure InitCell(out ACell: TCell); overload;
procedure InitCryptoInfo(out AValue: TsCryptoInfo);
procedure InitFormatRecord(out AValue: TsCellFormat);
function InitFormatSettings(AWorkbook: TsBasicWorkbook): TFormatSettings;
procedure InitHeaderFooterImageRecord(out AImage: TsHeaderFooterImage);
procedure InitImageRecord(out AValue: TsImage; ARow, ACol: Cardinal; AOffsetX, AOffsetY, AScaleX, AScaleY: Double);
function InitReplaceParams(AReplaceText: String = ''; AOptions: TsReplaceOptions = []): TsReplaceParams;
function InitSearchParams(ASearchText: String = ''; AOptions: TsSearchOptions = []; ASearchWithin: TsSearchWithin = swWorksheet): TsSearchParams;
function InitSortParams(ASortByCols: Boolean = true; ANumSortKeys: Integer = 1; ASortPriority: TsSortPriority = spNumAlpha): TsSortParams;
function IntegerToLE(AValue: Integer): Integer;
function InToEMU(AValue: Double): Int64; inline;
function InToMM(AValue: Double): Double; inline;
function InToPts(AValue: Double): Double; inline;
function ISO8601StrToDateTime(s: String): TDateTime;
function IsPaletteIndex(AColor: TsColor): Boolean;
function LongRGBToExcelPhysical(const RGB: DWord): DWord;
function LumModOff(AColor: TsColor; ALumMod, ALumOff: Double): TsColor;
function mmToEMU(AValue: Double): Int64; inline;
function mmToIn(AValue: Double): Double; inline;
function mmToPts(AValue: Double): Double; inline;
function ParseCellColString(const AStr: string; out ACol: Cardinal): Boolean;
function ParseCellRangeString(const AStr: string; out AFirstCellRow, AFirstCellCol, ALastCellRow, ALastCellCol: Cardinal): Boolean; overload;
function ParseCellRangeString(const AStr: string; out AFirstCellRow, AFirstCellCol, ALastCellRow, ALastCellCol: Cardinal; out AFlags: TsRelFlags): Boolean; overload;
function ParseCellRangeString(const AStr: String; out ASheet1, ASheet2: String; out ARow1, ACol1, ARow2, ACol2: Cardinal; out AFlags: TsRelFlags): Boolean; overload;
function ParseCellRangeString(const AStr: String; out ARange: TsCellRange): Boolean; overload;
function ParseCellRangeString(const AStr: String; out ARange: TsCellRange; out AFlags: TsRelFlags): Boolean; overload;
function ParseCellRangeString_R1C1(const AStr: string; ABaseRow, ABaseCol: Cardinal; out AFirstCellRow, AFirstCellCol, ALastCellRow, ALastCellCol: Cardinal; out AFlags: TsRelFlags): Boolean;
function ParseCellRangeString_R1C1(const AStr: String; ABaseRow, ABaseCol: Cardinal; out ASheet1, ASheet2: String; out ARow1, ACol1, ARow2, ACol2: Cardinal; out AFlags: TsRelFlags): Boolean; overload;
function ParseCellRowString(const AStr: string; out ARow: Cardinal): Boolean;
function ParseCellString(const AStr: string; out ACellRow, ACellCol: Cardinal; out AFlags: TsRelFlags): Boolean; overload;
function ParseCellString(const AStr: string; out ACellRow, ACellCol: Cardinal): Boolean; overload;
function ParseCellString_R1C1(const AStr: string; ABaseRow, ABaseCol: Cardinal; out ACellRow, ACellCol: Cardinal): Boolean; overload;
function ParseCellString_R1C1(const AStr: String; ABaseRow, ABaseCol: Cardinal; out ASheet: String; out ACellRow, ACellCol: Cardinal; out AFlags: TsRelFlags): Boolean; overload;
function ParseCellString_R1C1(const AStr: String; ABaseRow, ABaseCol: Cardinal; out ACellRow, ACellCol: Cardinal; out AFlags: TsRelFlags): Boolean; overload;
function ParseIntervalString(const AStr: string; out AFirstCellRow, AFirstCellCol, ACount: Cardinal; out ADirection: TsSelectionDirection): Boolean;
function ParseSheetCellString(const AStr: String; out ASheetName: String; out ACellRow, ACellCol: Cardinal; ASheetSeparator: Char = '!'): Boolean;
function PtsToCm(AValue: Double): Double; inline;
function PtsToIn(AValue: Double): Double; inline;
function PtsToMM(AValue: Double): Double; inline;
function PtsToPx(AValue: Double; AScreenPixelsPerInch: Integer): Integer; inline;
function PtsToTwips(AValue: Single): Integer; inline;
function pxToPts(AValue: Double; AScreenPixelsPerInch: Integer): Double; inline; overload;
function pxToPts(AValue, AScreenPixelsPerInch: Integer): Double; inline; overload;
function RandomString(ALen: Integer): String;
function Range(ARow1, ACol1, ARow2, ACol2: Cardinal): TsCellRange; overload;
function Range(ARow, ACol: Cardinal): TsCellRange; overload;
function Range3D(ASheetIdx1, ASheetIdx2: Integer; ARow1, ACol1, ARow2, ACol2: Cardinal): TsCellRange3D;
function Round(AValue: Double): Int64;
function SafeQuoteStr(AString: String): String;
function SameCellBorders(AFormat1, AFormat2: PsCellFormat): Boolean;
function SameFont(AFont: TsFont; AFontName: String; AFontSize: Single; AStyle: TsFontStyles; AColor: TsColor; APos: TsFontPosition): Boolean; overload;
function SameFont(AFont1, AFont2: TsFont): Boolean; overload;
function SameRichTextParams(ARtp1, ARtp2: TsRichTextparams): Boolean;
function SetAsPaletteIndex(AIndex: Integer): TsColor;
function SheetNameNeedsQuotes(ASheet: String): Boolean;
procedure SplitHyperlink(AValue: String; out ATarget, ABookmark: String);
function SplitStr(const AText: String; ADelimiter: Char): TStringArray;
procedure SplitTextAndRichTextParams(AValue: String; out AText: String; out ARichText: TsRichTextParams);
function StringToBytes(const AString: String): TBytes;
function TintedColor(AColor: TsColor; tint: Double): TsColor;
function TryFractionStrToFloat(AText: String; out ANumber: Double; out AIsMixed: Boolean; out AMaxDigits: Integer): Boolean;
function TryPercentStrToFloat(AText: String; out ANumber: Double): Boolean;
function TryStrToCellRange_ODS(const AStr: String; var ASheet1, ASheet2: String; var ARow1, ACol1, ARow2, ACol2: Cardinal; var AFlags: TsRelFlags): Boolean;
function TryStrToErrorValue(AErrorStr: String; out AErr: TsErrorValue): boolean;
function TryStrToErrorValue(AErrorStr: String; SheetSep: Char; out ASheetName: String; out AErr: TsErrorValue): Boolean;
function TryStrToFloatAuto(AText: String; out ANumber: Double; out ADecimalSeparator, AThousandSeparator: Char; out AWarning: String): Boolean;
function TwipsToPts(AValue: Integer): Single; inline;
function UnquoteStr(AString: String): String;
procedure Unused(const A1);
procedure Unused(const A1, A2);
procedure Unused(const A1, A2, A3);
function UTF8CodePoints(AText: string; out sa: TStringArray): Boolean;
function ValidUTF8Text(var AText: String): Boolean;
function WideStringLEToN(const AValue: WideString): WideString;
function WideStringToLE(const AValue: WideString): WideString;
function WordLEtoN(AValue: Word): Word;
function WordToLE(AValue: Word): Word;

Types

TAnsiCharSet = set of ansichar;
TsSelectionDirection = (...);
TStringArray = array of string;

Constants

ISO8601Format='yyyymmdd"T"hhmmss';
ISO8601FormatDateOnly='yyyy"-"mm"-"dd';
ISO8601FormatExtended='yyyy"-"mm"-"dd"T"hh":"mm":"ss';
ISO8601FormatExtendedUTC='yyyy"-"mm"-"dd"T"hh":"mm":"ss"Z"';
ISO8601FormatHoursOverflow='"PT"[hh]"H"nn"M"ss.zz"S"';
ISO8601FormatTimeOnly='"PT"hh"H"nn"M"ss"S"';

Variables

ScreenPixelsPerInch: Integer = 96;

Description

Functions and Procedures

function AnalyzeCompareStr(AString: String; out ACompareOp: TsCompareOperation): String;

Extracts compare information from an input string such as "<2.4". Is needed for some Excel-strings.

Parameters
AString
Input string starting with "<", "<=", ">", ">=", "<>" or "=". If this start code is missing a "=" is assumed.
ACompareOp
Identifier for the comparing operation extracted - see TsCompareOperation
Returns

Input string with the comparing characters stripped.

procedure AppendToStream(AStream: TStream; const AString1, AString2: String); inline; overload;

Appends two strings to a stream

Parameters
AStream
Stream to which the strings will be added
AString1
First string to be written to the stream
AString2
Second string to be written to the stream
procedure AppendToStream(AStream: TStream; const AString: String); inline; overload;

Appends a string to a stream

Parameters
AStream
Stream to which the string will be added
AString
String to be written to the stream
procedure AppendToStream(AStream: TStream; const AString1, AString2, AString3: String); inline; overload;

Appends three strings to a stream

Parameters
AStream
Stream to which the strings will be added
AString1
First string to be written to the stream
AString2
Second string to be written to the stream
AString3
Third string to be written to the stream
function CellBorderStyle(const AColor: TsColor = scBlack; const ALineStyle: TsLineStyle = lsThin): TsCellBorderStyle;

Combines color and linestyle to a TsCellBorderStyle record

function cmToPts(AValue: Double): Double; inline;

Converts centimeters to points (72 pts = 1 inch)

Parameters
AValue
Length value in centimeters
Returns

Value converted to points

function ColorToHTMLColorStr(AValue: TsColor; AExcelDialect: Boolean = false): String;

Converts an rgb color value to a string as used in HTML code (for ods)

Parameters
AValue
RGB color value (compatible with the TColor data type of the graphics unit)
AExcelDialect
If True, returned string is in Excel's format for xlsx, i.e. in AARRGGBB notation, like '00FF0000' for "red"
Returns

HTML-compatible string, like '#FF0000' (AExcelDialect = false)

function CombineTextAndRichTextParams(AText: String; ARichText: TsRichTextParams): String;

Append the rich-text parameters to the bare text. Needed for StringHashList.

function DWordLEtoN(AValue: Cardinal): Cardinal;

Converts a DWord value from little-endian to big-endian byte-order.

Parameters
AValue
Little-endian DWord value
Returns

Big-endian DWord value

function DWordToLE(AValue: Cardinal): Cardinal;

DWordLEToLE converts a DWord value from big-endian to little-endian byte-order.

Parameters
AValue
Big-endian DWord value
Returns

Little-endian DWord value

function EMUToIn(AValue: Int64): Double; inline;

Converts EMU (English metric units) to inches

Parameters
AValue
Length value in EMU
Returns

Value converted to inches

function EMUToMM(AValue: Int64): Double; inline;

Converts EMU to millimeters

Parameters
AValue
Length value in EMU (1 cm = 360000 EMU)
Returns

Value converted to millimeters

procedure EnsureOrder(var a,b: Integer); overload;

Helper procedure which guarantees that a is not larger than b

procedure EnsureOrder(var a,b: Cardinal); overload;

Helper procedure which guarantees that a is not larger than b

procedure FixHyperlinkPathDelims(var ATarget: String);

Replaces backslashes by forward slashes in hyperlink path names

procedure FixLineEndings(var AText: String; var ARichTextParams: TsRichTextParams);

Replaces CRLF line endings by LF (#10) alone because this is what xml returns. This is required to keep the character indexes of the rich text formatting runs in synch when reading xml files.

function FlipColorBytes(AColor: TsColor): TsColor;

This item has no description.

procedure FloatToFraction(AValue: Double; AMaxDenominator: Int64; out ANumerator, ADenominator: Int64);

Approximates a floating point value as a fraction and returns the values of numerator and denominator.

Parameters
AValue
Floating point value to be analyzed
AMaxDenominator
Maximum value of the denominator allowed
ANumerator
(out) Numerator of the best approximating fraction
ADenominator
(out) Denominator of the best approximating fraction
function GetCellRangeString(ARange: TsCellRange; AFlags: TsRelFlags = rfAllRel; Compact: Boolean = false): String; overload;

Calculates a cell range address string from a TsCellRange record and the relative address state flags.

Parameters
ARange
TsCellRange record containing the zero-based indexes of the first and last row and columns of the range
AFlags
A set containing an entry for first and last column and row if their addresses are relative.
Compact
If the range consists only of a single cell and compact is True then the simple cell string is returned (e.g. A1). If compact is False then the cell is repeated (e.g. A1:A1)
Returns

Excel type of cell address range containing '$' characters for absolute address parts and a ':' to separate the first and last cells of the range

function GetCellRangeString(ARow1, ACol1, ARow2, ACol2: Cardinal; AFlags: TsRelFlags = rfAllRel; Compact: Boolean = false): String; overload;

This item has no description.

function GetCellRangeString(ASheet1, ASheet2: String; ARow1, ACol1, ARow2, ACol2: Cardinal; AFlags: TsRelFlags = rfAllRel; Compact: Boolean = false): String; overload;

Calculates a cell range address string from zero-based column and row indexes and the relative address state flags.

Example: ARow1 = 0, ACol1 = 0, ARow = 2, ACol = 1, AFlags = [rfRelRow, rfRelRow2] –> $A1:$B3

Parameters
ARow1
Zero-based index of the first row in the range
ACol1
Zero-based index of the first column in the range
ARow2
Zero-based index of the last row in the range
ACol2
Zero-based index of the last column in the range
AFlags
A set containing an entry for first and last column and row if their addresses are relative.
Compact
If the range consists only of a single cell and compact is true then the simple cell string is returned (e.g. A1). If compact is false then the cell is repeated (e.g. A1:A1)
Returns

Excel type of cell address range containing '$' characters for absolute address parts and a ':' to separate the first and last cells of the range

function GetCellRangeString_ODS(ASheet1, ASheet2: String; ARow1, ACol1, ARow2, ACol2: Cardinal; AFlags: TsRelFlags = rfAllRel; WithBrackets: Boolean = true): String; overload;

Calculates a cell range string with sheet specification in OpenDocument syntax

function GetCellRangeString_ODS(ARange: TsCellRange; AFlags: TsRelFlags = rfAllRel; Compact: Boolean = false; WithBrackets: Boolean = true): String; overload;

This item has no description.

function GetCellRangeString_ODS(ARow1, ACol1, ARow2, ACol2: Cardinal; AFlags: TsRelFlags = rfAllRel; Compact: Boolean = false; WithBrackets: Boolean = true): String; overload;

This item has no description.

function GetCellRangeString_R1C1(ARow1, ACol1, ARow2, ACol2: Cardinal; AFlags: TsRelFlags = [rfRelRow, rfRelCol]; ARefRow: Cardinal = Cardinal(-1); ARefCol: Cardinal = Cardinal(-1)): String; overload;

This item has no description.

function GetCellRangeString_R1C1(ASheet1, ASheet2: String; ARow1, ACol1, ARow2, ACol2: Cardinal; AFlags: TsRelFlags = [rfRelRow, rfRelCol]; ARefRow: Cardinal = Cardinal(-1); ARefCol: Cardinal = Cardinal(-1)): String; overload;

This item has no description.

function GetCellString(ARow,ACol: Cardinal; AFlags: TsRelFlags = [rfRelRow, rfRelCol]): String;

Calculates a cell address string from zero-based column and row indexes and the relative address state flags.

Example: ARowIndex = 0, AColIndex = 0, AFlags = [rfRelRow] –> $A1

Parameters
ARowIndex
Zero-based row index
AColIndex
Zero-based column index
AFlags
An optional set containing an entry for column and row if these addresses are relative. By default, relative addresses are assumed.
Returns

Excel type of cell address containing $ characters for absolute address parts.

function GetCellString_R1C1(ARow, ACol: Cardinal; AFlags: TsRelFlags = [rfRelRow, rfRelCol]; ARefRow: Cardinal = Cardinal(-1); ARefCol: Cardinal = Cardinal(-1)): String; overload;

Calculates a cell address string in R1C1 notation from zero-based column and row indexes and the relative address state flags.

Parameters
ARow
Zero-based row index
ACol
Zero-based column index
AFlags
An optional set containing an entry for column and row if these addresses are relative. By default, relative addresses are assumed.
@ARefRow
Zero-based row index of the reference cell in case of relative address.
@ARefCol
Zero-based column index of the reference cell in case of relative address.
Returns

Excel type of cell address in R1C1 notation.

function GetColorName(AColor: TsColor): String;

Determines the name of a color from its rgb value

function GetColString(AColIndex: Integer): String;

Calculates an Excel column name ('A', 'B' etc) from the zero-based column index

Parameters
AColIndex
Zero-based column index
Returns

Letter-based column name string. Can contain several letter in case of more than 26 columns

function GetErrorValueStr(AErrorValue: TsErrorValue): String;

Returns the message text assigned to an error value

Parameters
AErrorValue
Error code as defined by TsErrorvalue
Returns

Text corresponding to the error code.

function GetFileFormatName(AFormat: TsSpreadsheetFormat): string; deprecated;

Warning: this symbol is deprecated.

Returns the name of the given spreadsheet file format.

Note
This function is deprecated. Use GetSpreadFormatName or GetSpreadTechnicalName of fpsRegFileformats instead in order to be able to process user-defined formats as well.

Parameters
AFormat
Identifier of the file format
Returns

'BIFF2', 'BIFF3', 'BIFF4', 'BIFF5', 'BIFF8', 'OOXML', 'Open Document', 'CSV, 'WikiTable Pipes', or 'WikiTable WikiMedia"

function GetFontAsString(AFont: TsFont): String;

Combines the relevant font properties into a string

function GetFormatFromFileName(const AFileName: TFileName; out AFormatID: TsSpreadFormatID): Boolean; overload;

Determines the spreadsheet type from the file type extension

Parameters
AFileName
Name of the file to be considered
AFormatID
File format ID found from analysis of the extension (output)
Returns

True if the file matches any of the registered formats, False otherwise

function GetFormatFromFileName(const AFileName: TFileName; out SheetType: TsSpreadsheetFormat): Boolean; overload; deprecated 'Use overloaded function with TsSpreadsheetID';

Warning: this symbol is deprecated: Use overloaded function with TsSpreadsheetID

Determines the spreadsheet type from the file type extension

Parameters
AFileName
Name of the file to be considered
SheetType
Built-in file format found from analysis of the extension (output)
Returns

True if the file matches any of the built-in formats, False otherwise

function GetRowString(ARowIndex: Integer): String;

Calculates an Excel row name ('1', '2' etc) from the zero-based row index

Parameters
ARowIndex
Zero-based row index
Returns

Numerical, one-based row name string.

function GetSheetCellRangeString_ODS(ASheet1, ASheet2: String; ARow1, ACol1, ARow2, ACol2: Cardinal; AFlags: TsRelFlags = rfAllRel; WithBrackets: Boolean = true): String;

This item has no description.

function GetSheetCellString_ODS(ASheet: String; ARow, ACol: Cardinal; AFlags: TsRelFlags = rfAllRel; WithBrackets: Boolean = true): String;

This item has no description.

function Has3dFormula(ACell: PCell): Boolean;

Checks whether the specified cell contains a 3D formula, i.e. a reference to another sheet.

Parameters
ACell
Pointer to the cell checked
Returns

True if the cell contains a 3D formula.

function HasFormula(ACell: PCell): Boolean;

Checks whether the specified cell contains a formula.

Parameters
ACell
Pointer to the cell checked
Returns

True if the cell contains a formula.

function HasZipHeader(AStream: TStream): Boolean;

Returns True if the file begins with a ZIP header *PK'#03#04. Needed for file format detection.

function HighContrastColor(AColor: TsColor): TsColor;

Returns the color index for black or white depending on a color being "bright" or "dark".

Parameters
AColor
rgb color to be analyzed
Returns

The color index for black (scBlack) if AColorValue is a "bright" color, or white (scWhite) if AColorValue is a "dark" color.

function HTMLColorStrToColor(AValue: String): TsColor;

Converts a HTML color string to a TsColor alue. Needed for the ODS file format.

Parameters
AValue
HTML color string, such as '#FF0000'
Returns

rgb color value in little endian byte-sequence. This value is compatible with the TColor data type of the graphics unit.

function HTMLLengthStrToPts(AValue: String; DefaultUnits: String = 'pt'): Double;

Converts a HTML length string to points. The units are assumed to be the last two digits of the string, such as '1.25in'

Parameters
AValue
HTML string representing a length with appended units code, such as '1.25in'. These unit codes are accepted: 'px' (pixels), 'pt' (points), 'in' (inches), 'mm' (millimeters), 'cm' (centimeters).
DefaultUnits
String identifying the units to be used if not contained in AValue.
Returns

Extracted length in points

function IfThen(ACondition: Boolean; AValue1,AValue2: TsNumberFormat): TsNumberFormat; overload;

Helper function to reduce typing: "if a conditions is true return the first number format, otherwise return the second format"

Parameters
ACondition
Boolean expression
AValue1
First built-in number format code
AValue2
Second built-in number format code
Returns

AValue1 if ACondition is true, AValue2 otherwise.

function IfThen(ACondition: Boolean; AValue1,AValue2: Char): Char; overload;

This item has no description.

procedure InitCell(AWorksheet: TsBasicWorksheet; ARow, ACol: Cardinal; out ACell: TCell); overload;

Initalizes a new cell and presets the row and column fields of the cell record to the parameters passed to the procedure.

Parameters
AWorksheet
Pointer to the worksheet containing the cell
ARow
Row index of the new cell
ACol
Column index of the new cell
Returns

New cell record with row and column fields preset to passed values.

procedure InitCell(out ACell: TCell); overload;

Initalizes a new cell.

Returns

New cell record

procedure InitCryptoInfo(out AValue: TsCryptoInfo);

Initializes the fields of the encryption information block (TsCryptoInfo)

procedure InitFormatRecord(out AValue: TsCellFormat);

Initializes the fields of a TsCellFormaRecord

function InitFormatSettings(AWorkbook: TsBasicWorkbook): TFormatSettings;

Initializes the FormatSettingsRecord to international (non-localized) values

procedure InitHeaderFooterImageRecord(out AImage: TsHeaderFooterImage);

Initializes the fields of a TsHeaderFooterImage record

procedure InitImageRecord(out AValue: TsImage; ARow, ACol: Cardinal; AOffsetX, AOffsetY, AScaleX, AScaleY: Double);

Initializes the fields of a TsImage record

Parameters
ARow
Index of the anchor row
ACol
Index of the anchor column
AOffsetX
Distance of the left image edge from the left edge of the anchor column. Measured in the units defined by the workbook.
AOffsetY
Distance of the top image edge from the top edge of the anchor row. Measured in the units defined by the workbook.
Returns

TsImage record containing these values.

function InitReplaceParams(AReplaceText: String = ''; AOptions: TsReplaceOptions = []): TsReplaceParams;

Initializes a RecplaceParams record. This record defined how the cell content found after searching will be replaced

Parameters
AReplaceText
Is the text which will be inserted in the found cell
AOptions
Defines options for the replacement (see TsReplaceParams)
function InitSearchParams(ASearchText: String = ''; AOptions: TsSearchOptions = []; ASearchWithin: TsSearchWithin = swWorksheet): TsSearchParams;

Initializes a SearchParams record. This record defines the parameters needed when searching cells.

Parameters
ASearchText
This is the text to be searched
AOptions
Defines options for searching (see TsSearchOptions)
AWithin
Defines which part of the document is to be searched
function InitSortParams(ASortByCols: Boolean = true; ANumSortKeys: Integer = 1; ASortPriority: TsSortPriority = spNumAlpha): TsSortParams;

Initializes a Sortparams record. This record sets paramaters used when cells are sorted.

Parameters
ASortByCols
If True (default) sorting occurs along columns, i.e. the ColRowIndex of the sorting keys refer to column indexes. If False, sorting occurs along rows, and the ColRowIndexes refer to row indexes
ANumSortKeys
Determines how many columns or rows are used as sorting keys. (Default: 1). Every sort key is initialized for ascending sort direction and case-sensitive comparison.
ASortPriority
Determines the order or text and numeric data in mixed content type cell ranges. Default: spNumAlpha, i.e. numbers before text (in ascending sort)
Returns

The initializaed TsSortParams record

function IntegerToLE(AValue: Integer): Integer;

Converts an integer value from big-endian to little-endian byte-order.

Parameters
AValue
Big-endian integer value
Returns

Little-endian integer value

function InToEMU(AValue: Double): Int64; inline;

Converts inches to EMU (English metric units)

Parameters
AValue
Length value in inches
Returns

Value converted to EMU

function InToMM(AValue: Double): Double; inline;

Converts inches to millimeters

Parameters
AValue
Length value in inches
Returns

Value converted to mm

function InToPts(AValue: Double): Double; inline;

Converts inches to points (72 pts = 1 inch)

Parameters
AValue
Length value in inches
Returns

Value converted to points

function ISO8601StrToDateTime(s: String): TDateTime;

Converts an ISO8601-formatted date/time to TDateTime Assumes UTC when the input string ends with 'Z' and converts to local time.

function IsPaletteIndex(AColor: TsColor): Boolean;

Checks whether the specified TsColor represents a palette index

function LongRGBToExcelPhysical(const RGB: DWord): DWord;

Converts the RGB part of a LongRGB logical structure to its physical representation. In other words: RGBA (where A is 0 and omitted in the function call) => ABGR Needed for conversion of palette colors.

Parameters
RGB
DWord value containing RGBA bytes in big endian byte-order
Returns

DWord containing RGB bytes in little-endian byte-order (A = 0)

function LumModOff(AColor: TsColor; ALumMod, ALumOff: Double): TsColor;

Performs a luminance modulation and luminance offset operation. Inspired by LibreOffice (https://docs.libreoffice.org/tools/html/color_8cxx_source.html), but does not match Excel exactly.

Parameters
AColor
rgb color to be modified
ALumMod
Factor for luminance modulation. It is multiplied to the luminance of the color
ALumOff
Luminance offset, it is added to the luminance of the color
Returns

Modified color

function mmToEMU(AValue: Double): Int64; inline;

Converts millimeters to EMU (english metric units, 1 cm = 360000 EMU)

Parameters
AValue
Length value in millimeters
Returns

Value converted to EMU

function mmToIn(AValue: Double): Double; inline;

Converts millimeters to inches

Parameters
AValue
Length value in millimeters
Returns

Value converted to inches

function mmToPts(AValue: Double): Double; inline;

Converts millimeters to points (72 pts = 1 inch)

Parameters
AValue
Length value in millimeters
Returns

Value converted to points

function ParseCellColString(const AStr: string; out ACol: Cardinal): Boolean;

Parses a cell column string, like 'A' or 'CZ', into a zero-based column number. Note that there can be several letters to address more than 26 columns.

Parameters
AStr
Cell range string, such as A1
ACol
Zero-based index of the column (output)
Returns

False if the string is not a valid cell column string

function ParseCellRangeString(const AStr: string; out AFirstCellRow, AFirstCellCol, ALastCellRow, ALastCellCol: Cardinal): Boolean; overload;

Parses strings like A5:C10 into a range selection information. Information on relative/absolute cells is ignored.

Parameters
AStr
Cell range string, such as A5:C10
AFirstCellRow
Row index of the top/left cell of the range (output)
AFirstCellCol
Column index of the top/left cell of the range (output)
ALastCellRow
Row index of the bottom/right cell of the range (output)
ALastCellCol
Column index of the bottom/right cell of the range (output)
Returns

False if the string is not a valid cell range

function ParseCellRangeString(const AStr: string; out AFirstCellRow, AFirstCellCol, ALastCellRow, ALastCellCol: Cardinal; out AFlags: TsRelFlags): Boolean; overload;

Parses strings like A5:C10 into a range selection information. Returns in AFlags also information on relative/absolute cells.

Parameters
AStr
Cell range string, such as A5:C10
AFirstCellRow
Row index of the top/left cell of the range (output)
AFirstCellCol
Column index of the top/left cell of the range (output)
ALastCellRow
Row index of the bottom/right cell of the range (output)
ALastCellCol
Column index of the bottom/right cell of the range (output)
AFlags
A set containing an element for AFirstCellRow, AFirstCellCol, ALastCellRow, ALastCellCol if they represent relative cell addresses.
Returns

False if the string is not a valid cell range

function ParseCellRangeString(const AStr: String; out ASheet1, ASheet2: String; out ARow1, ACol1, ARow2, ACol2: Cardinal; out AFlags: TsRelFlags): Boolean; overload;

Parses a 3D cell and sheet range string in Excel A1 dialect. Returns the names of the limiting sheets and the indexes of the limiting borders. The function result is False if the provided string is not valid.

function ParseCellRangeString(const AStr: String; out ARange: TsCellRange): Boolean; overload;

Parses strings like A5:C10 into a range selection information. Information on relative/absolute cells is ignored.

Parameters
AStr
Cell range string, such as A5:C10
ARange
TsCellRange record of the zero-based row and column indexes of the top/left and right/bottom corrners
Returns

False if the string is not a valid cell range

function ParseCellRangeString(const AStr: String; out ARange: TsCellRange; out AFlags: TsRelFlags): Boolean; overload;

Parses strings like A5:C10 into a range selection information. Returns in AFlags also information on relative/absolute cells.

Parameters
AStr
Cell range string, such as A5:C10
ARange
TsCellRange record of the zero-based row and column indexes of the top/left and right/bottom corrners
AFlags
A set containing an element for ARange.Row1 (top row), ARange.Col1 (left column), ARange.Row2 (bottom row), ARange.Col2 (right column) if they represent relative cell addresses.
Returns

False if the string is not a valid cell range

function ParseCellRangeString_R1C1(const AStr: string; ABaseRow, ABaseCol: Cardinal; out AFirstCellRow, AFirstCellCol, ALastCellRow, ALastCellCol: Cardinal; out AFlags: TsRelFlags): Boolean;

Extracts information on cell range from a cellrange string in "R1C1" notation. Returns in AFlags also information on relative/absolute cells.

Parameters
AStr
Cell range string, in R1C1 syntax, such as R[2]C[3]:R[4]C[8]
ABaseRow
Row index from which the cell reference is seen.
ABaseCol
Column index from which the cell reference is seen.
AFirstCellRow
Row index of the top/left cell of the range (output)
AFirstCellCol
Column index of the top/left cell of the range (output)
ALastCellRow
Row index of the bottom/right cell of the range (output)
ALastCellCol
Column index of the bottom/right cell of the rng (output)
AFlags
A set containing an element for AFirstCellRow, AFirstCellCol, ALastCellRow, ALastCellCol if they represent a relative cell address.
Returns

False if the string is not a valid cell range

function ParseCellRangeString_R1C1(const AStr: String; ABaseRow, ABaseCol: Cardinal; out ASheet1, ASheet2: String; out ARow1, ACol1, ARow2, ACol2: Cardinal; out AFlags: TsRelFlags): Boolean; overload;

Parses a 3D cell and sheet range string in Excel R1C1 dialect. Returns the names of the limiting sheets and the indexes of the limiting row/col borders. The function result is False if the provided string is not valid.

Parameters
AStr
Cell range string, in R1C1 syntax, such as R[2]C[3]:R[4]C[8]
ABaseRow
Row index from which the cell range is seen.
ABaseCol
Column index from which the cell range is seen.
ASheet1
Name of the worksheet with the first cell of the 3D cell block (part before the colon) (output)
ASheet1
Name of the worksheet with the second cell of the 3D cell block (part after the colon) (output)
ARow1
Index of the left row of the 3D range (part before the colon)(output)
ACol1
Index of the top row of the 3D range (part before the colon) (output)
ARow2
Index of the right row of the 3D range (part after the colon) (output)
ACol2
Index of the bottom row of the 3D range (part after the colon) (output)
AFlags
A set containing element rfRow1, rfCol1, rfRow2, rfCol2 if the corresponding row/column indexes are relative addresses (output)
Returns

False if the string is not a valid cell range

function ParseCellRowString(const AStr: string; out ARow: Cardinal): Boolean;

Parses a cell row string to a zero-based row number.

Parameters
AStr
Cell row string, such as '1', 1-based!
ARow
Index of the row (zero-based!) (output)
Returns

False if the string is not a valid cell row string

function ParseCellString(const AStr: string; out ACellRow, ACellCol: Cardinal; out AFlags: TsRelFlags): Boolean; overload;

Parses a cell string, like 'A1' into zero-based column and row numbers Note that there can be several letters to address for more than 26 columns. 'AFlags' indicates relative addresses.

Example: "AMP$200" –> (rel) column 1029 (= 26*26*1 + 26*16 + 26 - 1) (abs) row = 199 (abs)

Parameters
AStr
Cell range string, such as A1
ACellRow
Row index of the top/left cell of the range (output)
ACellCol
Column index of the top/left cell of the range (output)
AFlags
A set containing an element for ACellRow and/or ACellCol, if they represent a relative cell address.
Returns

False if the string is not a valid cell range

function ParseCellString(const AStr: string; out ACellRow, ACellCol: Cardinal): Boolean; overload;

Parses a cell string, like 'A1' into zero-based column and row numbers Note that there can be several letters to address for more than 26 columns.

For compatibility with old version which does not return flags for relative cell addresses.

Parameters
AStr
Cell range string, such as A1
ACellRow
Row index of the top/left cell of the range (output)
ACellCol
Column index of the top/left cell of the range (output)
Returns

False if the string is not a valid cell reference

function ParseCellString_R1C1(const AStr: string; ABaseRow, ABaseCol: Cardinal; out ACellRow, ACellCol: Cardinal): Boolean; overload;

Parses a cell string in "R1C1" notation into zero-based column and row numbers

For compatibility with old version which does not return flags for relative cell addresses.

Parameters
AStr
Cell reference in R1C1 syntax, such as R[2]C[3] or R1C5
ABaseRow
Row index from which the cell reference is seen.
ABaseCol
Column index from which the cell reference is seen.
ACellRow
Row index of cell (output)
ACellCol
Column index of the cell (output)
Returns

False if the string is not a valid cell address

function ParseCellString_R1C1(const AStr: String; ABaseRow, ABaseCol: Cardinal; out ASheet: String; out ACellRow, ACellCol: Cardinal; out AFlags: TsRelFlags): Boolean; overload;

Extracts a cell's row and column index from a string in "R1C1" notation. Returns in AFlags also information on relative/absolute cells.

Parameters
AStr
Cell string, in R1C1 syntax, such as R[2]C[3] or R1C5
ABaseRow
Row index from which the cell reference is seen.
ABaseCol
Column index from which the cell reference is seen.
ASheet
Name of the worksheet which contains the cell (output)
ACellRow
Row index of cell (output)
ACellCol
Column index of cell (output)
AFlags
A set containing an element for AFirstCellRow, AFirstCellCol, ALastCellRow, ALastCellCol if they represent a relative cell address. (output)
Returns

False if the string is not a valid cell reference

function ParseCellString_R1C1(const AStr: String; ABaseRow, ABaseCol: Cardinal; out ACellRow, ACellCol: Cardinal; out AFlags: TsRelFlags): Boolean; overload;

Parses a cell string in "R1C1" notation into zero-based column and row numbers AFlags indicates relative addresses.

Parameters
AStr
Cell reference in R1C1 syntax, such as R[2]C[3] or R1C5
ABaseRow
Zero-based row index from which the cell reference is seen.
ABaseCol
Zero-based column index from which the cell reference is seen.
ACellRow
Zero-based row index of the cell (output)
ACellCol
Zero-based column index of cell (output)
AFlags
A set containing rfRelRow and/or rfRelCol if the row and/or column index is relative to the base cell (output).
Returns

False if the string is not a valid cell address

function ParseIntervalString(const AStr: string; out AFirstCellRow, AFirstCellCol, ACount: Cardinal; out ADirection: TsSelectionDirection): Boolean;

Parses strings like A5:A10 into an selection interval information

Parameters
AStr
Cell range string, such as A5:A10
AFirstCellRow
Row index of the first cell of the range (output)
AFirstCellCol
Column index of the first cell of the range (output)
ACount
Number of cells included in the range (output)
ADirection
fpsVerticalSelection if the range is along a column, fpsHorizontalSelection if the range is along a row
Returns

False if the string is not a valid cell range

function ParseSheetCellString(const AStr: String; out ASheetName: String; out ACellRow, ACellCol: Cardinal; ASheetSeparator: Char = '!'): Boolean;

Parses a full cell string, like 'Sheet1!A1' into zero-based column and row numbers Note that there can be several letters to address for more than 26 columns.

For compatibility with old version which does not return flags for relative cell addresses.

Parameters
AStr
Cell range string, such as A1
ASheetName
Name of the worksheet which contains the cell (output)=
ACellRow
Row index of the cell (output)
ACellCol
Column index of the cell (output)
ASheetSeparator
Character which separates the worksheet name from the cell reference string. By default this is '!' as used by Excel.
Returns

False if the string is not a valid cell reference

function PtsToCm(AValue: Double): Double; inline;

Converts points to centimeters

Parameters
AValue
Length value in points
Returns

Value converted to centimeters

function PtsToIn(AValue: Double): Double; inline;

Converts points to inches (72 pts = 1 inch)

Parameters
AValue
Length value in points
Returns

Value converted to inches

function PtsToMM(AValue: Double): Double; inline;

Converts points to millimeters

Parameters
AValue
Length value in points
Returns

Value converted to millimeters

function PtsToPx(AValue: Double; AScreenPixelsPerInch: Integer): Integer; inline;

Converts points to pixels

Parameters
AValue
Length value given in points
AScreenPixelsPerInch
Pixels per inch of the screen
Returns

Value converted to pixels

function PtsToTwips(AValue: Single): Integer; inline;

Converts points to twips (1 twip = 1/20 point)

Parameters
AValue
Length value in points
Returns

Value converted to twips

function pxToPts(AValue: Double; AScreenPixelsPerInch: Integer): Double; inline; overload;

This item has no description.

function pxToPts(AValue, AScreenPixelsPerInch: Integer): Double; inline; overload;

Converts pixels to points.

Parameters
AValue
Length value given in pixels
AScreenPixelsPerInch
Pixels per inch of the screen
Returns

Value converted to points

function RandomString(ALen: Integer): String;

This item has no description.

function Range(ARow1, ACol1, ARow2, ACol2: Cardinal): TsCellRange; overload;

Creates a TsCellRange record from the provided cell corner coordinates. Puts the coordinates into right order if needed.

function Range(ARow, ACol: Cardinal): TsCellRange; overload;

Creates a TsCellRange record from the coordinates of a single cell. The second corner coordinates are set equal to the first corner coordinates.

function Range3D(ASheetIdx1, ASheetIdx2: Integer; ARow1, ACol1, ARow2, ACol2: Cardinal): TsCellRange3D;

This item has no description.

function Round(AValue: Double): Int64;

Special rounding function which avoids banker's rounding

function SafeQuoteStr(AString: String): String;

Makes sure that the string is encloed by quotes ("). Avoids duplicate quotation.

function SameCellBorders(AFormat1, AFormat2: PsCellFormat): Boolean;

This item has no description.

function SameFont(AFont: TsFont; AFontName: String; AFontSize: Single; AStyle: TsFontStyles; AColor: TsColor; APos: TsFontPosition): Boolean; overload;

Checks whether two fonts are equal

Parameters
AFont1
Pointer to the first font to be compared
AFont2
Pointer to the second font to be compared
function SameFont(AFont1, AFont2: TsFont): Boolean; overload;

Checks whether two fonts are equal

Parameters
AFont1
Pointer to the first font to be compared
AFont2
Pointer to the second font to be compared
function SameRichTextParams(ARtp1, ARtp2: TsRichTextparams): Boolean;

Checks wether ARtp1 and ARtp2 are the same rich-text parameters.

function SetAsPaletteIndex(AIndex: Integer): TsColor;

Constructs a TsColor from a palette index. It has bit 15 in the high-order byte set.

function SheetNameNeedsQuotes(ASheet: String): Boolean;

Determines whether a worksheet name must to be quoted. This is needed when the name begins with a numeral or a period, or when the name contains a space character. Also required if the name contains '<' or '>'.

Parameters
ASheet
Name of the worksheet to be analyzed
Returns

True when the sheet name must be quoted, False otherwise

procedure SplitHyperlink(AValue: String; out ATarget, ABookmark: String);

Splits a hyperlink string at the # character.

Parameters
AValue
Hyperlink string to be processed
ATarget
Part before the # ("Target")
ABookmark
Part after the # ("Bookmark")
function SplitStr(const AText: String; ADelimiter: Char): TStringArray;

Splits a string at the specified delimiters into individual strings and passes them in an array.

procedure SplitTextAndRichTextParams(AValue: String; out AText: String; out ARichText: TsRichTextParams);

Split text and rich-text parameters from the combined string needed for StringHashList

function StringToBytes(const AString: String): TBytes;

Copies a string to a TBytes variable

@param AString The string to be copied @returns A dynamic array of byte, type TBytes

function TintedColor(AColor: TsColor; tint: Double): TsColor;

Excel defines theme colors and applies a "tint" factor (-1...+1) to darken or brighten them.

This method "tints" a given color with a factor

The algorithm is described in http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.backgroundcolor.aspx

Parameters
AColor
rgb color to be modified
tint
Factor (-1...+1) to be used for the operation
Returns

Modified color

function TryFractionStrToFloat(AText: String; out ANumber: Double; out AIsMixed: Boolean; out AMaxDigits: Integer): Boolean;

Assumes that the specified text is a string representation of a mathematical fraction and tries to extract the floating point value of this number. Returns also the maximum count of digits used in the numerator or denominator of the fraction

Example: AText := '1 3/4' –> ANumber = 1.75; AMaxDigits = 1; Result = true

Parameters
AText
String to be considered
ANumber
(out) value of the converted floating point number
AMaxDigits
Maximum count of digits used in the numerator or denominator of the fraction
Returns

True if a number value can be retrieved successfully, False otherwise

function TryPercentStrToFloat(AText: String; out ANumber: Double): Boolean;

Converts a percent-formatted string to a decimal number. Example: '150%' –> 1.5

function TryStrToCellRange_ODS(const AStr: String; var ASheet1, ASheet2: String; var ARow1, ACol1, ARow2, ACol2: Cardinal; var AFlags: TsRelFlags): Boolean;

Extracts sheets names and cell coordinates from a cell range string in OpenDocument syntax, e.g. "Table1.A1:Table2.B4"

function TryStrToErrorValue(AErrorStr: String; out AErr: TsErrorValue): boolean;

Returns the error value code from a string. Result is False, if the string does not match one of the predefined error strings.

Parameters
AErrorStr
Error string
AErr
Corresponding error value code (type TsErrorValue)
Returns

True if error code could be determined from the error string, False otherwise.

function TryStrToErrorValue(AErrorStr: String; SheetSep: Char; out ASheetName: String; out AErr: TsErrorValue): Boolean;

This item has no description.

function TryStrToFloatAuto(AText: String; out ANumber: Double; out ADecimalSeparator, AThousandSeparator: Char; out AWarning: String): Boolean;

Converts a string to a floating point number. No assumption on decimal and thousand separator are made.

Is needed for reading CSV files.

function TwipsToPts(AValue: Integer): Single; inline;

Excel's unit of row heights is "twips", i.e. 1/20 point. Converts Twips to points.

Parameters
AValue
Length value in twips
Returns

Value converted to points

function UnquoteStr(AString: String): String;

Removes quotation characters which enclose a string

procedure Unused(const A1);

Silence warnings due to an unused parameter

procedure Unused(const A1, A2);

Silence warnings due to two unused parameters

procedure Unused(const A1, A2, A3);

Silence warnings due to three unused parameters

function UTF8CodePoints(AText: string; out sa: TStringArray): Boolean;

Splits the UTF8-encoded string into its code-points ("characters") and returns them as an array of string (sa). The result of the function is false if at least one codepoint is broken UTF8.

function ValidUTF8Text(var AText: String): Boolean;

This item has no description.

function WideStringLEToN(const AValue: WideString): WideString;

Converts a widestring from little-endian to big-endian byte-order.

Parameters
AValue
Little-endian widestring
Returns

Big-endian widestring

function WideStringToLE(const AValue: WideString): WideString;

Converts a widestring from big-endian to little-endian byte-order.

Parameters
AValue
Big-endian widestring
Returns

Little-endian widestring

function WordLEtoN(AValue: Word): Word;

Converts a word value from little-endian to big-endian byte-order.

Parameters
AValue
Little-endian word value
Returns

Big-endian word value

function WordToLE(AValue: Word): Word;

WordLEToLE converts a word value from big-endian to little-endian byte order.

Parameters
AValue
Big-endian word value
Returns

Little-endian word value

Types

TAnsiCharSet = set of ansichar;

Set of ansi characters

TsSelectionDirection = (...);

Selection direction along column or along row

Values
  • fpsVerticalSelection
  • fpsHorizontalSelection
TStringArray = array of string;

Array of strings

Constants

ISO8601Format='yyyymmdd"T"hhmmss';

Date formatting string for unambiguous date/time display as strings Can be used for text output when date/time cell support is not available

ISO8601FormatDateOnly='yyyy"-"mm"-"dd';

ISO 8601 date-only format, used in ODF/opendocument

ISO8601FormatExtended='yyyy"-"mm"-"dd"T"hh":"mm":"ss';

Extended ISO 8601 date/time format, used in e.g. ODF/opendocument

ISO8601FormatExtendedUTC='yyyy"-"mm"-"dd"T"hh":"mm":"ss"Z"';

Extended ISO 8601 date/time format, as UTC

ISO8601FormatHoursOverflow='"PT"[hh]"H"nn"M"ss.zz"S"';

ISO 8601 time-only format, with hours overflow

ISO8601FormatTimeOnly='"PT"hh"H"nn"M"ss"S"';

ISO 8601 time-only format, used in ODF/opendocument

Variables

ScreenPixelsPerInch: Integer = 96;

Default value for the screen pixel density (pixels per inch). Is needed for conversion of distances to pixels


fpsUtils: Record TRGBA

Record TRGBA

Description
Hierarchy
Fields
Methods
Properties

Unit

fpsUtils

Declaration

type TRGBA = record

Description

Color value, composed of r(ed), g(reen) and b(lue) components

Overview

Fields

Public | r: byte
Public | g: byte
Public | b: byte
Public | a: byte

Description

Fields

Public r: byte

This item has no description.

Public g: byte

This item has no description.

Public b: byte

This item has no description.

Public a: byte

This item has no description.


Class Hierarchy

  • IInterface
    • IsSpreadsheetControl
  • TCustomComboBox
    • TsCellCombobox
    • TsWorksheetIndicator
  • TCustomDrawGrid
    • TsCustomWorksheetGrid
      • TsWorksheetGrid
  • TCustomEdit
    • TsCellIndicator
  • TMemo
    • TsCellEdit
    • TsMultilineStringCellEditor
  • TObject
    • Exception
      • EFpSpreadsheet
        • EFpSpreadsheetReader
        • EFpSpreadsheetWriter
    • TFPList
      • TsNumFormatList
    • TFPObjectList
      • TsCFRules
      • TsChartDataPointStyleList
      • TsChartGradientList
      • TsChartHatchList
      • TsChartImagelist
      • TsChartLineStyleList
      • TsChartSeriesList
      • TsConditionalFormatList
    • TList
      • TObjectList
        • TsChartList
    • TPersistent
      • TComponent
        • TsWorkbookSource
    • TsBasicWorkbook
      • TsWorkbook
    • TsBasicWorksheet
      • TsWorksheet
    • TsCFRule
      • TsCFCellRule
      • TsCFColorRangeRule
      • TsCFDatabarRule
      • TsCFIconSetRule
    • TsChartCellAddr
    • TsChartElement
      • TsChartErrorBars
      • TsChartFillElement
        • TsChart
        • TsChartAxis
        • TsChartDataPointStyle
        • TsChartLegend
        • TsChartText
      • TsChartSeries
        • TsAreaSeries
        • TsBarSeries
        • TsCustomLineSeries
          • TsCustomScatterSeries
            • TsBubbleSeries
            • TsScatterSeries
          • TsLineSeries
            • TsRadarSeries
              • TsFilledRadarSeries
        • TsPieSeries
        • TsStockSeries
    • TsChartFill
    • TsChartGradient
    • TsChartHatch
    • TsChartImage
    • TsChartLine
    • TsChartLineStyle
    • TsChartRange
    • TsChartTrendline
    • TsConditionalFormat
    • TsEmbeddedObj
    • TsFont
    • TsMetaData
    • TsNumFormatParams
    • TsNumFormatParser
    • TsTrendlineEquation
  • TPen
    • TsSelPen
  • TTabControl
    • TsWorkbookTabControl
  • TValueListEditor
    • TsSpreadsheetInspector


All Classes, Interfaces, Objects and Records

Name Unit Description
EFpSpreadsheet fpsTypes

Ancestor of the fpSpreadsheet exceptions
EFpSpreadsheetReader fpsTypes

Class of exceptions fired by the workbook reader
EFpSpreadsheetWriter fpsTypes

Class of exceptions fired for the workbook writer
IsSpreadsheetControl fpspreadsheetctrls

Interface which allows the workbook source to notify linked controls of changes in the associated workbook.
TCell fpsTypes

Cell structure for TsWorksheet The cell record contains information on the location of the cell (row and column index), on the value contained (number, date, text, ...), on formatting, etc.

Never suppose that all *Value fields are valid, only one of the ContentTypes is valid. For other fields use TsWorksheet.ReadAsText and similar methods

TCol fpsTypes

The record TCol contains information about a spreadsheet column:

Only columns with non-default width or non-default format or non-default Options have a column record.
TRGBA fpsUtils

Color value, composed of r(ed), g(reen) and b(lue) components
TRow fpsTypes

The record TRow contains information about a spreadsheet row:

Only rows with non-default height or non-default format or non-default Options have a row record.
TRPNItem fpsRPN

Helper record for simplification of RPN formula creation

TsAreaSeries fpsChart

TsBarSeries fpsChart

TsBasicWorkbook fpsTypes

Basic worksheet class to avoid circular unit references. It contains only those properties and methods which do not require any other unit than fpstypes.
TsBasicWorksheet fpsTypes

Basic worksheet class to avoid circular unit references. It has only those properties and methods which do not require any other unit than fpstypes.
TsBubbleSeries fpsChart

TsCellBorderStyle fpsTypes

The Cell border style reocrd contains the linestyle and color of a cell border. There is a CellBorderStyle for each border.

TsCellCombobox fpspreadsheetctrls

TsCellCombobox is a multi-purpose combobox for selection of formatting items of a cell
TsCellCoord fpsTypes

Record combining a cell's row and column indexes

TsCellEdit fpspreadsheetctrls

TsCellEdit allows to edit the content or formula of the active cell of a worksheet, simular to Excel's cell editor above the cell grid.
TsCellFormat fpsTypes

Record containing all details for cell formatting
TsCellIndicator fpspreadsheetctrls

TsCellIndicator displays the address of the currently active cell of the worksheet and workbook. Editing the address allows to jump to the corresponding cell.
TsCellRange fpsTypes

Record combining row and column corner indexes of a range of cells

TsCellRange3d fpsTypes

Record combining sheet index and row/column corner indexes of a 3d cell range

TsCFCellRule fpsConditionalFormat

TsCFColorRangeRule fpsConditionalFormat

TsCFDatabarRule fpsConditionalFormat

TsCFIconSetRule fpsConditionalFormat

TsCFRule fpsConditionalFormat

TsCFRules fpsConditionalFormat

Rule for a conditional format
TsChart fpsChart

TsChartAxis fpsChart

TsChartCellAddr fpsChart

TsChartColor fpsChart

TsChartDataPointStyle fpsChart

TsChartDataPointStyleList fpsChart

TsChartElement fpsChart

TsChartErrorBars fpsChart

TsChartFill fpsChart

TsChartFillElement fpsChart

TsChartGradient fpsChart

TsChartGradientList fpsChart

TsChartGradientStep fpsChart

TsChartHatch fpsChart

TsChartHatchList fpsChart

TsChartImage fpsChart

TsChartImagelist fpsChart

TsChartLegend fpsChart

TsChartLine fpsChart

TsChartLineSegment fpsChart

TsChartLineStyle fpsChart

TsChartLineStyleList fpsChart

TsChartList fpsChart

TsChartRange fpsChart

TsChartSeries fpsChart

TsChartSeriesList fpsChart

TsChartText fpsChart

TsChartTrendline fpsChart

TsComment fpsTypes

The record TsComment describes a comment attached to a cell.

TsConditionalFormat fpsConditionalFormat

Conditional format item. These items are stored in an instance of TsConditionalFormatList.
TsConditionalFormatList fpsConditionalFormat

List of conditional formats. Maintained by the workbook.
TsCryptoInfo fpsTypes

Record collection information for encryption/decryption
TsCSVParams fpsTypes

Parameters controlling reading from and writing to CSV files

TsCustomLineSeries fpsChart

TsCustomScatterSeries fpsChart

TsCustomWorksheetGrid fpspreadsheetgrid

TsCustomWorksheetGrid is the ancestor of TsWorksheetGrid and is able to display spreadsheet data along with their formatting.
TsEmbeddedObj fpsImages

TsFilledRadarSeries fpsChart

TsFillPattern fpsTypes

Fill pattern record
TsFont fpsTypes

Font record used in fpspreadsheet. Contains the font name, the font size (in points), the font style, and the font color.
TsFormulaElement fpsTypes

Elements of an expanded RPN formula.

Note
If ElementKind is fekCellOffset, "Row" and "Col" have to be cast to signed integers!
TsHeaderFooterImage fpsTypes

Image embedded in header or footer

TsHyperlink fpsTypes

The record TsHyperlink contains info on a hyperlink in a cell

TsImage fpsTypes

Embedded image

TsLineSeries fpsChart

TsMetaData fpsTypes

Workbook metadata
TsMultilineStringCellEditor fpspreadsheetgrid

TSngPoint fpsChart

TsNumFormatElement fpsNumFormat

Element of the parsed number format sequence. Each element is identified by a token and has optional parameters stored as integer, float, and/or text.

TsNumFormatList fpsNumFormat

List containing parsed number format parameters
TsNumFormatParams fpsNumFormat

Describes a parsed number format and provides all the information to convert a number value to a number or date/time string. These data are created by the number format parser from a format string.
TsNumFormatParser fpsNumFormat

TsNumFormatSection fpsNumFormat

Number format string can be composed of several parts separated by a semicolon. The number format parser extracts the format information into individual sections for each part
TsPieSeries fpsChart

TsRadarSeries fpsChart

TsReplaceParams fpsTypes

Replace parameters
TsRichTextParam fpsTypes

Parameter describing formatting of an text range in cell text

at which the FontIndex should be used. be used for painting the characters following the FirstIndex. the character at FirstIndex.
TsRowColRange fpsTypes

Record containing limiting indexes of column or row range

TsScatterSeries fpsChart

TsSearchParams fpsTypes

Search parameters
TsSelPen fpspreadsheetgrid

TsSortKey fpsTypes

Sort key: parameters for sorting

TsSortParams fpsTypes

Complete set of sorting parameters

TsSpreadsheetFormatLimitations fpsTypes

This record collect limitations of a particular file format.

TsSpreadsheetInspector fpspreadsheetctrls

TsSpreadsheetInspector displays all properties of a workbook, worksheet, cell content and cell formatting in a way similar to the Object Inspector of Lazarus.
TsStockSeries fpsChart

TsTrendlineEquation fpsChart

TsWorkbook fpSpreadsheet

The workbook contains the worksheets and provides methods for reading from and writing to file.
TsWorkbookSource fpspreadsheetctrls

TsWorkbookSource links a workbook to the visual spreadsheet controls and help to display or edit the workbook without written code.
TsWorkbookTabControl fpspreadsheetctrls

TsWorkbookTabControl is a tab control which displays the sheets of the workbook currently loaded by the WorkbookSource in tabs. Selecting another tab is communicated to other spreadsheet controls via the WorkbookSource.
TsWorksheet fpSpreadsheet

The worksheet contains a list of cells and provides a variety of methods to read or write data to the cells, or to change their formatting.
TsWorksheetGrid fpspreadsheetgrid

TsWorksheetGrid is a grid which displays spreadsheet data along with formatting. As it is linked to an instance of TsWorkbook, it provides methods for reading data from or writing to spreadsheet files. It has the same funtionality as TsCustomWorksheetGrid, but has published all properties.
TsWorksheetIndicator fpspreadsheetctrls

TsWorksheetIndicator is a combobox control which displays the sheets of the workbook currently loaded by the WorkbookSource.


All Types

Name Unit Description
PCell fpsTypes

Pointer to a TCell record
PCol fpsTypes

Pointer to a TCol record
PRow fpsTypes

Pointer to a TRow record
PRPNItem fpsRPN

Pointer to a TPRNItem record

PsCellFormat fpsTypes

Pointer to a TsCellFormat record
PsCellRange fpsTypes

Pointer to a TsCellRange record
PsComment fpsTypes

Pointer to a TsComment record
PsHyperlink fpsTypes

Pointer to a TsHyperlink record
PsImage fpsTypes

Pointer to a TsImage record
PsNumFormatSection fpsNumFormat

Pointer to a parsed number format section
TAnsiCharSet fpsUtils

Set of ansi characters
TBasicOperationTokens fpsTypes

These tokens identify basic operations in RPN formulas.
TCellContentType fpsTypes

Describes the type of content in a cell of a TsWorksheet

TFEKind fpsTypes

Tokens to identify the elements in an expanded RPN formula.

Note
When adding or rearranging items

  • make sure that the subtypes TOperandTokens and TBasicOperationTokens are complete

  • make sure to keep the table "TokenIDs" in unit xlscommon in sync
TGetImageSizeFunc fpsImages

TOperandTokens fpsTypes

These tokens identify operands in RPN formulas.
TsAutoExpandMode fpspreadsheetgrid

TsAutoExpandModes fpspreadsheetgrid

TsBiDiMode fpsTypes

Switch a cell from left-to-right to right-to-left orientation
TsBubbleSizeMode fpsChart

TsCalcState fpsTypes

Cell calculation state

being calculated. result is stored in the cell's data fields.
TsCallback fpsTypes

Callback function, e.g. for iterating the internal AVL trees of the workbook/sheet
TsCellBorder fpsTypes

Indicates the border for a cell. If included in the CellBorders set the corresponding border is drawn in the style defined by the CellBorderStyle.

TsCellBorders fpsTypes

Indicates the border for a cell
TsCellBorderStyles fpsTypes

The cell border styles of each cell border are collected in this array.
TsCellCompareEvent fpSpreadsheet

This event can be used to override the built-in comparing function which is called when cells are sorted.
TsCellEvent fpSpreadsheet

This event fires whenever a cell value or cell formatting changes. It is handled by TsWorkbookSource to update the listening visual controls.
TsCellFlag fpsTypes

Cell flag providing particular information about the state of a cell

TsCellFlags fpsTypes

Set of cell flags
TsCellFormatItem fpspreadsheetctrls

TsCellFullCompareEvent fpSpreadsheet

This event can be used to override the built-in comparing function which is called when cells are sorted.
TsCellProtection fpsTypes

Cell protection options
TsCellProtections fpsTypes

TsCellRange3dArray fpsTypes

Array of 3d cell ranges
TsCellRangeArray fpsTypes

Array with cell ranges
TsCFCondition fpsConditionalFormat

Enumeration of the available conditions to be fulfilled by a cell value in conditional formatting
TsCFIconSet fpsConditionalFormat

Enumeration of the icon sets available for conditional formatting
TsCFValueKind fpsConditionalFormat

Enumeration of the criteria to be fulfilled by the values used in "color range" and "data bar" conditional formatting.
TsChartAxisAlignment fpsChart

TsChartAxisLink fpsChart

TsChartAxisPosition fpsChart

TsChartAxisTick fpsChart

TsChartAxisTicks fpsChart

TsChartDataLabel fpsChart

TsChartDataLabels fpsChart

TsChartErrorBarKind fpsChart

TsChartFillStyle fpsChart

TsChartGradientSteps fpsChart

TsChartGradientStyle fpsChart

TsChartHatchStyle fpsChart

TsChartInterpolation fpsChart

TsChartLabelCalloutShape fpsChart

TsChartLabelPosition fpsChart

TsChartLegendPosition fpsChart

TsChartSeriesClass fpsChart

TsChartSeriesSymbol fpsChart

TsChartStackMode fpsChart

TsChartType fpsChart

TsColEvent fpSpreadsheet

This event fires whenever a column width or column format changes. It is handled by TsWorkbookSource to update the listening visual controls.
TsColor fpsTypes

Colors in fpspreadsheet are given as rgb values in little-endian notation (i.e. "r" is the low-value byte). The highest-value byte, if not zero, indicates special colors.

Note
This byte order in TsColor is opposite to that in HTML colors.
TsColorNameEvent fpspreadsheetctrls

TsColRowOption fpsTypes

Column or row options

TsColRowOptions fpsTypes

TsColWidthtype fpsTypes

Types of column widths

TsCompareOperation fpsTypes

Identifier for a compare operation
TsCopyOperation fpsTypes

Identifier for a copy operation
TsCryptoAlgorithm fpsTypes

Algorithm used for encryption/decryption
TsCSVLineEnding fpsTypes

Line ending used in CSV files
TsDecsChars fpsNumFormat

Set of characters
TsEditorLineMode fpspreadsheetgrid

TsErrorValue fpsTypes

Error code values

TsFillStyle fpsTypes

Style of fill pattern for cell backgrounds
TsFontArray fpsTypes

Array of font records
TsFontPosition fpsTypes

Font position (subscript or superscript)

TsFontStyle fpsTypes

Font style (redefined to avoid usage of graphics unit)

TsFontStyles fpsTypes

Set of font styles
TsFormatTarget fpspreadsheetctrls

TsFormulaCorrection fpSpreadsheet

FSome action has an effect on existing formulas which must be corrected.
TsFormulaDialect fpsTypes

Formula dialect

TsFormulaFlag fpsTypes

Flag indicating the calculation state of a formula.

TsFormulaFlags fpsTypes

Set of formula calculation state flags, TsFormulaFlag
TsGetCellTextEvent fpspreadsheetgrid

TsHeaderFooterImages fpsTypes

Array with all possible images in a header or a footer
TsHeaderFooterSectionIndex fpsTypes

Headers and footers are divided into three parts: left, center and right
TsHorAlignment fpsTypes

Indicates horizontal text alignment in cells

TsHyperlinkClickEvent fpspreadsheetgrid

TsImageType fpsImages

TsInspectorExpandedNode fpspreadsheetctrls

Inspector expanded nodes
TsInspectorExpandedNodes fpspreadsheetctrls

TsInspectorMode fpspreadsheetctrls

Classification of data displayed by the SpreadsheetInspector. Each item can be assigned to a tab of a TabControl.
TsLineStyle fpsTypes

Line style (for cell borders)

TsNotificationItem fpspreadsheetctrls

Describes during communication between WorkbookSource and visual controls which kind of item has changed: the workbook, the worksheet, a cell value, or a cell formatting, etc.
TsNotificationItems fpspreadsheetctrls

This set accompanies the notification between WorkbookSource and visual controls and describes which items have changed in the spreadsheet.
TsNotifyEvent fpSpreadsheet

TsNumberFormat fpsTypes

Builtin number formats. Only uses a subset of the default formats, enough to be able to read/write date/time values. nfCustom allows to apply a format string directly.
TsNumFormatElements fpsNumFormat

Array of parsed number format elements
TsNumFormatKind fpsNumFormat

Summary information classifying a number format section
TsNumFormatKinds fpsNumFormat

Set of summary elements classifying and describing a number format section
TsNumFormatParamsClass fpsNumFormat

Class of number format parameters
TsNumFormatSections fpsNumFormat

Array of parsed number format sections
TsNumFormatToken fpsNumFormat

Tokens used by the elements of the number format parser. If, e.g. a format string is "0.000" then the number format parser detects the following three tokens

nftIntZeroDigit with integer value 1 (i.e. 1 zero-digit for the integer part) nftDecSep (i.e. decimal separator) ntZeroDecs with integer value 2 (i.e. 3 decimal places.
TsOnQueryPassword fpsTypes

TsPageOrientation fpsTypes

Page orientation for printing

TsPrintOption fpsTypes

Options for the print layout records
TsPrintOptions fpsTypes

Set of options used by the page layout
TsReadWriteFlag fpsTypes

Flag set during reading or writing of a workbook

TsRelFlag fpsTypes

Flags to mark the address or a cell or a range of cells to be absolute or relative. They are used in the set TsRelFlags.

TsRelFlags fpsTypes

Flags to mark the address of a cell or a range of cells to be absolute or relative. It is a set consisting of TsRelFlag elements.
TsRemoveWorksheetEvent fpSpreadsheet

Event procedure called when a worksheet is removed. ASheetIndex = -1 –> all sheets
TsReplaceOption fpsTypes

Replace option
TsReplaceOptions fpsTypes

A set of replace options
TsRichTextParams fpsTypes

Parameters describing formatting of text ranges in cell text
TsRowEvent fpSpreadsheet

This event fires whenever a row height or row format changes. It is handled by TsWorkbookSource to update the listening visual controls
TsRowHeightType fpsTypes

Types of row heights

TsRPNFormula fpsTypes

RPN formula. Similar to the expanded formula, but in RPN notation. Simplifies the task of format writers which need RPN
TsSearchOption fpsTypes

Search option
TsSearchOptions fpsTypes

A set of search options
TsSearchWithin fpsTypes

Defines which part of document is scanned
TsSelectionDirection fpsUtils

Selection direction along column or along row
TsSheetOption fpsTypes

Worksheet user interface options:

TsSheetOptions fpsTypes

Set of user interface options (

TsSizeUnits fpsTypes

Units for size dimensions

Adjustment of the fpsutils.ScreenPixelsPerInch is required for accurate values in case of high-resolution monitors.
TsSliceOrder fpsChart

TsSortKeys fpsTypes

Array of sort keys for multiple sorting criteria
TsSortOption fpsTypes

Options for sorting numeric characters
TsSortOptions fpsTypes

Set of options for sorting
TsSortPriority fpsTypes

Sort priority i.e. will be put before text i.e. will be sorted after text.
TsSpreadFormatID fpsTypes

Numerical identifier for file formats, built-in and user-provided
TsSpreadFormatIDArray fpsTypes

Array of file format identifiers
TsSpreadsheetFormat fpsTypes

Built-in file formats of fpspreadsheet

TsStreamParam fpsTypes

Parameters for stream access
TsStreamParams fpsTypes

TsTextRotation fpsTypes

Text rotation formatting. The text is rotated relative to the standard orientation, which is from left to right horizontal:

       >
       ABC

So 90 degrees clockwise means that the text will be:

|  A
|  B
v  C

And 90 degree counter clockwise will be:

ˆ  C
|  B
|  A

Due to limitations of the text mode the characters are not rotated here. There is, however, also a "stacked" variant which looks exactly like the 90-degrees-clockwise case.

TsTrendlineType fpsChart

TStringArray fpsUtils

Array of strings
TsUsedFormattingField fpsTypes

List of possible formatting fields

TsUsedFormattingFields fpsTypes

Describes which formatting fields are active (see TsUsedFormattingField).
TsVertAlignment fpsTypes

Indicates vertical text alignment in cells

TsWorkbookEvent fpSpreadsheet

Event procedure containing a specific workbook
TsWorkbookOption fpsTypes

Option flags for the workbook

TsWorkbookOptions fpsTypes

Set of option flags for the workbook (see TsWorkbookOption
TsWorkbookProtection fpsTypes

Workbook protection options
TsWorkbookProtections fpsTypes

TsWorkbookReadCellDataEvent fpSpreadsheet

Event fired when reading a file in virtual mode. Read data are provided in the "ADataCell" (which is not added to the worksheet in virtual mode).
TsWorkbookSourceErrorEvent fpspreadsheetctrls

Event handler procedure for displaying a message if an error or warning occurs during reading of a workbook.
TsWorksheetEvent fpSpreadsheet

Event procedure containing a specific worksheet
TsWorksheetProtection fpsTypes

Worksheet protection options. All used items are locked.
TsWorksheetProtections fpsTypes

TsWorksheetWriteCellDataEvent fpSpreadsheet

Event fired when writing a file in virtual mode. The event handler has to pass data ("AValue") and formatting style to be copied from a template cell ("AStyleCell") to the writer


All Variables

Name | Unit | Description
CELL_BORDER_DELTA | fpspreadsheetgrid | Tolerance for mouse for hitting cell border
clsDash | fpsChart |
clsDashDot | fpsChart |
clsDot | fpsChart |
clsFineDot | fpsChart | Pre-defined chart line styles given as indexes into the chart's LineStyles list. Get their value in the constructor of TsChart. Default here to -1 which is the code for a solid line, just in case that something goes wrong
clsLongDash | fpsChart |
clsLongDashDot | fpsChart |
clsLongDashDotDot | fpsChart |
crDragCopy | fpspreadsheetgrid | Cursor for copy operation during drag and drop
CSVParams | fpsTypes |
DEFAULT_COL_COUNT | fpspreadsheetgrid | Default number of columns prepared for a new empty worksheet
DEFAULT_ROW_COUNT | fpspreadsheetgrid | Default number of rows prepared for a new empty worksheet
itBMP | fpsImages | Identifier for the BMP image type (value 3)
itEMF | fpsImages | Identifier for the EMF image type (value 7)
itGIF | fpsImages | Identifier for the GIF image type (value 4)
itJPEG | fpsImages | Identifier for the JPEG image type (value 1)
itPCX | fpsImages | Identifier for the PCX image type (value 8)
itPNG | fpsImages | Identifier for the PNG image type (value 0)
itSVG | fpsImages | Identifier for the SVG image type (value 5)
itTIFF | fpsImages | Identifier for the TIFF image type (value 2)
itWMF | fpsImages | Identifier for the WMF image type (value 6)
ScreenPixelsPerInch | fpsUtils | Default value for the screen pixel density (pixels per inch). Is needed for conversion of distances to pixels


All Constants

Name Unit Description
ALL_BORDERS fpsTypes

Default border style in which all borders are used.
ALL_SHEET_PROTECTIONS fpsTypes

BOLD_FONTINDEX fpsTypes

Index of bold default font in workbook's font list
clsNoLine fpsChart

clsSolid fpsChart

ColWidthTypeNames fpsTypes

DEFAULT_BORDERSTYLES fpsTypes

Border styles for each cell border used by default: a thin, black, solid line
DEFAULT_CELL_PROTECTION fpsTypes

DEFAULT_CHART_FONT fpsChart

DEFAULT_CHART_LINEWIDTH fpsChart

DEFAULT_FONTINDEX fpsTypes

Index of the default font in workbook's font list
DEFAULT_FONTNAME fpsTypes

Name of the default font
DEFAULT_FONTSIZE fpsTypes

Size of the default font
DEFAULT_SERIES_COLORS fpsChart

DEFAULT_SHEET_PROTECTION fpsTypes

EMPTY_FILL fpsTypes

Parameters for a non-filled cell background
FPS_LINE_ENDING fpsTypes

Line ending character in cell texts with fixed line break. Using a unique value simplifies many things...
FPS_REPLACEMENT_CHAR fpsTypes

Replacement character used in broken UTF8 strings. Alternate replacement chars could be: #$E2#$8E#$95 = box, or #$EF#$BF#$BD = "unicode replacement character"
GUID_SpreadsheetControl fpspreadsheetctrls

HEADER_FOOTER_INDEX_ALL fpsTypes

Index of the header/footer to be used for all pages
HEADER_FOOTER_INDEX_EVEN fpsTypes

Index of the header/footer to be used for even page numbers
HEADER_FOOTER_INDEX_FIRST fpsTypes

Index of the first header/footer to be used
HEADER_FOOTER_INDEX_ODD fpsTypes

Index of the header/footer to be used for odd page numbers
HYPERLINK_FONTINDEX fpsTypes

Index of the hyperlink font in workbook's font list
ISO8601Format fpsUtils

Date formatting string for unambiguous date/time display as strings Can be used for text output when date/time cell support is not available
ISO8601FormatDateOnly fpsUtils

ISO 8601 date-only format, used in ODF/opendocument
ISO8601FormatExtended fpsUtils

Extended ISO 8601 date/time format, used in e.g. ODF/opendocument
ISO8601FormatExtendedUTC fpsUtils

Extended ISO 8601 date/time format, as UTC
ISO8601FormatHoursOverflow fpsUtils

ISO 8601 time-only format, with hours overflow
ISO8601FormatTimeOnly fpsUtils

ISO 8601 time-only format, used in ODF/opendocument
ITALIC_FONTINDEX fpsTypes

Index of italic default font in workbook's font list - not used directly
itUnknown fpsImages

Identifier for unknown image type
MAX_COL_COUNT fpsTypes

Maximum count of worksheet columns
ncfBCSVB fpsTypes

ncfBCVB fpsTypes

ncfBVCB fpsTypes

ncfBVSCB fpsTypes

ncfCMV fpsTypes

ncfCSMV fpsTypes

ncfCSVM fpsTypes

ncfCVM fpsTypes

ncfDefault fpsTypes

ncfMCSV fpsTypes

ncfMCV fpsTypes

ncfMVC fpsTypes

ncfMVSC fpsTypes

ncfVCM fpsTypes

ncfVMC fpsTypes

ncfVMSC fpsTypes

ncfVSCM fpsTypes

NO_CELL_BORDER fpsTypes

Border style to be used for "no border"
pcfCSV fpsTypes

pcfCV fpsTypes

pcfDefault fpsTypes

Codes for curreny format according to FormatSettings.CurrencyFormat: "C" = currency symbol, "V" = currency value, "S" = space character For the negative value formats, we use also: "B" = bracket, "M" = Minus

The order of these characters represents the order of these items.

Example: 1000 dollars –> "$1000" for pCV, or "1000 $" for pVsC 1000 dollars –> "($1000)" for nbCVb, or "-$ 1000" for nMCSV

Assignment taken from "sysstr.inc"
pcfVC fpsTypes

pcfVSC fpsTypes

psAmbiguousSymbol fpsNumFormat

psErrConditionalFormattingNotSupported fpsNumFormat

psErrGeneralExpected fpsNumFormat

psErrMultipleCurrSymbols fpsNumFormat

psErrMultipleExpChars fpsNumFormat

psErrMultipleFracSymbols fpsNumFormat

psErrNoUsableFormat fpsNumFormat

psErrNoValidColorIndex fpsNumFormat

psErrNoValidCompareNumber fpsNumFormat

psErrNoValidDateTimeFormat fpsNumFormat

psErrNoValidNumberFormat fpsNumFormat

psErrNoValidTextFormat fpsNumFormat

psErrQuoteExpected fpsNumFormat

psErrUnknownInfoInBrackets fpsNumFormat

psOK fpsNumFormat

rfAllRel fpsTypes

Abbreviation of all-relative cell reference flags ()
RowHeightTypeNames fpsTypes

ROW_HEIGHT_CORRECTION fpsTypes

Takes account of effect of cell margins on row height by adding this value to the nominal row height. Note that this is an empirical value and may be wrong.
scAqua fpsTypes

scBeige fpsTypes

scBlack fpsTypes

rgb value of black color, BIFF2 palette index 0, BIFF8 index 8
scBlue fpsTypes

rgb value of blue color, BIFF2 palette index 4, BIFF8 indexes 12 and 39
scBlueGray fpsTypes

scBlueGrey fpsTypes

scBrown fpsTypes

scCoral fpsTypes

sccTransparent fpsChart

scCyan fpsTypes

rgb value of cyan color, BIFF2 palette index 7, BIFF8 indexes 15
scDarkBlue fpsTypes

rgb value of dark blue color
scDarkBrown fpsTypes

scDarkGreen fpsTypes

rgb value of dark green color, BIFF8 index 17
scDarkPurple fpsTypes

scDarkRed fpsTypes

rgb value of dark red color, BIFF8 indexes 16 and 35
scDarkTeal fpsTypes

scFuchsia fpsTypes

scGold fpsTypes

scGray fpsTypes

rgb value of grey color
scGray10pct fpsTypes

scGray20pct fpsTypes

scGray25pct fpsTypes

scGray40pct fpsTypes

scGray50pct fpsTypes

scGray80pct fpsTypes

scGreen fpsTypes

rgb value of green color, BIFF2 palette index 3, BIFF8 index 11
scGrey fpsTypes

rgb value of gray color
scGrey10pct fpsTypes

scGrey20pct fpsTypes

scIceBlue fpsTypes

scIndigo fpsTypes

scIvory fpsTypes

scLavander fpsTypes

scLightBlue fpsTypes

scLightGreen fpsTypes

scLightOrange fpsTypes

scLightTurquoise fpsTypes

scLightYellow fpsTypes

scLime fpsTypes

scMagenta fpsTypes

rgb value of magenta color, BIFF2 palette index 6, BIFF8 index 14 and 33
scMaroon fpsTypes

scNavy fpsTypes

scNotDefined fpsTypes

Identifier for not-defined color
scOceanBlue fpsTypes

scOlive fpsTypes

rgb value of olive color
scOliveGreen fpsTypes

scOrange fpsTypes

scPaleBlue fpsTypes

scPaletteIndexMask fpsTypes

Identifier for palette index encoded into the TsColor
scPeriwinkle fpsTypes

scPink fpsTypes

scPlum fpsTypes

scPurple fpsTypes

rgb value of purple color, BIFF8 palette indexes 20 and 36
scRed fpsTypes

rgb value of red color, BIFF2 palette index 2, BIFF8 index 10
scRGBMask fpsTypes

Mask for the rgb components contained in the TsColor
scRose fpsTypes

scSeaGreen fpsTypes

scSilver fpsTypes

rgb value of silver color
scSkyBlue fpsTypes

scTan fpsTypes

scTeal fpsTypes

rgb value of teal color, BIFF8 palette index 21 and 38
scTransparent fpsTypes

Identifier for transparent color
scTurquoise fpsTypes

scVeryDarkGreen fpsTypes

scWheat fpsTypes

scWhite fpsTypes

rgb value of white color, BIFF2 palette index 1, BIFF8 index 9
scYellow fpsTypes

rgb value of yellow color, BIFF2 palette index 5, BIFF8 indexes 13 and 34
sfidUnknown fpsTypes

Format identifier of an undefined, unknown, etc. file format.

Each unit implementing a reader/writer will define an sfidXXXX value as a numerical identifer of the file format. In case of the built-in formats, the identifier is equal to the ord of the TsSpreadsheetFormat value.
SHEETSEPARATOR fpsTypes

Separator between worksheet name and cell (range) reference in an address
SizeUnitNames fpsTypes

Names of the size units
STR_COMMA_SEPARATED_EXTENSION fpsTypes

Default extension of comma-separated-values file
STR_ERR_ARG_ERROR fpsTypes

STR_ERR_DIVIDE_BY_ZERO fpsTypes

STR_ERR_EMPTY_INTERSECTION fpsTypes

Error values
STR_ERR_FORMULA_NOT_SUPPORTED fpsTypes

STR_ERR_ILLEGAL_REF fpsTypes

STR_ERR_OVERFLOW fpsTypes

STR_ERR_UNKNOWN fpsTypes

STR_ERR_WRONG_NAME fpsTypes

STR_ERR_WRONG_TYPE fpsTypes

STR_EXCEL_EXTENSION fpsTypes

Default binary Excel file extension (<= Excel 97)
STR_FALSE fpsTypes

String for boolean value False
STR_FILEFORMAT_CSV fpsTypes

Explanatory name of sfCSV file format
STR_FILEFORMAT_EXCEL_2 fpsTypes

Explanatory name of sfBiff2 file format
STR_FILEFORMAT_EXCEL_5 fpsTypes

Explanatory name of sfBiff5 file format
STR_FILEFORMAT_EXCEL_8 fpsTypes

Explanatory name of sfBiff8 file format
STR_FILEFORMAT_EXCEL_XLSX fpsTypes

Explanatory name of sfOOXLM file format
STR_FILEFORMAT_EXCEL_XML fpsTypes

Explanatory name of sfExcelXML file format
STR_FILEFORMAT_HTML fpsTypes

Explanatory name of sfHTML file format
STR_FILEFORMAT_OPENDOCUMENT fpsTypes

Explanatory name of sfOpenDocument file format
STR_FILEFORMAT_WIKITABLE_PIPES fpsTypes

Explanatory name of sfWikiTablePipes file format
STR_FILEFORMAT_WIKITABLE_WIKIMEDIA fpsTypes

Explanatory name of sfWikiTableWikiMedia file format
STR_HTML_EXTENSION fpsTypes

Default extension for HTML files
STR_OOXML_EXCEL_EXTENSION fpsTypes

Default xml Excel file extension (>= Excel 2007)
STR_OPENDOCUMENT_CALC_EXTENSION fpsTypes

Default OpenDocument spreadsheet file extension
STR_TRUE fpsTypes

String for boolean value True
STR_WIKITABLE_PIPES_EXTENSION fpsTypes

Default extension of wikitable files in pipes format
STR_WIKITABLE_WIKIMEDIA_EXTENSION fpsTypes

Default extension of wikitable files in wikimedia format
STR_XML_EXCEL_EXTENSION fpsTypes

Default xml Excel file extension (Excel XP, 2003)
UM_VALIDATEINPUT fpspreadsheetctrls

User-defined message for input validation
UNASSIGNED_ROW_COL_INDEX fpsTypes

Unassigned row/col index
ZERO_WIDTH_FACTOR fpsTypes

Ratio of the width of the "0" character to the font size. Empirical value to match Excel and LibreOffice column withs. Needed because Excel defines colum width in terms of count of the "0" character.


All Functions and Procedures

Name Unit Description
AddAMPM fpsNumFormat

Adds an AM/PM format code to a pre-built time formatting string.

Example: ATimeFormatString = 'hh:nn' ==> 'hh:nn AM/PM'

AddIntervalBrackets fpsNumFormat

The given format string is assumed to represent a time interval, i.e. its first time symbol must be enclosed by square brackets. Checks if this is true, and adds the brackes if not.

AnalyzeCompareStr fpsUtils

Extracts compare information from an input string such as "<2.4". Is needed for some Excel-strings.

AppendToStream fpsUtils

Appends a string to a stream

AppendToStream fpsUtils

Appends three strings to a stream

AppendToStream fpsUtils

Appends two strings to a stream

ApplyTextFormat fpsNumFormat

Applies a text format to a text. The text placeholder is @. Supports appending and prepending text.
BuildCurrencyFormatList fpsNumFormat

Builds a string list with samples of the predefined currency formats

BuildCurrencyFormatString fpsNumFormat

Builds a currency format string. The presentation of negative values (brackets, or minus signs) is taken from the provided format settings. The format string consists of three sections, separated by semicolons.

Example: '"$"#,##0.00;("$"#,##0.00);"$"0.00'

BuildDateTimeFormatString fpsNumFormat

Builds a date/time format string from the number format code.

BuildFormatStringFromSection fpsNumFormat

Creates a format string for the specified parsed number format section. The format string is created according to Excel convention (which is understood by ODS as well).

BuildFractionFormatString fpsNumFormat

Builds a number format string for fraction formatting from the number format code and the count of numerator and denominator digits.

BuildNumberFormatString fpsNumFormat

Builds a number format string from the number format code and the count of decimal places.

Example: ANumberFormat = nfFixedTh, ADecimals = 2 –> '#,##0.00'

CellBorderStyle fpsUtils

Combines color and linestyle to a TsCellBorderStyle record
ChartColor fpsChart

cmToPts fpsUtils

Converts centimeters to points (72 pts = 1 inch)

ColorToHTMLColorStr fpsUtils

Converts an rgb color value to a string as used in HTML code (for ods)

CombineTextAndRichTextParams fpsUtils

Append the rich-text parameters to the bare text. Needed for StringHashList.
ConvertFloatToStr fpsNumFormat

Converts a floating point number to a string as determined by the specified number format parameters

CopyCellFormat fpSpreadsheet

Copies the format of a cell to another one.

CopyColFormat fpSpreadsheet

CopyRowFormat fpSpreadsheet

CountDecs fpsNumFormat

Counts how many decimal places are coded into a given number format string.

CreateNumFormatParams fpsNumFormat

CreateRPNFormula fpsRPN

Creates an RPN formula by a single call using nested RPN items.

For each formula element, use one of the RPNxxxx functions implemented here. They are designed to be nested into each other. Terminate the chain by using nil.

Example: The RPN formula for the string expression "$A1+2" can be created as follows:

var
  f: TsRPNFormula;
begin
  f := CreateRPNFormula(
    RPNCellValue('$A1',
    RPNNumber(2,
    RPNFunc(fekAdd,
    nil))));
CurrencyRegistered fpsCurrency

Checks whether a string is registered as valid currency symbol string

DestroyRPNFormula fpsRPN

Destroys the RPN formula starting with the given RPN item.

DWordLEtoN fpsUtils

Converts a DWord value from little-endian to big-endian byte-order.

DWordToLE fpsUtils

DWordLEToLE converts a DWord value from big-endian to little-endian byte-order.

EMUToIn fpsUtils

Converts EMU (English metric units) to inches

EMUToMM fpsUtils

Converts EMU to millimeters

EnsureOrder fpsUtils

Helper procedure which guarantees that a is not larger than b
EnsureOrder fpsUtils

Helper procedure which guarantees that a is not larger than b
FixHyperlinkPathDelims fpsUtils

Replaces backslashes by forward slashes in hyperlink path names
FixLineEndings fpsUtils

Replaces CRLF line endings by LF (#10) alone because this is what xml returns. This is required to keep the character indexes of the rich text formatting runs in synch when reading xml files.
FlipColorBytes fpsUtils

FloatToFraction fpsUtils

Approximates a floating point value as a fraction and returns the values of numerator and denominator.

GeneralFormatFloat fpsNumFormat

GetCellRangeString fpsUtils

GetCellRangeString fpsUtils

Calculates a cell range address string from a TsCellRange record and the relative address state flags.

GetCellRangeString fpsUtils

Calculates a cell range address string from zero-based column and row indexes and the relative address state flags.

Example: ARow1 = 0, ACol1 = 0, ARow = 2, ACol = 1, AFlags = [rfRelRow, rfRelRow2] –> $A1:$B3

GetCellRangeString_ODS fpsUtils

GetCellRangeString_ODS fpsUtils

GetCellRangeString_ODS fpsUtils

Calculates a cell range string with sheet specification in OpenDocument syntax
GetCellRangeString_R1C1 fpsUtils

GetCellRangeString_R1C1 fpsUtils

GetCellString fpsUtils

Calculates a cell address string from zero-based column and row indexes and the relative address state flags.

Example: ARowIndex = 0, AColIndex = 0, AFlags = [rfRelRow] –> $A1

GetCellString_R1C1 fpsUtils

Calculates a cell address string in R1C1 notation from zero-based column and row indexes and the relative address state flags.

GetCFIconCount fpsConditionalFormat

Determines the count of icons available in the specified icon set for conditional formatting.

GetColorName fpsUtils

Determines the name of a color from its rgb value
GetColString fpsUtils

Calculates an Excel column name ('A', 'B' etc) from the zero-based column index

GetErrorValueStr fpsUtils

Returns the message text assigned to an error value

GetFileFormatName fpsUtils

Returns the name of the given spreadsheet file format.

Note
This function is deprecated. Use GetSpreadFormatName or GetSpreadTechnicalName of fpsRegFileformats instead in order to be able to process user-defined formats as well.
GetFontAsString fpsUtils

Combines the relevant font properties into a string
GetFormatFromFileName fpsUtils

Determines the spreadsheet type from the file type extension

GetFormatFromFileName fpsUtils

Determines the spreadsheet type from the file type extension

GetImageInfo fpsImages

Returns the width and height of the image loaded into the specified stream.

GetImageInfo fpsImages

Returns the width and height of the image loaded into the specified stream.

GetImageMimeType fpsImages

Returns the MimeType of the specified image type

GetImageTypeExt fpsImages

Returns the file extension belonging the specified image type. If there are several extensions the first one is selected. The extension is returned without a leading period.

GetImageTypeFromFileName fpsImages

Extracts the image file type identifier from the extension of the specified file name.

GetRegisteredCurrencies fpsCurrency

Writes all registered currency symbols to a string list

GetRowString fpsUtils

Calculates an Excel row name ('1', '2' etc) from the zero-based row index

GetSheetCellRangeString_ODS fpsUtils

GetSheetCellString_ODS fpsUtils

Has3dFormula fpsUtils

Checks whether the specified cell contains a 3D formula, i.e. a reference to another sheet.

HasFormula fpsUtils

Checks whether the specified cell contains a formula.

HasZipHeader fpsUtils

Returns True if the file begins with a ZIP header *PK'#03#04. Needed for file format detection.
HighContrastColor fpsUtils

Returns the color index for black or white depending on a color being "bright" or "dark".

HTMLColorStrToColor fpsUtils

Converts a HTML color string to a TsColor alue. Needed for the ODS file format.

HTMLLengthStrToPts fpsUtils

Converts a HTML length string to points. The units are assumed to be the last two digits of the string, such as '1.25in'

IfThen fpsUtils

IfThen fpsUtils

Helper function to reduce typing: "if a conditions is true return the first number format, otherwise return the second format"

InitCell fpsUtils

Initalizes a new cell and presets the row and column fields of the cell record to the parameters passed to the procedure.

InitCell fpsUtils

Initalizes a new cell.

InitCryptoInfo fpsUtils

Initializes the fields of the encryption information block (TsCryptoInfo)
InitFormatRecord fpsUtils

Initializes the fields of a TsCellFormaRecord
InitFormatSettings fpsNumFormat

Initializes the FormatSettings of file a import/export parameters record to default values which can be replaced by the FormatSettings of the workbook's FormatSettings
InitFormatSettings fpsUtils

Initializes the FormatSettingsRecord to international (non-localized) values
InitHeaderFooterImageRecord fpsUtils

Initializes the fields of a TsHeaderFooterImage record
InitImageRecord fpsUtils

Initializes the fields of a TsImage record

InitReplaceParams fpsUtils

Initializes a RecplaceParams record. This record defined how the cell content found after searching will be replaced

InitSearchParams fpsUtils

Initializes a SearchParams record. This record defines the parameters needed when searching cells.

InitSortParams fpsUtils

Initializes a Sortparams record. This record sets paramaters used when cells are sorted.

InitUTF8FormatSettings fpsTypes

Creates a localized FPC format settings record in which all strings are encoded as UTF8.
IntegerToLE fpsUtils

Converts an integer value from big-endian to little-endian byte-order.

InToEMU fpsUtils

Converts inches to EMU (English metric units)

InToMM fpsUtils

Converts inches to millimeters

InToPts fpsUtils

Converts inches to points (72 pts = 1 inch)

IsBoolValue fpsNumFormat

Checks whether the specified text corresponds to a boolean value. For this, it must match the specified True and False text phrases.
IsCurrencyFormat fpsNumFormat

Checks whether the given number format code is for currency, i.e. requires a currency symbol.

IsCurrencyFormat fpsNumFormat

Checks whether the specified number format parameters apply to currency values.

IsDateFormat fpsNumFormat

Checks whether the specified number format parameters apply to a date value.

IsDateTimeFormat fpsNumFormat

Checks whether the given number format code is for date/time values.

IsDateTimeFormat fpsNumFormat

Checks whether the given string with formatting codes is for date/time values.

IsDateTimeFormat fpsNumFormat

Checks whether the specified number format parameters apply to date/time values.

IsDateTimeValue fpsNumFormat

Checks whether the specified text corresponds to a date/time value and returns True, its numerical value and its built-in numberformat if it is.
IsLongTimeFormat fpsNumFormat

Returns True if the specified format string represents a long time format, i.e. it contains two TimeSeparators.
IsNegative fpsCurrency

Checks whether the given number string is a negative value. In case of currency values, this can be indicated by brackets, or a minus sign at string start or end.

IsNumberValue fpsNumFormat

Checks whether the specified text corresponds to a numerical value. If it is then the function result is True, and the number value and its formatting parameters are returned.
ISO8601StrToDateTime fpsUtils

Converts an ISO8601-formatted date/time to TDateTime Assumes UTC when the input string ends with 'Z' and converts to local time.
IsPaletteIndex fpsUtils

Checks whether the specified TsColor represents a palette index
IsTextFormat fpsNumFormat

IsTimeFormat fpsNumFormat

Checks whether the given built-in number format code is for time values.

IsTimeFormat fpsNumFormat

Checks whether the given string with formatting codes is for time values.

IsTimeFormat fpsNumFormat

Checks whether the specified number format parameters apply to time values.

IsTimeIntervalFormat fpsNumFormat

Checks whether the specified number format parameters is a time interval format.

LongRGBToExcelPhysical fpsUtils

Converts the RGB part of a LongRGB logical structure to its physical representation. In other words: RGBA (where A is 0 and omitted in the function call) => ABGR Needed for conversion of palette colors.

LumModOff fpsUtils

Performs a luminance modulation and luminance offset operation. Inspired by LibreOffice (https://docs.libreoffice.org/tools/html/color_8cxx_source.html), but does not match Excel exactly.

MakeLongDateFormat fpsNumFormat

Creates a long date format string out of a short date format string. Retains the order of year-month-day and the separators, but uses 4 digits for year and 3 digits of month.

MakeShortDateFormat fpsNumFormat

Modifies the short date format such that it has a two-digit year and a two-digit month. Retains the order of year-month-day and the separators.

MakeTimeIntervalMask fpsNumFormat

Creates a "time interval" format string having the first time code identifier in square brackets.

mmToEMU fpsUtils

Converts millimeters to EMU (english metric units, 1 cm = 360000 EMU)

mmToIn fpsUtils

Converts millimeters to inches

mmToPts fpsUtils

Converts millimeters to points (72 pts = 1 inch)

ParamsOfNumFormatStr fpsNumFormat

ParseCellColString fpsUtils

Parses a cell column string, like 'A' or 'CZ', into a zero-based column number. Note that there can be several letters to address more than 26 columns.

ParseCellRangeString fpsUtils

Parses a 3D cell and sheet range string in Excel A1 dialect. Returns the names of the limiting sheets and the indexes of the limiting borders. The function result is False if the provided string is not valid.
ParseCellRangeString fpsUtils

Parses strings like A5:C10 into a range selection information. Information on relative/absolute cells is ignored.

ParseCellRangeString fpsUtils

Parses strings like A5:C10 into a range selection information. Information on relative/absolute cells is ignored.

ParseCellRangeString fpsUtils

Parses strings like A5:C10 into a range selection information. Returns in AFlags also information on relative/absolute cells.

ParseCellRangeString fpsUtils

Parses strings like A5:C10 into a range selection information. Returns in AFlags also information on relative/absolute cells.

ParseCellRangeString_R1C1 fpsUtils

Extracts information on cell range from a cellrange string in "R1C1" notation. Returns in AFlags also information on relative/absolute cells.

ParseCellRangeString_R1C1 fpsUtils

Parses a 3D cell and sheet range string in Excel R1C1 dialect. Returns the names of the limiting sheets and the indexes of the limiting row/col borders. The function result is False if the provided string is not valid.

ParseCellRowString fpsUtils

Parses a cell row string to a zero-based row number.

ParseCellString fpsUtils

Parses a cell string, like 'A1' into zero-based column and row numbers Note that there can be several letters to address for more than 26 columns.

For compatibility with old version which does not return flags for relative cell addresses.

ParseCellString fpsUtils

Parses a cell string, like 'A1' into zero-based column and row numbers Note that there can be several letters to address for more than 26 columns. 'AFlags' indicates relative addresses.

Example: "AMP$200" –> (rel) column 1029 (= 26*26*1 + 26*16 + 26 - 1) (abs) row = 199 (abs)

ParseCellString_R1C1 fpsUtils

Extracts a cell's row and column index from a string in "R1C1" notation. Returns in AFlags also information on relative/absolute cells.

ParseCellString_R1C1 fpsUtils

Parses a cell string in "R1C1" notation into zero-based column and row numbers

For compatibility with old version which does not return flags for relative cell addresses.

ParseCellString_R1C1 fpsUtils

Parses a cell string in "R1C1" notation into zero-based column and row numbers AFlags indicates relative addresses.

ParseIntervalString fpsUtils

Parses strings like A5:A10 into an selection interval information

ParseSheetCellString fpsUtils

Parses a full cell string, like 'Sheet1!A1' into zero-based column and row numbers Note that there can be several letters to address for more than 26 columns.

For compatibility with old version which does not return flags for relative cell addresses.

PtsToCm fpsUtils

Converts points to centimeters

PtsToIn fpsUtils

Converts points to inches (72 pts = 1 inch)

PtsToMM fpsUtils

Converts points to millimeters

PtsToPx fpsUtils

Converts points to pixels

PtsToTwips fpsUtils

Converts points to twips (1 twip = 1/20 point)

pxToPts fpsUtils

pxToPts fpsUtils

Converts pixels to points.

RandomString fpsUtils

Range fpsUtils

Creates a TsCellRange record from the coordinates of a single cell. The second corner coordinates are set equal to the first corner coordinates.
Range fpsUtils

Creates a TsCellRange record from the provided cell corner coordinates. Puts the coordinates into right order if needed.
Range3D fpsUtils

RegisterCurrencies fpsCurrency

RegisterCurrencies() registers the currency strings contained in the string list If AReplace is true, the list replaces the currently registered list.

RegisterCurrency fpsCurrency

Registers a currency symbol UTF8 string for usage by fpspreadsheet

Currency symbols are the key for detection of currency values. In order to reckognize strings as currency symbols they have to be registered in the internal CurrencyList.

Registration occurs automatically for USD, "$", the currencystring defined in the DefaultFormatSettings and for the currency symbols used explicitly when calling WriteCurrency or WriteNumerFormat.

RegisterImageType fpsImages

Registers an image type for usage in fpspreadsheet

RemoveCurrencySymbol fpsCurrency

Checks wheter a specified currency symbol is contained in a string, removes the currency symbol and returns the remaining string.

ReplaceFormatSettings fpsNumFormat

Replaces in AFormatSettings all members marked as having default values (#0, 1, '') by the corresponding values of the ADefaultFormats record
Round fpsUtils

Special rounding function which avoids banker's rounding
RPNBool fpsRPN

Creates a boolean value entry in the RPN array.

RPNCellOffset fpsRPN

Creates an entry in the RPN array for a relative cell reference as used in shared formulas. The given parameters indicate the relativ offset between the current cell coordinates and a reference rell.

RPNCellRange fpsRPN

Creates an entry in the RPN array for a range of cells, specified by an Excel-style address, e.g. A1:G5. As in Excel, use a $ sign to indicate absolute addresses.

RPNCellRange fpsRPN

Creates an entry in the RPN array for a range of cells, specified by the row/column indexes of the top/left and bottom/right corners of the block. The flags indicate relative indexes.

RPNCellRange3D fpsRPN

RPNCellRef fpsRPN

Creates an entry in the RPN array for a cell reference, specifed by its address, e.g. 'A1'. Takes care of absolute and relative cell addresses. "Cell reference" means that all properties of the cell can be handled. Note that most Excel formulas with cells require the cell value only (–> RPNCellValue)

RPNCellRef fpsRPN

Creates an entry in the RPN array for a cell reference, specifed by its row and column index and flags containing information on relative addresses. "Cell reference" means that all properties of the cell can be handled. Note that most Excel formulas with cells require the cell value only (–> RPNCellValue)

RPNCellRef3D fpsRPN

RPNCellValue fpsRPN

Creates an entry in the RPN array for a cell value, specifed by its address, e.g. 'A1'. Takes care of absolute and relative cell addresses.

RPNCellValue fpsRPN

Creates an entry in the RPN array for a cell value, specifed by its row and column index and a flag containing information on relative addresses.

RPNCellValue3D fpsRPN

RPNErr fpsRPN

Creates an entry in the RPN array with an error value.

RPNFunc fpsRPN

Creates an entry in the RPN array for an Excel function or operation specified by its name. Note that array elements for all needed parameters must have been created before.

RPNFunc fpsRPN

Creates an entry in the RPN array for an Excel spreadsheet function specified by its name. Specify the number of parameters used. They must have been created before.

RPNFunc fpsRPN

Creates an entry in the RPN array for an operation specified by its TokenID (–> TFEKind). Note that array elements for all needed parameters must have been created before.

RPNInteger fpsRPN

Creates an entry in the RPN array for an integer value

RPNMissingArg fpsRPN

Creates an entry in the RPN array for a missing argument in of function call. Use this in a formula to indicate a missing argument

RPNNumber fpsRPN

Creates an entry in the RPN array for a floating point number.

RPNParenthesis fpsRPN

Creates an entry in the RPN array which puts the current operator in parenthesis. For display purposes only, does not affect calculation.

RPNString fpsRPN

Creates an entry in the RPN array for a string.

SafeQuoteStr fpsUtils

Makes sure that the string is encloed by quotes ("). Avoids duplicate quotation.
SameCellBorders fpsUtils

SameFont fpsUtils

Checks whether two fonts are equal

SameFont fpsUtils

Checks whether two fonts are equal

SameRichTextParams fpsUtils

Checks wether ARtp1 and ARtp2 are the same rich-text parameters.
SetAsPaletteIndex fpsUtils

Constructs a TsColor from a palette index. It has bit 15 in the high-order byte set.
SheetNameNeedsQuotes fpsUtils

Determines whether a worksheet name must to be quoted. This is needed when the name begins with a numeral or a period, or when the name contains a space character. Also required if the name contains '<' or '>'.

SplitHyperlink fpsUtils

Splits a hyperlink string at the # character.

SplitStr fpsUtils

Splits a string at the specified delimiters into individual strings and passes them in an array.
SplitTextAndRichTextParams fpsUtils

Split text and rich-text parameters from the combined string needed for StringHashList
SpreadsheetFormatInClipboard fpspreadsheetctrls

Returns True if the clipboard contains a format good for pasting into a worksheet grid.
StringToBytes fpsUtils

Copies a string to a TBytes variable

@param AString The string to be copied @returns A dynamic array of byte, type TBytes
StripAMPM fpsNumFormat

Removes an AM/PM formatting code from a given time formatting string. Variants of "AM/PM" are considered as well. The string is left unchanged if it does not contain AM/PM codes.

TintedColor fpsUtils

Excel defines theme colors and applies a "tint" factor (-1...+1) to darken or brighten them.

This method "tints" a given color with a factor

The algorithm is described in http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.backgroundcolor.aspx

TryFractionStrToFloat fpsUtils

Assumes that the specified text is a string representation of a mathematical fraction and tries to extract the floating point value of this number. Returns also the maximum count of digits used in the numerator or denominator of the fraction

Example: AText := '1 3/4' –> ANumber = 1.75; AMaxDigits = 1; Result = true

TryPercentStrToFloat fpsUtils

Converts a percent-formatted string to a decimal number. Example: '150%' –> 1.5
TryStrToCellRange_ODS fpsUtils

Extracts sheets names and cell coordinates from a cell range string in OpenDocument syntax, e.g. "Table1.A1:Table2.B4"
TryStrToCurrency fpsCurrency

Checks whether a string is a number with attached currency symbol. Looks also for negative values in brackets.

TryStrToErrorValue fpsUtils

TryStrToErrorValue fpsUtils

Returns the error value code from a string. Result is False, if the string does not match one of the predefined error strings.

TryStrToFloatAuto fpsUtils

Converts a string to a floating point number. No assumption on decimal and thousand separator are made.

Is needed for reading CSV files.
TwipsToPts fpsUtils

Excel's unit of row heights is "twips", i.e. 1/20 point. Converts Twips to points.

UnquoteStr fpsUtils

Removes quotation characters which enclose a string
UnregisterCurrency fpsCurrency

Removes registration of a currency symbol string for usage by fpspreadsheet

Unused fpsUtils

Silence warnings due to an unused parameter
Unused fpsUtils

Silence warnings due to three unused parameters
Unused fpsUtils

Silence warnings due to two unused parameters
UTF8CodePoints fpsUtils

Splits the UTF8-encoded string into its code-points ("characters") and returns them as an array of string (sa). The result of the function is false if at least one codepoint is broken UTF8.
ValidUTF8Text fpsUtils

WideStringLEToN fpsUtils

Converts a widestring from little-endian to big-endian byte-order.

WideStringToLE fpsUtils

Converts a widestring from big-endian to little-endian byte-order.

WordLEtoN fpsUtils

Converts a word value from little-endian to big-endian byte-order.

WordToLE fpsUtils

WordLEToLE converts a word value from big-endian to little-endian byte order.


All Identifiers

Name Unit Description
AddAMPM fpsNumFormat

Adds an AM/PM format code to a pre-built time formatting string.

Example: ATimeFormatString = 'hh:nn' ==> 'hh:nn AM/PM'

AddIntervalBrackets fpsNumFormat

The given format string is assumed to represent a time interval, i.e. its first time symbol must be enclosed by square brackets. Checks if this is true, and adds the brackes if not.

ALL_BORDERS fpsTypes

Default border style in which all borders are used.
ALL_SHEET_PROTECTIONS fpsTypes

AnalyzeCompareStr fpsUtils

Extracts compare information from an input string such as "<2.4". Is needed for some Excel-strings.

AppendToStream fpsUtils

Appends a string to a stream

AppendToStream fpsUtils

Appends three strings to a stream

AppendToStream fpsUtils

Appends two strings to a stream

ApplyTextFormat fpsNumFormat

Applies a text format to a text. The text placeholder is @. Supports appending and prepending text.
BOLD_FONTINDEX fpsTypes

Index of bold default font in workbook's font list
BuildCurrencyFormatList fpsNumFormat

Builds a string list with samples of the predefined currency formats

BuildCurrencyFormatString fpsNumFormat

Builds a currency format string. The presentation of negative values (brackets, or minus signs) is taken from the provided format settings. The format string consists of three sections, separated by semicolons.

Example: '"$"#,##0.00;("$"#,##0.00);"$"0.00'

BuildDateTimeFormatString fpsNumFormat

Builds a date/time format string from the number format code.

BuildFormatStringFromSection fpsNumFormat

Creates a format string for the specified parsed number format section. The format string is created according to Excel convention (which is understood by ODS as well).

BuildFractionFormatString fpsNumFormat

Builds a number format string for fraction formatting from the number format code and the count of numerator and denominator digits.

BuildNumberFormatString fpsNumFormat

Builds a number format string from the number format code and the count of decimal places.

Example: ANumberFormat = nfFixedTh, ADecimals = 2 –> '#,##0.00'

CellBorderStyle fpsUtils

Combines color and linestyle to a TsCellBorderStyle record
CELL_BORDER_DELTA fpspreadsheetgrid

Tolerance for mouse for hitting cell border
ChartColor fpsChart

clsDash fpsChart

clsDashDot fpsChart

clsDot fpsChart

clsFineDot fpsChart

Pre-defined chart line styles given as indexes into the chart's LineStyles list. Get their value in the constructor of TsChart. Default here to -1 which is the code for a solid line, just in case that something goes wrong
clsLongDash fpsChart

clsLongDashDot fpsChart

clsLongDashDotDot fpsChart

clsNoLine fpsChart

clsSolid fpsChart

cmToPts fpsUtils

Converts centimeters to points (72 pts = 1 inch)

ColorToHTMLColorStr fpsUtils

Converts an rgb color value to a string as used in HTML code (for ods)

ColWidthTypeNames fpsTypes

CombineTextAndRichTextParams fpsUtils

Append the rich-text parameters to the bare text. Needed for StringHashList.
ConvertFloatToStr fpsNumFormat

Converts a floating point number to a string as determined by the specified number format parameters

CopyCellFormat fpSpreadsheet

Copies the format of a cell to another one.

CopyColFormat fpSpreadsheet

CopyRowFormat fpSpreadsheet

CountDecs fpsNumFormat

Counts how many decimal places are coded into a given number format string.

crDragCopy fpspreadsheetgrid

Cursor for copy operation during drag and drop
CreateNumFormatParams fpsNumFormat

CreateRPNFormula fpsRPN

Creates an RPN formula by a single call using nested RPN items.

For each formula element, use one of the RPNxxxx functions implemented here. They are designed to be nested into each other. Terminate the chain by using nil.

Example: The RPN formula for the string expression "$A1+2" can be created as follows:

var
  f: TsRPNFormula;
begin
  f := CreateRPNFormula(
    RPNCellValue('$A1',
    RPNNumber(2,
    RPNFunc(fekAdd,
    nil))));
CSVParams fpsTypes

CurrencyRegistered fpsCurrency

Checks whether a string is registered as valid currency symbol string

DEFAULT_BORDERSTYLES fpsTypes

Border styles for each cell border used by default: a thin, black, solid line
DEFAULT_CELL_PROTECTION fpsTypes

DEFAULT_CHART_FONT fpsChart

DEFAULT_CHART_LINEWIDTH fpsChart

DEFAULT_COL_COUNT fpspreadsheetgrid

Default number of columns prepared for a new empty worksheet
DEFAULT_FONTINDEX fpsTypes

Index of the default font in workbook's font list
DEFAULT_FONTNAME fpsTypes

Name of the default font
DEFAULT_FONTSIZE fpsTypes

Size of the default font
DEFAULT_ROW_COUNT fpspreadsheetgrid

Default number of rows prepared for a new empty worksheet
DEFAULT_SERIES_COLORS fpsChart

DEFAULT_SHEET_PROTECTION fpsTypes

DestroyRPNFormula fpsRPN

Destroys the RPN formula starting with the given RPN item.

DWordLEtoN fpsUtils

Converts a DWord value from little-endian to big-endian byte-order.

DWordToLE fpsUtils

DWordLEToLE converts a DWord value from big-endian to little-endian byte-order.

EFpSpreadsheet fpsTypes

Ancestor of the fpSpreadsheet exceptions
EFpSpreadsheetReader fpsTypes

Class of exceptions fired by the workbook reader
EFpSpreadsheetWriter fpsTypes

Class of exceptions fired for the workbook writer
EMPTY_FILL fpsTypes

Parameters for a non-filled cell background
EMUToIn fpsUtils

Converts EMU (English metric units) to inches

EMUToMM fpsUtils

Converts EMU to millimeters

EnsureOrder fpsUtils

Helper procedure which guarantees that a is not larger than b
EnsureOrder fpsUtils

Helper procedure which guarantees that a is not larger than b
FixHyperlinkPathDelims fpsUtils

Replaces backslashes by forward slashes in hyperlink path names
FixLineEndings fpsUtils

Replaces CRLF line endings by LF (#10) alone because this is what xml returns. This is required to keep the character indexes of the rich text formatting runs in synch when reading xml files.
FlipColorBytes fpsUtils

FloatToFraction fpsUtils

Approximates a floating point value as a fraction and returns the values of numerator and denominator.

FPS_LINE_ENDING fpsTypes

Line ending character in cell texts with fixed line break. Using a unique value simplifies many things...
FPS_REPLACEMENT_CHAR fpsTypes

Replacement character used in broken UTF8 strings. Alternate replacement chars could be: #$E2#$8E#$95 = box, or #$EF#$BF#$BD = "unicode replacement character"
GeneralFormatFloat fpsNumFormat

GetCellRangeString fpsUtils

GetCellRangeString fpsUtils

Calculates a cell range address string from a TsCellRange record and the relative address state flags.

GetCellRangeString fpsUtils

Calculates a cell range address string from zero-based column and row indexes and the relative address state flags.

Example: ARow1 = 0, ACol1 = 0, ARow = 2, ACol = 1, AFlags = [rfRelRow, rfRelRow2] –> $A1:$B3

GetCellRangeString_ODS fpsUtils

GetCellRangeString_ODS fpsUtils

GetCellRangeString_ODS fpsUtils

Calculates a cell range string with sheet specification in OpenDocument syntax
GetCellRangeString_R1C1 fpsUtils

GetCellRangeString_R1C1 fpsUtils

GetCellString fpsUtils

Calculates a cell address string from zero-based column and row indexes and the relative address state flags.

Example: ARowIndex = 0, AColIndex = 0, AFlags = [rfRelRow] –> $A1

GetCellString_R1C1 fpsUtils

Calculates a cell address string in R1C1 notation from zero-based column and row indexes and the relative address state flags.

GetCFIconCount fpsConditionalFormat

Determines the count of icons available in the specified icon set for conditional formatting.

GetColorName fpsUtils

Determines the name of a color from its rgb value
GetColString fpsUtils

Calculates an Excel column name ('A', 'B' etc) from the zero-based column index

GetErrorValueStr fpsUtils

Returns the message text assigned to an error value

GetFileFormatName fpsUtils

Returns the name of the given spreadsheet file format.

Note
This function is deprecated. Use GetSpreadFormatName or GetSpreadTechnicalName of fpsRegFileformats instead in order to be able to process user-defined formats as well.
GetFontAsString fpsUtils

Combines the relevant font properties into a string
GetFormatFromFileName fpsUtils

Determines the spreadsheet type from the file type extension

GetFormatFromFileName fpsUtils

Determines the spreadsheet type from the file type extension

GetImageInfo fpsImages

Returns the width and height of the image loaded into the specified stream.

GetImageInfo fpsImages

Returns the width and height of the image loaded into the specified stream.

GetImageMimeType fpsImages

Returns the MimeType of the specified image type

GetImageTypeExt fpsImages

Returns the file extension belonging the specified image type. If there are several extensions the first one is selected. The extension is returned without a leading period.

GetImageTypeFromFileName fpsImages

Extracts the image file type identifier from the extension of the specified file name.

GetRegisteredCurrencies fpsCurrency

Writes all registered currency symbols to a string list

GetRowString fpsUtils

Calculates an Excel row name ('1', '2' etc) from the zero-based row index

GetSheetCellRangeString_ODS fpsUtils

GetSheetCellString_ODS fpsUtils

GUID_SpreadsheetControl fpspreadsheetctrls

Has3dFormula fpsUtils

Checks whether the specified cell contains a 3D formula, i.e. a reference to another sheet.

HasFormula fpsUtils

Checks whether the specified cell contains a formula.

HasZipHeader fpsUtils

Returns True if the file begins with a ZIP header *PK'#03#04. Needed for file format detection.
HEADER_FOOTER_INDEX_ALL fpsTypes

Index of the header/footer to be used for all pages
HEADER_FOOTER_INDEX_EVEN fpsTypes

Index of the header/footer to be used for even page numbers
HEADER_FOOTER_INDEX_FIRST fpsTypes

Index of the first header/footer to be used
HEADER_FOOTER_INDEX_ODD fpsTypes

Index of the header/footer to be used for odd page numbers
HighContrastColor fpsUtils

Returns the color index for black or white depending on a color being "bright" or "dark".

HTMLColorStrToColor fpsUtils

Converts a HTML color string to a TsColor alue. Needed for the ODS file format.

HTMLLengthStrToPts fpsUtils

Converts a HTML length string to points. The units are assumed to be the last two digits of the string, such as '1.25in'

HYPERLINK_FONTINDEX fpsTypes

Index of the hyperlink font in workbook's font list
IfThen fpsUtils

IfThen fpsUtils

Helper function to reduce typing: "if a conditions is true return the first number format, otherwise return the second format"

InitCell fpsUtils

Initalizes a new cell and presets the row and column fields of the cell record to the parameters passed to the procedure.

InitCell fpsUtils

Initalizes a new cell.

InitCryptoInfo fpsUtils

Initializes the fields of the encryption information block (TsCryptoInfo)
InitFormatRecord fpsUtils

Initializes the fields of a TsCellFormaRecord
InitFormatSettings fpsNumFormat

Initializes the FormatSettings of file a import/export parameters record to default values which can be replaced by the FormatSettings of the workbook's FormatSettings
InitFormatSettings fpsUtils

Initializes the FormatSettingsRecord to international (non-localized) values
InitHeaderFooterImageRecord fpsUtils

Initializes the fields of a TsHeaderFooterImage record
InitImageRecord fpsUtils

Initializes the fields of a TsImage record

InitReplaceParams fpsUtils

Initializes a RecplaceParams record. This record defined how the cell content found after searching will be replaced

InitSearchParams fpsUtils

Initializes a SearchParams record. This record defines the parameters needed when searching cells.

InitSortParams fpsUtils

Initializes a Sortparams record. This record sets paramaters used when cells are sorted.

InitUTF8FormatSettings fpsTypes

Creates a localized FPC format settings record in which all strings are encoded as UTF8.
IntegerToLE fpsUtils

Converts an integer value from big-endian to little-endian byte-order.

InToEMU fpsUtils

Converts inches to EMU (English metric units)

InToMM fpsUtils

Converts inches to millimeters

InToPts fpsUtils

Converts inches to points (72 pts = 1 inch)

IsBoolValue fpsNumFormat

Checks whether the specified text corresponds to a boolean value. For this, it must match the specified True and False text phrases.
IsCurrencyFormat fpsNumFormat

Checks whether the given number format code is for currency, i.e. requires a currency symbol.

IsCurrencyFormat fpsNumFormat

Checks whether the specified number format parameters apply to currency values.

IsDateFormat fpsNumFormat

Checks whether the specified number format parameters apply to a date value.

IsDateTimeFormat fpsNumFormat

Checks whether the given number format code is for date/time values.

IsDateTimeFormat fpsNumFormat

Checks whether the given string with formatting codes is for date/time values.

IsDateTimeFormat fpsNumFormat

Checks whether the specified number format parameters apply to date/time values.

IsDateTimeValue fpsNumFormat

Checks whether the specified text corresponds to a date/time value and returns True, its numerical value and its built-in numberformat if it is.
IsLongTimeFormat fpsNumFormat

Returns True if the specified format string represents a long time format, i.e. it contains two TimeSeparators.
IsNegative fpsCurrency

Checks whether the given number string is a negative value. In case of currency values, this can be indicated by brackets, or a minus sign at string start or end.

IsNumberValue fpsNumFormat

Checks whether the specified text corresponds to a numerical value. If it is then the function result is True, and the number value and its formatting parameters are returned.
ISO8601Format fpsUtils

Date formatting string for unambiguous date/time display as strings Can be used for text output when date/time cell support is not available
ISO8601FormatDateOnly fpsUtils

ISO 8601 date-only format, used in ODF/opendocument
ISO8601FormatExtended fpsUtils

Extended ISO 8601 date/time format, used in e.g. ODF/opendocument
ISO8601FormatExtendedUTC fpsUtils

Extended ISO 8601 date/time format, as UTC
ISO8601FormatHoursOverflow fpsUtils

ISO 8601 time-only format, with hours overflow
ISO8601FormatTimeOnly fpsUtils

ISO 8601 time-only format, used in ODF/opendocument
ISO8601StrToDateTime fpsUtils

Converts an ISO8601-formatted date/time to TDateTime Assumes UTC when the input string ends with 'Z' and converts to local time.
IsPaletteIndex fpsUtils

Checks whether the specified TsColor represents a palette index
IsSpreadsheetControl fpspreadsheetctrls

Interface which allows the workbook source to notify linked controls of changes in the associated workbook.
IsTextFormat fpsNumFormat

IsTimeFormat fpsNumFormat

Checks whether the given built-in number format code is for time values.

IsTimeFormat fpsNumFormat

Checks whether the given string with formatting codes is for time values.

IsTimeFormat fpsNumFormat

Checks whether the specified number format parameters apply to time values.

IsTimeIntervalFormat fpsNumFormat

Checks whether the specified number format parameters is a time interval format.

ITALIC_FONTINDEX fpsTypes

Index of italic default font in workbook's font list - not used directly
itBMP fpsImages

Identifier for the BMP image type (value 3)
itEMF fpsImages

Identifier for the EMF image type (value 7)
itGIF fpsImages

Identifier for the GIF image type (value 4)
itJPEG fpsImages

Identifier for the JPEG image type (value 1)
itPCX fpsImages

Identifier for the PCX image type (value 8)
itPNG fpsImages

Identifier for the PNG image type (value 0)
itSVG fpsImages

Identifier for the SVG image type (value 5)
itTIFF fpsImages

Identifier for the TIFF image type (value 2)
itUnknown fpsImages

Identifier for unknown image type
itWMF fpsImages

Identifier for the WMF image type (value 6)
LongRGBToExcelPhysical fpsUtils

Converts the RGB part of a LongRGB logical structure to its physical representation. In other words: RGBA (where A is 0 and omitted in the function call) => ABGR Needed for conversion of palette colors.

LumModOff fpsUtils

Performs a luminance modulation and luminance offset operation. Inspired by LibreOffice (https://docs.libreoffice.org/tools/html/color_8cxx_source.html), but does not match Excel exactly.

MakeLongDateFormat fpsNumFormat

Creates a long date format string out of a short date format string. Retains the order of year-month-day and the separators, but uses 4 digits for year and 3 digits of month.

MakeShortDateFormat fpsNumFormat

Modifies the short date format such that it has a two-digit year and a two-digit month. Retains the order of year-month-day and the separators.

MakeTimeIntervalMask fpsNumFormat

Creates a "time interval" format string having the first time code identifier in square brackets.

MAX_COL_COUNT fpsTypes

Maximum count of worksheet columns
mmToEMU fpsUtils

Converts millimeters to EMU (english metric units, 1 cm = 360000 EMU)

mmToIn fpsUtils

Converts millimeters to inches

mmToPts fpsUtils

Converts millimeters to points (72 pts = 1 inch)

ncfBCSVB fpsTypes

ncfBCVB fpsTypes

ncfBVCB fpsTypes

ncfBVSCB fpsTypes

ncfCMV fpsTypes

ncfCSMV fpsTypes

ncfCSVM fpsTypes

ncfCVM fpsTypes

ncfDefault fpsTypes

ncfMCSV fpsTypes

ncfMCV fpsTypes

ncfMVC fpsTypes

ncfMVSC fpsTypes

ncfVCM fpsTypes

ncfVMC fpsTypes

ncfVMSC fpsTypes

ncfVSCM fpsTypes

NO_CELL_BORDER fpsTypes

Border style to be used for "no border"
ParamsOfNumFormatStr fpsNumFormat

ParseCellColString fpsUtils

Parses a cell column string, like 'A' or 'CZ', into a zero-based column number. Note that there can be several letters to address more than 26 columns.

ParseCellRangeString fpsUtils

Parses a 3D cell and sheet range string in Excel A1 dialect. Returns the names of the limiting sheets and the indexes of the limiting borders. The function result is False if the provided string is not valid.
ParseCellRangeString fpsUtils

Parses strings like A5:C10 into a range selection information. Information on relative/absolute cells is ignored.

ParseCellRangeString fpsUtils

Parses strings like A5:C10 into a range selection information. Information on relative/absolute cells is ignored.

ParseCellRangeString fpsUtils

Parses strings like A5:C10 into a range selection information. Returns in AFlags also information on relative/absolute cells.

ParseCellRangeString fpsUtils

Parses strings like A5:C10 into a range selection information. Returns in AFlags also information on relative/absolute cells.

ParseCellRangeString_R1C1 fpsUtils

Extracts information on cell range from a cellrange string in "R1C1" notation. Returns in AFlags also information on relative/absolute cells.

ParseCellRangeString_R1C1 fpsUtils

Parses a 3D cell and sheet range string in Excel R1C1 dialect. Returns the names of the limiting sheets and the indexes of the limiting row/col borders. The function result is False if the provided string is not valid.

ParseCellRowString fpsUtils

Parses a cell row string to a zero-based row number.

ParseCellString fpsUtils

Parses a cell string, like 'A1' into zero-based column and row numbers Note that there can be several letters to address for more than 26 columns.

For compatibility with old version which does not return flags for relative cell addresses.

ParseCellString fpsUtils

Parses a cell string, like 'A1' into zero-based column and row numbers Note that there can be several letters to address for more than 26 columns. 'AFlags' indicates relative addresses.

Example: "AMP$200" –> (rel) column 1029 (= 26*26*1 + 26*16 + 26 - 1) (abs) row = 199 (abs)

ParseCellString_R1C1 fpsUtils

Extracts a cell's row and column index from a string in "R1C1" notation. Returns in AFlags also information on relative/absolute cells.

ParseCellString_R1C1 fpsUtils

Parses a cell string in "R1C1" notation into zero-based column and row numbers

For compatibility with old version which does not return flags for relative cell addresses.

ParseCellString_R1C1 fpsUtils

Parses a cell string in "R1C1" notation into zero-based column and row numbers AFlags indicates relative addresses.

ParseIntervalString fpsUtils

Parses strings like A5:A10 into an selection interval information

ParseSheetCellString fpsUtils

Parses a full cell string, like 'Sheet1!A1' into zero-based column and row numbers Note that there can be several letters to address for more than 26 columns.

For compatibility with old version which does not return flags for relative cell addresses.

PCell fpsTypes

Pointer to a TCell record
pcfCSV fpsTypes

pcfCV fpsTypes

pcfDefault fpsTypes

Codes for curreny format according to FormatSettings.CurrencyFormat: "C" = currency symbol, "V" = currency value, "S" = space character For the negative value formats, we use also: "B" = bracket, "M" = Minus

The order of these characters represents the order of these items.

Example: 1000 dollars –> "$1000" for pCV, or "1000 $" for pVsC 1000 dollars –> "($1000)" for nbCVb, or "-$ 1000" for nMCSV

Assignment taken from "sysstr.inc"
pcfVC fpsTypes

pcfVSC fpsTypes

PCol fpsTypes

Pointer to a TCol record
PRow fpsTypes

Pointer to a TRow record
PRPNItem fpsRPN

Pointer to a TPRNItem record

psAmbiguousSymbol fpsNumFormat

PsCellFormat fpsTypes

Pointer to a TsCellFormat record
PsCellRange fpsTypes

Pointer to a TsCellRange record
PsComment fpsTypes

Pointer to a TsComment record
psErrConditionalFormattingNotSupported fpsNumFormat

psErrGeneralExpected fpsNumFormat

psErrMultipleCurrSymbols fpsNumFormat

psErrMultipleExpChars fpsNumFormat

psErrMultipleFracSymbols fpsNumFormat

psErrNoUsableFormat fpsNumFormat

psErrNoValidColorIndex fpsNumFormat

psErrNoValidCompareNumber fpsNumFormat

psErrNoValidDateTimeFormat fpsNumFormat

psErrNoValidNumberFormat fpsNumFormat

psErrNoValidTextFormat fpsNumFormat

psErrQuoteExpected fpsNumFormat

psErrUnknownInfoInBrackets fpsNumFormat

PsHyperlink fpsTypes

Pointer to a TsHyperlink record
PsImage fpsTypes

Pointer to a TsImage record
PsNumFormatSection fpsNumFormat

Pointer to a parsed number format section
psOK fpsNumFormat

PtsToCm fpsUtils

Converts points to centimeters

PtsToIn fpsUtils

Converts points to inches (72 pts = 1 inch)

PtsToMM fpsUtils

Converts points to millimeters

PtsToPx fpsUtils

Converts points to pixels

PtsToTwips fpsUtils

Converts points to twips (1 twip = 1/20 point)

pxToPts fpsUtils

pxToPts fpsUtils

Converts pixels to points.

RandomString fpsUtils

Range fpsUtils

Creates a TsCellRange record from the coordinates of a single cell. The second corner coordinates are set equal to the first corner coordinates.
Range fpsUtils

Creates a TsCellRange record from the provided cell corner coordinates. Puts the coordinates into right order if needed.
Range3D fpsUtils

RegisterCurrencies fpsCurrency

RegisterCurrencies() registers the currency strings contained in the string list If AReplace is true, the list replaces the currently registered list.

RegisterCurrency fpsCurrency

Registers a currency symbol UTF8 string for usage by fpspreadsheet

Currency symbols are the key for detection of currency values. In order to reckognize strings as currency symbols they have to be registered in the internal CurrencyList.

Registration occurs automatically for USD, "$", the currencystring defined in the DefaultFormatSettings and for the currency symbols used explicitly when calling WriteCurrency or WriteNumerFormat.

RegisterImageType fpsImages

Registers an image type for usage in fpspreadsheet

RemoveCurrencySymbol fpsCurrency

Checks wheter a specified currency symbol is contained in a string, removes the currency symbol and returns the remaining string.

ReplaceFormatSettings fpsNumFormat

Replaces in AFormatSettings all members marked as having default values (#0, 1, '') by the corresponding values of the ADefaultFormats record
rfAllRel fpsTypes

Abbreviation of all-relative cell reference flags ()
Round fpsUtils

Special rounding function which avoids banker's rounding
RowHeightTypeNames fpsTypes

ROW_HEIGHT_CORRECTION fpsTypes

Takes account of effect of cell margins on row height by adding this value to the nominal row height. Note that this is an empirical value and may be wrong.
RPNBool fpsRPN

Creates a boolean value entry in the RPN array.

RPNCellOffset fpsRPN

Creates an entry in the RPN array for a relative cell reference as used in shared formulas. The given parameters indicate the relativ offset between the current cell coordinates and a reference rell.

RPNCellRange fpsRPN

Creates an entry in the RPN array for a range of cells, specified by an Excel-style address, e.g. A1:G5. As in Excel, use a $ sign to indicate absolute addresses.

RPNCellRange fpsRPN

Creates an entry in the RPN array for a range of cells, specified by the row/column indexes of the top/left and bottom/right corners of the block. The flags indicate relative indexes.

RPNCellRange3D fpsRPN

RPNCellRef fpsRPN

Creates an entry in the RPN array for a cell reference, specifed by its address, e.g. 'A1'. Takes care of absolute and relative cell addresses. "Cell reference" means that all properties of the cell can be handled. Note that most Excel formulas with cells require the cell value only (–> RPNCellValue)

RPNCellRef fpsRPN

Creates an entry in the RPN array for a cell reference, specifed by its row and column index and flags containing information on relative addresses. "Cell reference" means that all properties of the cell can be handled. Note that most Excel formulas with cells require the cell value only (–> RPNCellValue)

RPNCellRef3D fpsRPN

RPNCellValue fpsRPN

Creates an entry in the RPN array for a cell value, specifed by its address, e.g. 'A1'. Takes care of absolute and relative cell addresses.

RPNCellValue fpsRPN

Creates an entry in the RPN array for a cell value, specifed by its row and column index and a flag containing information on relative addresses.

RPNCellValue3D fpsRPN

RPNErr fpsRPN

Creates an entry in the RPN array with an error value.

RPNFunc fpsRPN

Creates an entry in the RPN array for an Excel function or operation specified by its name. Note that array elements for all needed parameters must have been created before.

RPNFunc fpsRPN

Creates an entry in the RPN array for an Excel spreadsheet function specified by its name. Specify the number of parameters used. They must have been created before.

RPNFunc fpsRPN

Creates an entry in the RPN array for an operation specified by its TokenID (–> TFEKind). Note that array elements for all needed parameters must have been created before.

RPNInteger fpsRPN

Creates an entry in the RPN array for an integer value

RPNMissingArg fpsRPN

Creates an entry in the RPN array for a missing argument in of function call. Use this in a formula to indicate a missing argument

RPNNumber fpsRPN

Creates an entry in the RPN array for a floating point number.

RPNParenthesis fpsRPN

Creates an entry in the RPN array which puts the current operator in parenthesis. For display purposes only, does not affect calculation.

RPNString fpsRPN

Creates an entry in the RPN array for a string.

SafeQuoteStr fpsUtils

Makes sure that the string is encloed by quotes ("). Avoids duplicate quotation.
SameCellBorders fpsUtils

SameFont fpsUtils

Checks whether two fonts are equal

SameFont fpsUtils

Checks whether two fonts are equal

SameRichTextParams fpsUtils

Checks wether ARtp1 and ARtp2 are the same rich-text parameters.
scAqua fpsTypes

scBeige fpsTypes

scBlack fpsTypes

rgb value of black color, BIFF2 palette index 0, BIFF8 index 8
scBlue fpsTypes

rgb value of blue color, BIFF2 palette index 4, BIFF8 indexes 12 and 39
scBlueGray fpsTypes

scBlueGrey fpsTypes

scBrown fpsTypes

scCoral fpsTypes

sccTransparent fpsChart

scCyan fpsTypes

rgb value of cyan color, BIFF2 palette index 7, BIFF8 indexes 15
scDarkBlue fpsTypes

rgb value of dark blue color
scDarkBrown fpsTypes

scDarkGreen fpsTypes

rgb value of dark green color, BIFF8 index 17
scDarkPurple fpsTypes

scDarkRed fpsTypes

rgb value of dark red color, BIFF8 indexes 16 and 35
scDarkTeal fpsTypes

scFuchsia fpsTypes

scGold fpsTypes

scGray fpsTypes

rgb value of grey color
scGray10pct fpsTypes

scGray20pct fpsTypes

scGray25pct fpsTypes

scGray40pct fpsTypes

scGray50pct fpsTypes

scGray80pct fpsTypes

scGreen fpsTypes

rgb value of green color, BIFF2 palette index 3, BIFF8 index 11
scGrey fpsTypes

rgb value of gray color
scGrey10pct fpsTypes

scGrey20pct fpsTypes

scIceBlue fpsTypes

scIndigo fpsTypes

scIvory fpsTypes

scLavander fpsTypes

scLightBlue fpsTypes

scLightGreen fpsTypes

scLightOrange fpsTypes

scLightTurquoise fpsTypes

scLightYellow fpsTypes

scLime fpsTypes

scMagenta fpsTypes

rgb value of magenta color, BIFF2 palette index 6, BIFF8 index 14 and 33
scMaroon fpsTypes

scNavy fpsTypes

scNotDefined fpsTypes

Identifier for not-defined color
scOceanBlue fpsTypes

scOlive fpsTypes

rgb value of olive color
scOliveGreen fpsTypes

scOrange fpsTypes

scPaleBlue fpsTypes

scPaletteIndexMask fpsTypes

Identifier for palette index encoded into the TsColor
scPeriwinkle fpsTypes

scPink fpsTypes

scPlum fpsTypes

scPurple fpsTypes

rgb value of purple color, BIFF8 palette indexes 20 and 36
scRed fpsTypes

rgb value of red color, BIFF2 palette index 2, BIFF8 index 10
ScreenPixelsPerInch fpsUtils

Default value for the screen pixel density (pixels per inch). Is needed for conversion of distances to pixels
scRGBMask fpsTypes

Mask for the rgb components contained in the TsColor
scRose fpsTypes

scSeaGreen fpsTypes

scSilver fpsTypes

rgb value of silver color
scSkyBlue fpsTypes

scTan fpsTypes

scTeal fpsTypes

rgb value of teal color, BIFF8 palette index 21 and 38
scTransparent fpsTypes

Identifier for transparent color
scTurquoise fpsTypes

scVeryDarkGreen fpsTypes

scWheat fpsTypes

scWhite fpsTypes

rgb value of white color, BIFF2 palette index 1, BIFF8 index 9
scYellow fpsTypes

rgb value of yellow color, BIFF2 palette index 5, BIFF8 indexes 13 and 34
SetAsPaletteIndex fpsUtils

Constructs a TsColor from a palette index. It has bit 15 in the high-order byte set.
sfidUnknown fpsTypes

Format identifier of an undefined, unknown, etc. file format.

Each unit implementing a reader/writer will define an sfidXXXX value as a numerical identifer of the file format. In case of the built-in formats, the identifier is equal to the ord of the TsSpreadsheetFormat value.
SheetNameNeedsQuotes fpsUtils

Determines whether a worksheet name must to be quoted. This is needed when the name begins with a numeral or a period, or when the name contains a space character. Also required if the name contains '<' or '>'.

SHEETSEPARATOR fpsTypes

Separator between worksheet name and cell (range) reference in an address
SizeUnitNames fpsTypes

Names of the size units
SplitHyperlink fpsUtils

Splits a hyperlink string at the # character.

SplitStr fpsUtils

Splits a string at the specified delimiters into individual strings and passes them in an array.
SplitTextAndRichTextParams fpsUtils

Split text and rich-text parameters from the combined string needed for StringHashList
SpreadsheetFormatInClipboard fpspreadsheetctrls

Returns True if the clipboard contains a format good for pasting into a worksheet grid.
StringToBytes fpsUtils

Copies a string to a TBytes variable

@param AString The string to be copied @returns A dynamic array of byte, type TBytes
StripAMPM fpsNumFormat

Removes an AM/PM formatting code from a given time formatting string. Variants of "AM/PM" are considered as well. The string is left unchanged if it does not contain AM/PM codes.

STR_COMMA_SEPARATED_EXTENSION fpsTypes

Default extension of comma-separated-values file
STR_ERR_ARG_ERROR fpsTypes

STR_ERR_DIVIDE_BY_ZERO fpsTypes

STR_ERR_EMPTY_INTERSECTION fpsTypes

Error values
STR_ERR_FORMULA_NOT_SUPPORTED fpsTypes

STR_ERR_ILLEGAL_REF fpsTypes

STR_ERR_OVERFLOW fpsTypes

STR_ERR_UNKNOWN fpsTypes

STR_ERR_WRONG_NAME fpsTypes

STR_ERR_WRONG_TYPE fpsTypes

STR_EXCEL_EXTENSION fpsTypes

Default binary Excel file extension (<= Excel 97)
STR_FALSE fpsTypes

String for boolean value False
STR_FILEFORMAT_CSV fpsTypes

Explanatory name of sfCSV file format
STR_FILEFORMAT_EXCEL_2 fpsTypes

Explanatory name of sfBiff2 file format
STR_FILEFORMAT_EXCEL_5 fpsTypes

Explanatory name of sfBiff5 file format
STR_FILEFORMAT_EXCEL_8 fpsTypes

Explanatory name of sfBiff8 file format
STR_FILEFORMAT_EXCEL_XLSX fpsTypes

Explanatory name of sfOOXLM file format
STR_FILEFORMAT_EXCEL_XML fpsTypes

Explanatory name of sfExcelXML file format
STR_FILEFORMAT_HTML fpsTypes

Explanatory name of sfHTML file format
STR_FILEFORMAT_OPENDOCUMENT fpsTypes

Explanatory name of sfOpenDocument file format
STR_FILEFORMAT_WIKITABLE_PIPES fpsTypes

Explanatory name of sfWikiTablePipes file format
STR_FILEFORMAT_WIKITABLE_WIKIMEDIA fpsTypes

Explanatory name of sfWikiTableWikiMedia file format
STR_HTML_EXTENSION fpsTypes

Default extension for HTML files
STR_OOXML_EXCEL_EXTENSION fpsTypes

Default xml Excel file extension (>= Excel 2007)
STR_OPENDOCUMENT_CALC_EXTENSION fpsTypes

Default OpenDocument spreadsheet file extension
STR_TRUE fpsTypes

String for boolean value True
STR_WIKITABLE_PIPES_EXTENSION fpsTypes

Default extension of wikitable files in pipes format
STR_WIKITABLE_WIKIMEDIA_EXTENSION fpsTypes

Default extension of wikitable files in wikimedia format
STR_XML_EXCEL_EXTENSION fpsTypes

Default xml Excel file extension (Excel XP, 2003)
TAnsiCharSet fpsUtils

Set of ansi characters
TBasicOperationTokens fpsTypes

These tokens identify basic operations in RPN formulas.
TCell fpsTypes

Cell structure for TsWorksheet The cell record contains information on the location of the cell (row and column index), on the value contained (number, date, text, ...), on formatting, etc.

Never suppose that all *Value fields are valid, only one of the ContentTypes is valid. For other fields use TsWorksheet.ReadAsText and similar methods

TCellContentType fpsTypes

Describes the type of content in a cell of a TsWorksheet

TCol fpsTypes

The record TCol contains information about a spreadsheet column:

Only columns with non-default width or non-default format or non-default Options have a column record.
TFEKind fpsTypes

Tokens to identify the elements in an expanded RPN formula.

Note
When adding or rearranging items

  • make sure that the subtypes TOperandTokens and TBasicOperationTokens are complete

  • make sure to keep the table "TokenIDs" in unit xlscommon in sync
TGetImageSizeFunc fpsImages

TintedColor fpsUtils

Excel defines theme colors and applies a "tint" factor (-1...+1) to darken or brighten them.

This method "tints" a given color with a factor

The algorithm is described in http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.backgroundcolor.aspx

TOperandTokens fpsTypes

These tokens identify operands in RPN formulas.
TRGBA fpsUtils

Color value, composed of r(ed), g(reen) and b(lue) components
TRow fpsTypes

The record TRow contains information about a spreadsheet row:

Only rows with non-default height or non-default format or non-default Options have a row record.
TRPNItem fpsRPN

Helper record for simplification of RPN formula creation

TryFractionStrToFloat fpsUtils

Assumes that the specified text is a string representation of a mathematical fraction and tries to extract the floating point value of this number. Returns also the maximum count of digits used in the numerator or denominator of the fraction

Example: AText := '1 3/4' –> ANumber = 1.75; AMaxDigits = 1; Result = true

TryPercentStrToFloat fpsUtils

Converts a percent-formatted string to a decimal number. Example: '150%' –> 1.5
TryStrToCellRange_ODS fpsUtils

Extracts sheets names and cell coordinates from a cell range string in OpenDocument syntax, e.g. "Table1.A1:Table2.B4"
TryStrToCurrency fpsCurrency

Checks whether a string is a number with attached currency symbol. Looks also for negative values in brackets.

TryStrToErrorValue fpsUtils

TryStrToErrorValue fpsUtils

Returns the error value code from a string. Result is False, if the string does not match one of the predefined error strings.

TryStrToFloatAuto fpsUtils

Converts a string to a floating point number. No assumption on decimal and thousand separator are made.

Is needed for reading CSV files.
TsAreaSeries fpsChart

TsAutoExpandMode fpspreadsheetgrid

TsAutoExpandModes fpspreadsheetgrid

TsBarSeries fpsChart

TsBasicWorkbook fpsTypes

Basic worksheet class to avoid circular unit references. It contains only those properties and methods which do not require any other unit than fpstypes.
TsBasicWorksheet fpsTypes

Basic worksheet class to avoid circular unit references. It has only those properties and methods which do not require any other unit than fpstypes.
TsBiDiMode fpsTypes

Switch a cell from left-to-right to right-to-left orientation
TsBubbleSeries fpsChart

TsBubbleSizeMode fpsChart

TsCalcState fpsTypes

Cell calculation state

being calculated. result is stored in the cell's data fields.
TsCallback fpsTypes

Callback function, e.g. for iterating the internal AVL trees of the workbook/sheet
TsCellBorder fpsTypes

Indicates the border for a cell. If included in the CellBorders set the corresponding border is drawn in the style defined by the CellBorderStyle.

TsCellBorders fpsTypes

Indicates the border for a cell
TsCellBorderStyle fpsTypes

The Cell border style reocrd contains the linestyle and color of a cell border. There is a CellBorderStyle for each border.

TsCellBorderStyles fpsTypes

The cell border styles of each cell border are collected in this array.
TsCellCombobox fpspreadsheetctrls

TsCellCombobox is a multi-purpose combobox for selection of formatting items of a cell
TsCellCompareEvent fpSpreadsheet

This event can be used to override the built-in comparing function which is called when cells are sorted.
TsCellCoord fpsTypes

Record combining a cell's row and column indexes

TsCellEdit fpspreadsheetctrls

TsCellEdit allows to edit the content or formula of the active cell of a worksheet, simular to Excel's cell editor above the cell grid.
TsCellEvent fpSpreadsheet

This event fires whenever a cell value or cell formatting changes. It is handled by TsWorkbookSource to update the listening visual controls.
TsCellFlag fpsTypes

Cell flag providing particular information about the state of a cell

TsCellFlags fpsTypes

Set of cell flags
TsCellFormat fpsTypes

Record containing all details for cell formatting
TsCellFormatItem fpspreadsheetctrls

TsCellFullCompareEvent fpSpreadsheet

This event can be used to override the built-in comparing function which is called when cells are sorted.
TsCellIndicator fpspreadsheetctrls

TsCellIndicator displays the address of the currently active cell of the worksheet and workbook. Editing the address allows to jump to the corresponding cell.
TsCellProtection fpsTypes

Cell protection options
TsCellProtections fpsTypes

TsCellRange fpsTypes

Record combining row and column corner indexes of a range of cells

TsCellRange3d fpsTypes

Record combining sheet index and row/column corner indexes of a 3d cell range

TsCellRange3dArray fpsTypes

Array of 3d cell ranges
TsCellRangeArray fpsTypes

Array with cell ranges
TsCFCellRule fpsConditionalFormat

TsCFColorRangeRule fpsConditionalFormat

TsCFCondition fpsConditionalFormat

Enumeration of the available conditions to be fulfilled by a cell value in conditional formatting
TsCFDatabarRule fpsConditionalFormat

TsCFIconSet fpsConditionalFormat

Enumeration of the icon sets available for conditional formatting
TsCFIconSetRule fpsConditionalFormat

TsCFRule fpsConditionalFormat

TsCFRules fpsConditionalFormat

Rule for a conditional format
TsCFValueKind fpsConditionalFormat

Enumeration of the criteria to be fulfilled by the values used in "color range" and "data bar" conditional formatting.
TsChart fpsChart

TsChartAxis fpsChart

TsChartAxisAlignment fpsChart

TsChartAxisLink fpsChart

TsChartAxisPosition fpsChart

TsChartAxisTick fpsChart

TsChartAxisTicks fpsChart

TsChartCellAddr fpsChart

TsChartColor fpsChart

TsChartDataLabel fpsChart

TsChartDataLabels fpsChart

TsChartDataPointStyle fpsChart

TsChartDataPointStyleList fpsChart

TsChartElement fpsChart

TsChartErrorBarKind fpsChart

TsChartErrorBars fpsChart

TsChartFill fpsChart

TsChartFillElement fpsChart

TsChartFillStyle fpsChart

TsChartGradient fpsChart

TsChartGradientList fpsChart

TsChartGradientStep fpsChart

TsChartGradientSteps fpsChart

TsChartGradientStyle fpsChart

TsChartHatch fpsChart

TsChartHatchList fpsChart

TsChartHatchStyle fpsChart

TsChartImage fpsChart

TsChartImagelist fpsChart

TsChartInterpolation fpsChart

TsChartLabelCalloutShape fpsChart

TsChartLabelPosition fpsChart

TsChartLegend fpsChart

TsChartLegendPosition fpsChart

TsChartLine fpsChart

TsChartLineSegment fpsChart

TsChartLineStyle fpsChart

TsChartLineStyleList fpsChart

TsChartList fpsChart

TsChartRange fpsChart

TsChartSeries fpsChart

TsChartSeriesClass fpsChart

TsChartSeriesList fpsChart

TsChartSeriesSymbol fpsChart

TsChartStackMode fpsChart

TsChartText fpsChart

TsChartTrendline fpsChart

TsChartType fpsChart

TsColEvent fpSpreadsheet

This event fires whenever a column width or column format changes. It is handled by TsWorkbookSource to update the listening visual controls.
TsColor fpsTypes

Colors in fpspreadsheet are given as rgb values in little-endian notation (i.e. "r" is the low-value byte). The highest-value byte, if not zero, indicates special colors.

Note
This byte order in TsColor is opposite to that in HTML colors.
TsColorNameEvent fpspreadsheetctrls

TsColRowOption fpsTypes

Column or row options

TsColRowOptions fpsTypes

TsColWidthtype fpsTypes

Types of column widths

TsComment fpsTypes

The record TsComment describes a comment attached to a cell.

TsCompareOperation fpsTypes

Identifier for a compare operation
TsConditionalFormat fpsConditionalFormat

Conditional format item. These items are stored in an instance of TsConditionalFormatList.
TsConditionalFormatList fpsConditionalFormat

List of conditional formats. Maintained by the workbook.
TsCopyOperation fpsTypes

Identifier for a copy operation
TsCryptoAlgorithm fpsTypes

Algorithm used for encryption/decryption
TsCryptoInfo fpsTypes

Record collection information for encryption/decryption
TsCSVLineEnding fpsTypes

Line ending used in CSV files
TsCSVParams fpsTypes

Parameters controlling reading from and writing to CSV files

TsCustomLineSeries fpsChart

TsCustomScatterSeries fpsChart

TsCustomWorksheetGrid fpspreadsheetgrid

TsCustomWorksheetGrid is the ancestor of TsWorksheetGrid and is able to display spreadsheet data along with their formatting.
TsDecsChars fpsNumFormat

Set of characters
TsEditorLineMode fpspreadsheetgrid

TsEmbeddedObj fpsImages

TsErrorValue fpsTypes

Error code values

TsFilledRadarSeries fpsChart

TsFillPattern fpsTypes

Fill pattern record
TsFillStyle fpsTypes

Style of fill pattern for cell backgrounds
TsFont fpsTypes

Font record used in fpspreadsheet. Contains the font name, the font size (in points), the font style, and the font color.
TsFontArray fpsTypes

Array of font records
TsFontPosition fpsTypes

Font position (subscript or superscript)

TsFontStyle fpsTypes

Font style (redefined to avoid usage of graphics unit)

TsFontStyles fpsTypes

Set of font styles
TsFormatTarget fpspreadsheetctrls

TsFormulaCorrection fpSpreadsheet

FSome action has an effect on existing formulas which must be corrected.
TsFormulaDialect fpsTypes

Formula dialect

TsFormulaElement fpsTypes

Elements of an expanded RPN formula.

Note
If ElementKind is fekCellOffset, "Row" and "Col" have to be cast to signed integers!
TsFormulaFlag fpsTypes

Flag indicating the calculation state of a formula.

TsFormulaFlags fpsTypes

Set of formula calculation state flags, TsFormulaFlag
TsGetCellTextEvent fpspreadsheetgrid

TsHeaderFooterImage fpsTypes

Image embedded in header or footer

TsHeaderFooterImages fpsTypes

Array with all possible images in a header or a footer
TsHeaderFooterSectionIndex fpsTypes

Headers and footers are divided into three parts: left, center and right
TsHorAlignment fpsTypes

Indicates horizontal text alignment in cells

TsHyperlink fpsTypes

The record TsHyperlink contains info on a hyperlink in a cell

TsHyperlinkClickEvent fpspreadsheetgrid

TsImage fpsTypes

Embedded image

TsImageType fpsImages

TsInspectorExpandedNode fpspreadsheetctrls

Inspector expanded nodes
TsInspectorExpandedNodes fpspreadsheetctrls

TsInspectorMode fpspreadsheetctrls

Classification of data displayed by the SpreadsheetInspector. Each item can be assigned to a tab of a TabControl.
TsLineSeries fpsChart

TsLineStyle fpsTypes

Line style (for cell borders)

TsMetaData fpsTypes

Workbook metadata
TsMultilineStringCellEditor fpspreadsheetgrid

TSngPoint fpsChart

TsNotificationItem fpspreadsheetctrls

Describes during communication between WorkbookSource and visual controls which kind of item has changed: the workbook, the worksheet, a cell value, or a cell formatting, etc.
TsNotificationItems fpspreadsheetctrls

This set accompanies the notification between WorkbookSource and visual controls and describes which items have changed in the spreadsheet.
TsNotifyEvent fpSpreadsheet

TsNumberFormat fpsTypes

Builtin number formats. Only uses a subset of the default formats, enough to be able to read/write date/time values. nfCustom allows to apply a format string directly.
TsNumFormatElement fpsNumFormat

Element of the parsed number format sequence. Each element is identified by a token and has optional parameters stored as integer, float, and/or text.

TsNumFormatElements fpsNumFormat

Array of parsed number format elements
TsNumFormatKind fpsNumFormat

Summary information classifying a number format section
TsNumFormatKinds fpsNumFormat

Set of summary elements classifying and describing a number format section
TsNumFormatList fpsNumFormat

List containing parsed number format parameters
TsNumFormatParams fpsNumFormat

Describes a parsed number format and provides all the information to convert a number value to a number or date/time string. These data are created by the number format parser from a format string.
TsNumFormatParamsClass fpsNumFormat

Class of number format parameters
TsNumFormatParser fpsNumFormat

TsNumFormatSection fpsNumFormat

Number format string can be composed of several parts separated by a semicolon. The number format parser extracts the format information into individual sections for each part
TsNumFormatSections fpsNumFormat

Array of parsed number format sections
TsNumFormatToken fpsNumFormat

Tokens used by the elements of the number format parser. If, e.g. a format string is "0.000" then the number format parser detects the following three tokens

nftIntZeroDigit with integer value 1 (i.e. 1 zero-digit for the integer part) nftDecSep (i.e. decimal separator) ntZeroDecs with integer value 2 (i.e. 3 decimal places.
TsOnQueryPassword fpsTypes

TsPageOrientation fpsTypes

Page orientation for printing

TsPieSeries fpsChart

TsPrintOption fpsTypes

Options for the print layout records
TsPrintOptions fpsTypes

Set of options used by the page layout
TsRadarSeries fpsChart

TsReadWriteFlag fpsTypes

Flag set during reading or writing of a workbook

TsRelFlag fpsTypes

Flags to mark the address or a cell or a range of cells to be absolute or relative. They are used in the set TsRelFlags.

TsRelFlags fpsTypes

Flags to mark the address of a cell or a range of cells to be absolute or relative. It is a set consisting of TsRelFlag elements.
TsRemoveWorksheetEvent fpSpreadsheet

Event procedure called when a worksheet is removed. ASheetIndex = -1 –> all sheets
TsReplaceOption fpsTypes

Replace option
TsReplaceOptions fpsTypes

A set of replace options
TsReplaceParams fpsTypes

Replace parameters
TsRichTextParam fpsTypes

Parameter describing formatting of an text range in cell text

at which the FontIndex should be used. be used for painting the characters following the FirstIndex. the character at FirstIndex.
TsRichTextParams fpsTypes

Parameters describing formatting of text ranges in cell text
TsRowColRange fpsTypes

Record containing limiting indexes of column or row range

TsRowEvent fpSpreadsheet

This event fires whenever a row height or row format changes. It is handled by TsWorkbookSource to update the listening visual controls
TsRowHeightType fpsTypes

Types of row heights

TsRPNFormula fpsTypes

RPN formula. Similar to the expanded formula, but in RPN notation. Simplifies the task of format writers which need RPN
TsScatterSeries fpsChart

TsSearchOption fpsTypes

Search option
TsSearchOptions fpsTypes

A set of search options
TsSearchParams fpsTypes

Search parameters
TsSearchWithin fpsTypes

Defines which part of document is scanned
TsSelectionDirection fpsUtils

Selection direction along column or along row
TsSelPen fpspreadsheetgrid

TsSheetOption fpsTypes

Worksheet user interface options:

TsSheetOptions fpsTypes

Set of user interface options (

TsSizeUnits fpsTypes

Units for size dimensions

Adjustment of the fpsutils.ScreenPixelsPerInch is required for accurate values in case of high-resolution monitors.
TsSliceOrder fpsChart

TsSortKey fpsTypes

Sort key: parameters for sorting

TsSortKeys fpsTypes

Array of sort keys for multiple sorting criteria
TsSortOption fpsTypes

Options for sorting numeric characters
TsSortOptions fpsTypes

Set of options for sorting
TsSortParams fpsTypes

Complete set of sorting parameters

TsSortPriority fpsTypes

Sort priority i.e. will be put before text i.e. will be sorted after text.
TsSpreadFormatID fpsTypes

Numerical identifier for file formats, built-in and user-provided
TsSpreadFormatIDArray fpsTypes

Array of file format identifiers
TsSpreadsheetFormat fpsTypes

Built-in file formats of fpspreadsheet

TsSpreadsheetFormatLimitations fpsTypes

This record collect limitations of a particular file format.

TsSpreadsheetInspector fpspreadsheetctrls

TsSpreadsheetInspector displays all properties of a workbook, worksheet, cell content and cell formatting in a way similar to the Object Inspector of Lazarus.
TsStockSeries fpsChart

TsStreamParam fpsTypes

Parameters for stream access
TsStreamParams fpsTypes

TsTextRotation fpsTypes

Text rotation formatting. The text is rotated relative to the standard orientation, which is from left to right horizontal:

       >
       ABC

So 90 degrees clockwise means that the text will be:

|  A
|  B
v  C

And 90 degree counter clockwise will be:

ˆ  C
|  B
|  A

Due to limitations of the text mode the characters are not rotated here. There is, however, also a "stacked" variant which looks exactly like the 90-degrees-clockwise case.

TsTrendlineEquation fpsChart

TsTrendlineType fpsChart

TStringArray fpsUtils

Array of strings
TsUsedFormattingField fpsTypes

List of possible formatting fields

TsUsedFormattingFields fpsTypes

Describes which formatting fields are active (see TsUsedFormattingField).
TsVertAlignment fpsTypes

Indicates vertical text alignment in cells

TsWorkbook fpSpreadsheet

The workbook contains the worksheets and provides methods for reading from and writing to file.
TsWorkbookEvent fpSpreadsheet

Event procedure containing a specific workbook
TsWorkbookOption fpsTypes

Option flags for the workbook

TsWorkbookOptions fpsTypes

Set of option flags for the workbook (see TsWorkbookOption
TsWorkbookProtection fpsTypes

Workbook protection options
TsWorkbookProtections fpsTypes

TsWorkbookReadCellDataEvent fpSpreadsheet

Event fired when reading a file in virtual mode. Read data are provided in the "ADataCell" (which is not added to the worksheet in virtual mode).
TsWorkbookSource fpspreadsheetctrls

TsWorkbookSource links a workbook to the visual spreadsheet controls and help to display or edit the workbook without written code.
TsWorkbookSourceErrorEvent fpspreadsheetctrls

Event handler procedure for displaying a message if an error or warning occurs during reading of a workbook.
TsWorkbookTabControl fpspreadsheetctrls

TsWorkbookTabControl is a tab control which displays the sheets of the workbook currently loaded by the WorkbookSource in tabs. Selecting another tab is communicated to other spreadsheet controls via the WorkbookSource.
TsWorksheet fpSpreadsheet

The worksheet contains a list of cells and provides a variety of methods to read or write data to the cells, or to change their formatting.
TsWorksheetEvent fpSpreadsheet

Event procedure containing a specific worksheet
TsWorksheetGrid fpspreadsheetgrid

TsWorksheetGrid is a grid which displays spreadsheet data along with formatting. As it is linked to an instance of TsWorkbook, it provides methods for reading data from or writing to spreadsheet files. It has the same funtionality as TsCustomWorksheetGrid, but has published all properties.
TsWorksheetIndicator fpspreadsheetctrls

TsWorksheetIndicator is a combobox control which displays the sheets of the workbook currently loaded by the WorkbookSource.
TsWorksheetProtection fpsTypes

Worksheet protection options. All used items are locked.
TsWorksheetProtections fpsTypes

TsWorksheetWriteCellDataEvent fpSpreadsheet

Event fired when writing a file in virtual mode. The event handler has to pass data ("AValue") and formatting style to be copied from a template cell ("AStyleCell") to the writer
TwipsToPts fpsUtils

Excel's unit of row heights is "twips", i.e. 1/20 point. Converts Twips to points.

UM_VALIDATEINPUT fpspreadsheetctrls

User-defined message for input validation
UNASSIGNED_ROW_COL_INDEX fpsTypes

Unassigned row/col index
UnquoteStr fpsUtils

Removes quotation characters which enclose a string
UnregisterCurrency fpsCurrency

Removes registration of a currency symbol string for usage by fpspreadsheet

Unused fpsUtils

Silence warnings due to an unused parameter
Unused fpsUtils

Silence warnings due to three unused parameters
Unused fpsUtils

Silence warnings due to two unused parameters
UTF8CodePoints fpsUtils

Splits the UTF8-encoded string into its code-points ("characters") and returns them as an array of string (sa). The result of the function is false if at least one codepoint is broken UTF8.
ValidUTF8Text fpsUtils

WideStringLEToN fpsUtils

Converts a widestring from little-endian to big-endian byte-order.

WideStringToLE fpsUtils

Converts a widestring from big-endian to little-endian byte-order.

WordLEtoN fpsUtils

Converts a word value from little-endian to big-endian byte-order.

WordToLE fpsUtils

WordLEToLE converts a word value from big-endian to little-endian byte order.

ZERO_WIDTH_FACTOR fpsTypes

Ratio of the width of the "0" character to the font size. Empirical value to match Excel and LibreOffice column withs. Needed because Excel defines colum width in terms of count of the "0" character.


Legend

Marker | Visibility
Strict Private | Strict Private
Private | Private
Strict Protected | Strict Protected
Protected | Protected
Public | Public
Published | Published
Automated | Automated
Implicit | Implicit