XLSUtils5

# Unit XLSUtils5

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

## Description

## Uses

- SysUtils
- Classes
- Contnrs
- Math
- DateUtils
- Windows
- Graphics

## Overview

### Classes, Interfaces, Objects and Records

Name | Description
--- | ---
record `TXLSRectXY` |
Class `TXLSErrorManager` |
Class `TIntegerList` |
Class `TIntegerStack` |
Class `TIndexObject` |
Class `TIndexObjectList` |
Class `TPointerMemoryStream` |
Class `TFormatSettings` |

### Functions and Procedures

`function CharInSet(C: WideChar; const CharSet: TSysCharSet): Boolean;`
`function CPos(const C: AxUCChar; const S: AxUCString): integer; overload;`
`function CPos(const C: AnsiChar; const S: AxUCString): integer; overload;`
`function RCPos(const C: AxUCChar; const S: AxUCString): integer; overload;`
`function RCPos(const C: AnsiChar; const S: AxUCString): integer; overload;`
`function SplitAtChar(const C: AxUCChar; var S: AxUCString): AxUCString;`
`function XLSCalcCRC32(const P: PByteArray; Len: integer): longword;`
`function EmptyGUID(const AGUID: PGUID): boolean;`
`function EmuToCm(const EMU: integer): double;`
`function CmToEmu(const Cm: double): integer;`
`function RoundToDecimal(x: Extended; const d: Integer): Extended;`
`function TryCurrencyStrToFloat(const AValue: AxUCString; out AResult: double): boolean;`
`procedure SortDoubleArray(AArray: TDynDoubleArray);`
`function BytesToHexStr(const ABytes: PByteArray; const ACount: integer): AxUCString;`
`function UnicodeIs8Bit(const AString: AxUCString): boolean;`
`function _XLSReplaceStr(aSourceString, aFindString, aReplaceString : AxUCString) : AxUCString;`
`procedure StripQuotes(var S: AxUCString);`
`function SafeTryStrToFloat(S: AxUCString; out Value: double): boolean;`
`function MakePasswordHash(const APassword: AnsiString): word;`
`function PasswordFromHash(const AHash: word): AxUCString;`
`procedure PixelsPerInchXY(out AX,AY: integer);`
`function Fork(const AVal,AMin,AMax: double): double; overload;`
`function Fork(const AVal,AMin,AMax: integer): integer; overload;`
`function TColorToRGB(const AValue: TColor): longword;`
`function RGBToTColor(const ARGB: longword): TColor;`
`function BoolAsWord(const ABool: boolean): word;`
`function MakeIndent(const AIndent: integer): AxUCString;`
`function XLSRoundTo(const AValue: Extended; const ADigit: TRoundToEXRangeExtended): Extended;`
`function StreamIsZIP(const AStream: TStream): boolean;`

### Types

`TDynDoubleArray = array of double;`
`TDoubleArray = array [0..$FFFF] of double;`
`PDoubleArray = ˆTDoubleArray;`
`TRoundToEXRangeExtended = -20..20;`
`XLS8String = string;`
`XLS8Char = Char;`
`XLS8PChar = PChar;`
`AxUCChar = WideChar;`
`AxUCString = WideString;`
`AxPUCChar = PWideChar;`
`NativeInt = integer;`
`TStringEvent = procedure(ASender: TObject; const AText: AxUCString) of object;`
`TIntegerEvent = procedure(ASender: TObject; const AValue: integer) of object;`
`TTwoIntegerEvent = procedure(ASender: TObject; const AValue1,AValue2: integer) of object;`
`TXLSProgressType = (...);`
`TXLSProgressState = (...);`
`TXLSProgressEvent = procedure (AProgressType: TXLSProgressType; AProgressState: TXLSProgressState; AValue: double) of object;`
`TSysCharSet = set of AnsiChar;`
`TXLSErrorLevel = (...);`
`TXLSErrorLevels = set of TXLSErrorLevel;`
`TXLSErrorEvent = procedure(ASender: TObject; ALevel: TXLSErrorLevel; AText: AxUCString) of object;`

### Constants

