Unit rXLSExport

Description

rXLSExport unit contains TrXLSExport - non visual component which provides functionality for exporting of any data directly to XLS file using OLE; it can easily export data from any dataset or DBGrid.

Updated version compatible with Delphi2010+. Splash screen in demo version.

Overview

Classes, Interfaces, Objects and Records

Name Description
Class THackCustomDBGrid  
Class THackCustomTreeView  
Record TDatabarSetting setting for Databar used by TrXLSExport event
Record TColorScaleSetting setting for ColorScale used by TrXLSExport event
Record TIconSetSetting setting for IconSet used by TrXLSExport event
Class TrXLSExport non visual component which provides functionality for exporting of any data directly to XLS file using OLE

Types

TXLSCellFormat = (...);
TXLSCellFormats = set of TXLSCellFormat;
TXLSExportOption = (...);
TXLSExportOptions = set of TXLSExportOption;
TXLSExportColor = (...);
TXLSExportColors = set of TXLSExportColor;
TXLSVerticalAlignment = (...);
TGetFieldType = procedure(Sender: TObject; Field: TField; var FieldType: integer) of object;
TPreparePictureEvent = procedure(Sender: TObject; Row, Column: integer; Field: TField; Picture: TPicture) of object;
TPrepareDatabarEvent = procedure(Sender: TObject; Field: TField; var DatabarSetting: TDatabarSetting) of object;
TPrepareColorScaleEvent = procedure(Sender: TObject; Field: TField; var ColorScaleSetting: TColorScaleSetting) of object;
TPrepareIconSetEvent = procedure(Sender: TObject; Field: TField; var IconSetSetting: TIconSetSetting) of object;

Constants

xlSYLK = 2;
xlCSV = 6;
xlCSVWindows = 23;
xlCSVMSDOS = 24;
xlTextWindows = 20;
xlUnicodeText = 42;
xlExcel8 = 56;
xlExcel9795 = 43;
xlExcel12 = 50;
xlOpenXMLWorkbook = 51;
xlOpenXMLWorkbookMacroEnabled = 52;
xlXMLSpreadsheet = 46;
xlOpenDocumentSpreadsheet = 60;
xlWorkbookNormal = -4143;
xlTemplate = 17;
xlHairline = 1;
xlMedium = -4138;
xlThick = 4;
xlThin = 2;
xlAllBorders = 0;
xlDiagonalDown = 5;
xlDiagonalUp = 6;
xlEdgeBottom = 9;
xlEdgeLeft = 7;
xlEdgeRight = 10;
xlEdgeTop = 8;
xlInsideHorizontal = 12;
xlInsideVertical = 11;
xlContinuous = 1;
xlDash = -4115;
xlDashDot = 4;
xlDashDotDot = 5;
xlDot = -4118;
xlDouble = -4119;
xlLineStyleNone = -4142;
xlSlantDashDot = 13;
xlLandscape = $00000002;
xlPortrait = $00000001;
cColWidthPixelRatioDefault = 9.15;
cRowHeightPixelRatioDefault = 1.65;
cFldTypeNormal = 0;
cFldTypePicture = 1;
cFldTypeColor = 2;
cFldTypeDataBar = 3;
cFldTypeColorScale = 4;
cFldTypeIconSet = 5;
xl3Arrows = 1;
xl3ArrowsGray = 2;
xl3Flags = 3;
xl3Signs = 6;
xl3Stars = 18;
xl3Symbols = 7;
xl3Symbols2 = 8;
xl3TrafficLights1 = 4;
xl3TrafficLights2 = 5;
xl3Triangles = 19;
xl4Arrows = 9;
xl4ArrowsGray = 10;
xl4CRV = 12;
xl4RedToBlack = 11;
xl4TrafficLights = 13;
xl5Arrows = 14;
xl5ArrowsGray = 15;
xl5Boxes = 20;
xl5CRV = 16;
xl5Quarters = 17;
xlCustomSet = -1;
xlDayLeadingZero = $0000002A;
xlDecimalSeparator = $00000003;
xlMonthLeadingZero = $00000029;
xl4DigitYears = $0000002B;
xlDayCode = $00000015;
xlMonthCode = $00000014;
xlYearCode = $00000013;
xlDateSeparator = $00000011;

Description

Types

TXLSCellFormat = (...);

Defines types of cell format

Values
  • cfNone
  • cfBold
  • cfItalic
  • cfUnderline
TXLSCellFormats = set of TXLSCellFormat;

Defines types of cell format

TXLSExportOption = (...);

Defines options for ExportTable function

Values
  • xleExportTitles
  • xleRealFieldNamesAsTitle
  • xleBoldTitles
  • xleAddSumRow
  • xleStringFieldAsText
  • xleSetCellFormat
  • xleSetCellBorders
  • xleWrapMemoField
  • xleSetColumnWidth
  • xleSetRowHeight
  • xleFreezeTitles
  • xleSetAutoFilter
  • xleSetPageSetup
  • xleOnlyVisibleFields
  • xleOnlySelectedRows
  • xleExportPictures
  • xleAddAsNewSheet
  • xleAddToExistingRows
  • xleTrimData
  • xleNumericFieldAsFloat
TXLSExportOptions = set of TXLSExportOption;

Defines options for ExportTable function

TXLSExportColor = (...);
 
Values
  • xleSetBkColor
  • xleSetFontColor
  • xleHideText
TXLSExportColors = set of TXLSExportColor;
 
TXLSVerticalAlignment = (...);

Defines vertical alignment possibilty

Values
  • vaNone
  • vaTop
  • vaCenter
  • vaBottom
TGetFieldType = procedure(Sender: TObject; Field: TField; var FieldType: integer) of object;

Defines event for custom definition of field with picture

TPreparePictureEvent = procedure(Sender: TObject; Row, Column: integer; Field: TField; Picture: TPicture) of object;

Defines event for custom preparation of the picture before exporting

TPrepareDatabarEvent = procedure(Sender: TObject; Field: TField; var DatabarSetting: TDatabarSetting) of object;

Defines event for custom preparation of the Databar before exporting

TPrepareColorScaleEvent = procedure(Sender: TObject; Field: TField; var ColorScaleSetting: TColorScaleSetting) of object;

Defines event for custom preparation of the ColorScale before exporting

TPrepareIconSetEvent = procedure(Sender: TObject; Field: TField; var IconSetSetting: TIconSetSetting) of object;

Defines event for custom preparation of the IconSet before exporting

Constants

xlSYLK = 2;

XlFileFormat Enumeration (Excel) see http://msdn.microsoft.com/en-us/library/office/ff198017(v=office.15).aspx for full list

xlCSV = 6;
 
xlCSVWindows = 23;
 
xlCSVMSDOS = 24;
 
xlTextWindows = 20;
 
xlUnicodeText = 42;
 
xlExcel8 = 56;
 
xlExcel9795 = 43;
 
xlExcel12 = 50;
 
xlOpenXMLWorkbook = 51;
 
xlOpenXMLWorkbookMacroEnabled = 52;
 
xlXMLSpreadsheet = 46;
 
xlOpenDocumentSpreadsheet = 60;
 
xlWorkbookNormal = -4143;
 
xlTemplate = 17;
 
xlHairline = 1;

Cell Borders

xlMedium = -4138;
 
xlThick = 4;
 
xlThin = 2;
 
xlAllBorders = 0;
 
xlDiagonalDown = 5;
 
xlDiagonalUp = 6;
 
xlEdgeBottom = 9;
 
xlEdgeLeft = 7;
 
xlEdgeRight = 10;
 
xlEdgeTop = 8;
 
xlInsideHorizontal = 12;
 
xlInsideVertical = 11;
 
xlContinuous = 1;

Line type

xlDash = -4115;
 
xlDashDot = 4;
 
xlDashDotDot = 5;
 
xlDot = -4118;
 
xlDouble = -4119;
 
xlLineStyleNone = -4142;
 
xlSlantDashDot = 13;
 
xlLandscape = $00000002;

Constants for enum XlPageOrientation

xlPortrait = $00000001;
 
cColWidthPixelRatioDefault = 9.15;

ratio between width/height and pixels

cRowHeightPixelRatioDefault = 1.65;
 
cFldTypeNormal = 0;
 
cFldTypePicture = 1;
 
cFldTypeColor = 2;
 
cFldTypeDataBar = 3;
 
cFldTypeColorScale = 4;
 
cFldTypeIconSet = 5;
 
xl3Arrows = 1;

IconSets

xl3ArrowsGray = 2;
 
xl3Flags = 3;
 
xl3Signs = 6;
 
xl3Stars = 18;
 
xl3Symbols = 7;
 
xl3Symbols2 = 8;
 
xl3TrafficLights1 = 4;
 
xl3TrafficLights2 = 5;
 
xl3Triangles = 19;
 
xl4Arrows = 9;
 
xl4ArrowsGray = 10;
 
xl4CRV = 12;
 
xl4RedToBlack = 11;
 
xl4TrafficLights = 13;
 
xl5Arrows = 14;
 
xl5ArrowsGray = 15;
 
xl5Boxes = 20;
 
xl5CRV = 16;
 
xl5Quarters = 17;
 
xlCustomSet = -1;
 
xlDayLeadingZero = $0000002A;

international

xlDecimalSeparator = $00000003;
 
xlMonthLeadingZero = $00000029;
 
xl4DigitYears = $0000002B;
 
xlDayCode = $00000015;
 
xlMonthCode = $00000014;
 
xlYearCode = $00000013;
 
xlDateSeparator = $00000011;
 

Author

Created

Feb 2014

Last Modified

Dec 2021


Generated by PasDoc 0.15.0.