`ComponentName = 'XLSReadWriteII';`
`CurrentVersionNumber = '5.10.06';`
`CurrentBuildNumber = '5106';`
`XLS_MININT = -(MAXINT - 1);`
`MINDOUBLE = -1.79769313486232e308;`
`MAXDOUBLE = 1.79769313486232e308;`
`EMU_PER_PT = 12700;`
`StrDigits = '0123456789';`
`XLSERR_FILEREAD_XMLPARSE = 1001;`
`XLSERR_FILEREAD_UNKNOWENCRYPT = 1002;`
`XLSERR_FILEREAD_PASSWORDMISSING = 1003;`
`XLSERR_FILEREAD_WRONGPASSWORD = 1004;`
`XLSERR_DIRECTWR_CELL_NOT_INC = 1005;`
`XLSHINT_BAD_FORMULA_RESULT = 7001;`
`XLSWARN_CIRCULAR_FORMULA = 3002;`
`XLSWARN_USEDSHEETNAME = 3003;`
`XLSWARN_INVALIDCELLREF = 3004;`
`XLSWARN_INVALIDCELLVALUE = 3005;`
`XLSWARN_UNKNOWNIMAGE = 3006;`
`XLSWARN_UNSUPPORTEDIMAGE = 3007;`
`XLSWARN_IMAGEERROR = 3008;`
`XLSWARN_CAN_NOT_CHANGE_MERGED = 3009;`
`XLSWARN_SHAPE_EDIT_TEXTBOX = 3101;`
`XLSWARN_SHAPE_CAN_NOT_EDIT = 3102;`
`XLSERR_FMLA_BADERRORCONST = 4001;`
`XLSERR_FMLA_BADEXPONENT = 4002;`
`XLSERR_FMLA_BADFRACTIONAL = 4003;`
`XLSERR_FMLA_MISSINGQUOTE = 4004;`
`XLSERR_FMLA_BADARRAYCONST = 4005;`
`XLSERR_FMLA_FORMULA = 4006;`
`XLSERR_FMLA_MISSINGRPAR = 4007;`
`XLSERR_FMLA_INVALIDUSEOF = 4008;`
`XLSERR_FMLA_MISSINGEXPR = 4009;`
`XLSERR_FMLA_BADCELLREF = 4010;`
`XLSERR_FMLA_BADSHEETNAME = 4011;`
`XLSERR_FMLA_BADWORKBOOKNAME = 4012;`
`XLSERR_FMLA_MISSING = 4013;`
`XLSERR_FMLA_BADR1C1REF = 4014;`
`XLSERR_FMLA_MISSINGOPERAND = 4015;`
`XLSERR_FMLA_UNKNOWNSHEET = 4016;`
`XLSERR_FMLA_UNKNOWNXBOOK = 4017;`
`XLSERR_FMLA_BADUSEOFOP = 4018;`
`XLSERR_FMLA_UNKNOWNNAME = 4019;`
`XLSERR_FMLA_MISSINGARG = 4020;`
`XLSERR_FMLA_TOMANYGARGS = 4021;`
`XLSERR_FMLA_BADARRAYCOLS = 4022;`
`XLSERR_FMLA_BADTABLE = 4023;`
`XLSERR_FMLA_UNKNOWNTABLE = 4024;`
`XLSERR_FMLA_UNKNOWNTABLECOL = 4025;`
`XLSERR_FMLA_UNKNOWNTBLSPEC = 4026;`
`XLSERR_FMLA_TABLESQBRACKET = 4027;`
`XLSERR_FMLA_BADUSEOFTABLEOP = 4028;`
`XLSERR_FMLA_BADUSEOFTBLSPEC = 4029;`
`XLSERR_FMLA_TBLSPECNOTFIRST = 4030;`
`XLSERR_NAME_EMPTY = 4031;`
`XLSERR_NAME_DUPLICATE = 4032;`
`XLSERR_HLINK_INVALID_CELLREF = 4033;`
`XLSERR_BIFF_BADBUILTIN_NAME = 5001;`
`XLSERR_BIFF_CANT_FIND_BUILTIN_NAME = 5002;`
`XLSERR_FILENAME_IS_MISSING = 6001;`
`XLSERR_NO_XLS_DEFINED = 6002;`
`XLSWARN_WORKBOOK_NOT_EMPTY = 6003;`
`XLSWARN_MULTIPLE_SEL_AREAS = 6004;`
`XLSERR_INVALID_SIMPLE_TAG = 6005;`

### Variables

`FormatSettings: TFormatSettings;`
`G_Counter: integer;`
`G_DirSepChar: AxUCChar;`

## Description

### Functions and Procedures

`function CharInSet(C: WideChar; const CharSet: TSysCharSet): Boolean;`

`function CPos(const C: AxUCChar; const S: AxUCString): integer; overload;`

`function CPos(const C: AnsiChar; const S: AxUCString): integer; overload;`

`function RCPos(const C: AxUCChar; const S: AxUCString): integer; overload;`

`function RCPos(const C: AnsiChar; const S: AxUCString): integer; overload;`

`function SplitAtChar(const C: AxUCChar; var S: AxUCString): AxUCString;`

`function XLSCalcCRC32(const P: PByteArray; Len: integer): longword;`

`function EmptyGUID(const AGUID: PGUID): boolean;`

`function EmuToCm(const EMU: integer): double;`

`function CmToEmu(const Cm: double): integer;`

`function RoundToDecimal(x: Extended; const d: Integer): Extended;`

`function TryCurrencyStrToFloat(const AValue: AxUCString; out AResult: double): boolean;`

`procedure SortDoubleArray(AArray: TDynDoubleArray);`

`function BytesToHexStr(const ABytes: PByteArray; const ACount: integer): AxUCString;`

`function UnicodeIs8Bit(const AString: AxUCString): boolean;`

`function _XLSReplaceStr(aSourceString, aFindString, aReplaceString : AxUCString) : AxUCString;`

`procedure StripQuotes(var S: AxUCString);`

`function SafeTryStrToFloat(S: AxUCString; out Value: double): boolean;`

`function MakePasswordHash(const APassword: AnsiString): word;`

`function PasswordFromHash(const AHash: word): AxUCString;`

`procedure PixelsPerInchXY(out AX,AY: integer);`

`function Fork(const AVal,AMin,AMax: double): double; overload;`

`function Fork(const AVal,AMin,AMax: integer): integer; overload;`

`function TColorToRGB(const AValue: TColor): longword;`

`function RGBToTColor(const ARGB: longword): TColor;`

`function BoolAsWord(const ABool: boolean): word;`

`function MakeIndent(const AIndent: integer): AxUCString;`

`function XLSRoundTo(const AValue: Extended; const ADigit: TRoundToEXRangeExtended): Extended;`

`function StreamIsZIP(const AStream: TStream): boolean;`

### Types

`TDynDoubleArray = array of double;`

`TDoubleArray = array [0..$FFFF] of double;`

`PDoubleArray = ˆTDoubleArray;`

`TRoundToEXRangeExtended = -20..20;`

`XLS8String = string;`

`XLS8Char = Char;`

`XLS8PChar = PChar;`

`AxUCChar = WideChar;`

`AxUCString = WideString;`

`AxPUCChar = PWideChar;`

`NativeInt = integer;`

`TStringEvent = procedure(ASender: TObject; const AText: AxUCString) of object;`

`TIntegerEvent = procedure(ASender: TObject; const AValue: integer) of object;`

`TTwoIntegerEvent = procedure(ASender: TObject; const AValue1,AValue2: integer) of object;`

`TXLSProgressType = (...);`

###### Values

- xptReadFile:
- xptWriteFile:
- xptCompileFormulas:
- xptCalculateFormulas:
- xptExport:
- xptSortCells:

`TXLSProgressState = (...);`

###### Values

- xpsBegin:
- xpsWork:
- xpsEnd:

`TXLSProgressEvent = procedure (AProgressType: TXLSProgressType; AProgressState: TXLSProgressState; AValue: double) of object;`

`TSysCharSet = set of AnsiChar;`

`TXLSErrorLevel = (...);`

###### Values

- xelMessage:
- xelHint:
- xelWarning:
- xelError:
- xelFatal:
- xelDebug:

`TXLSErrorLevels = set of TXLSErrorLevel;`

`TXLSErrorEvent = procedure(ASender: TObject; ALevel: TXLSErrorLevel; AText: AxUCString) of object;`

### Constants

`ComponentName = 'XLSReadWriteII';`

`CurrentVersionNumber = '5.10.06';`

`CurrentBuildNumber = '5106';`

`XLS_MININT = -(MAXINT - 1);`

`MINDOUBLE = -1.79769313486232e308;`

`MAXDOUBLE = 1.79769313486232e308;`

`EMU_PER_PT = 12700;`

`StrDigits = '0123456789';`

`XLSERR_FILEREAD_XMLPARSE = 1001;`

`XLSERR_FILEREAD_UNKNOWENCRYPT = 1002;`

`XLSERR_FILEREAD_PASSWORDMISSING = 1003;`

`XLSERR_FILEREAD_WRONGPASSWORD = 1004;`

`XLSERR_DIRECTWR_CELL_NOT_INC = 1005;`

`XLSHINT_BAD_FORMULA_RESULT = 7001;`

`XLSWARN_CIRCULAR_FORMULA = 3002;`

`XLSWARN_USEDSHEETNAME = 3003;`

`XLSWARN_INVALIDCELLREF = 3004;`

`XLSWARN_INVALIDCELLVALUE = 3005;`

`XLSWARN_UNKNOWNIMAGE = 3006;`

`XLSWARN_UNSUPPORTEDIMAGE = 3007;`

`XLSWARN_IMAGEERROR = 3008;`

`XLSWARN_CAN_NOT_CHANGE_MERGED = 3009;`

`XLSWARN_SHAPE_EDIT_TEXTBOX = 3101;`

`XLSWARN_SHAPE_CAN_NOT_EDIT = 3102;`

`XLSERR_FMLA_BADERRORCONST = 4001;`

`XLSERR_FMLA_BADEXPONENT = 4002;`

`XLSERR_FMLA_BADFRACTIONAL = 4003;`

`XLSERR_FMLA_MISSINGQUOTE = 4004;`

`XLSERR_FMLA_BADARRAYCONST = 4005;`

`XLSERR_FMLA_FORMULA = 4006;`

`XLSERR_FMLA_MISSINGRPAR = 4007;`

`XLSERR_FMLA_INVALIDUSEOF = 4008;`

`XLSERR_FMLA_MISSINGEXPR = 4009;`

`XLSERR_FMLA_BADCELLREF = 4010;`

`XLSERR_FMLA_BADSHEETNAME = 4011;`

`XLSERR_FMLA_BADWORKBOOKNAME = 4012;`

`XLSERR_FMLA_MISSING = 4013;`

`XLSERR_FMLA_BADR1C1REF = 4014;`

`XLSERR_FMLA_MISSINGOPERAND = 4015;`

`XLSERR_FMLA_UNKNOWNSHEET = 4016;`

`XLSERR_FMLA_UNKNOWNXBOOK = 4017;`

`XLSERR_FMLA_BADUSEOFOP = 4018;`

`XLSERR_FMLA_UNKNOWNNAME = 4019;`

`XLSERR_FMLA_MISSINGARG = 4020;`

`XLSERR_FMLA_TOMANYGARGS = 4021;`

`XLSERR_FMLA_BADARRAYCOLS = 4022;`

`XLSERR_FMLA_BADTABLE = 4023;`

`XLSERR_FMLA_UNKNOWNTABLE = 4024;`

`XLSERR_FMLA_UNKNOWNTABLECOL = 4025;`

`XLSERR_FMLA_UNKNOWNTBLSPEC = 4026;`

`XLSERR_FMLA_TABLESQBRACKET = 4027;`

`XLSERR_FMLA_BADUSEOFTABLEOP = 4028;`

`XLSERR_FMLA_BADUSEOFTBLSPEC = 4029;`

`XLSERR_FMLA_TBLSPECNOTFIRST = 4030;`

`XLSERR_NAME_EMPTY = 4031;`

`XLSERR_NAME_DUPLICATE = 4032;`

`XLSERR_HLINK_INVALID_CELLREF = 4033;`

`XLSERR_BIFF_BADBUILTIN_NAME = 5001;`

`XLSERR_BIFF_CANT_FIND_BUILTIN_NAME = 5002;`

`XLSERR_FILENAME_IS_MISSING = 6001;`

`XLSERR_NO_XLS_DEFINED = 6002;`

`XLSWARN_WORKBOOK_NOT_EMPTY = 6003;`

`XLSWARN_MULTIPLE_SEL_AREAS = 6004;`

`XLSERR_INVALID_SIMPLE_TAG = 6005;`

### Variables

`FormatSettings: TFormatSettings;`

`G_Counter: integer;`

`G_DirSepChar: AxUCChar;`

Generated by PasDoc 0.12.1 on 2013-03-18 12:36:48