Chapter 3. Types, units and constants
Data in Excel file can be stored in various formats.
Most of all data accessed through methods of objects returned by ExcelExplorer.
For example, font color obtained using various methods provided by EEColor class that returned by Font->Color() method of EEFont object.
Types such as integer, float and boolean returned as-is.
Values stored in the cells can be accessed via
EECell->PlainData()
or
EECell->Data() methods.
First method returns unformatted data in its native format, i.e. number returned as integer or float,
logical value returned as boolean, error codes as integer and text as EEData object.
The second one will apply number format to the data and returns result as EEData object.
For more information see EECell->PlainData()
and
EECell->Data() methods descriptions of
EECell class.
Numeric values for such data as row height, column width and others stored in different formats.
For example, row height stored in twips, column width - in characters count.
This make difficult to represent data for instance in HTML format (there is no analogs for those units in HTML).
To make life easier ExcelExplorer provides some functions to convert those units to others (see EEHelper class).
Many ExcelExplorer functions returns predefined values (constants).
For example, for right horizontal alignment ExcelExplorer returns EE_HALIGN_RIGHT.
Constants must be used to ensure that script will be compartible with feature versions of ExcelExplorer.
The following table contains all of defined constants.
See methods description for more information.
| Constant |
Description |
Used in |
| Status codes |
| EE_OK |
Exploring done without error. |
ExcelExplorer->ExploreFile()
ExcelExplorer->ExploreString()
|
| EE_INVFILE |
File corrupted or not in Excel 5.0 and above format. |
| EE_INVVER |
Unknown Excel file version. |
| EE_FILENOTFOUND |
File open fails. |
ExcelExplorer->ExploreFile()
|
| Exploring options |
| EE_READ_SHEETSINFO |
Read information about sheets (type, title, visibility). |
ExcelExplorer->ExploreFile()
ExcelExplorer->ExploreString()
|
| EE_READ_SHEETSDATA |
Read sheets data (including sheets info). |
| EE_READ_IMAGES |
Read images. |
| EE_READ_SUMMARY |
Read summary information. |
| EE_READ_ALL |
An alias of all the exploring options above. |
| Worksheet type |
| EE_SHEET_NORMAL |
Ordinary worksheet. Also returns for undefined worksheets. |
EEWorksheet->Type() |
| EE_SHEET_CHART |
Chart. |
| EE_SHEET_VB |
Visual Basic module. |
| Cell type |
| EE_CELL_EMPTY |
Empty (undefined) cell. |
EECell->Type() |
| EE_CELL_BLANK |
Cell that defined but contains no data. |
| EE_CELL_NUMBER |
Integer or float number. |
| EE_CELL_TEXT |
Text data. |
| EE_CELL_LOGICAL |
Logical value (TRUE or FALSE). |
| EE_CELL_ERROR |
Error code ("#DIV/0!", "#VALUE!", etc.) - see below. |
| EE_CELL_MERGED |
Cell within merged cells area. |
| Error code |
| EE_ERROR_NULL |
#NULL! - Intersection of two cell ranges is empty. |
EECell->PlainData() |
| EE_ERROR_DIV0 |
#DIV/0! - Division by zero. |
| EE_ERROR_VALUE |
#VALUE! - Wrong type of operand. |
| EE_ERROR_REF |
#REF! - Illegal or deleted cell reference. |
| EE_ERROR_NAME |
#NAME? - Wrong function or range name. |
| EE_ERROR_NUM |
#NUM! - Value range overflow. |
| EE_ERROR_NA |
#N/A! - Argument or function not available. |
| Font style |
| EE_FONT_NORMAL |
Normal font. |
EEFont->Script() |
| EE_FONT_SUPERSCRIPT |
Superscript. |
| EE_FONT_SUBSCRIPT |
Subscript. |
| EE_FONT_UNDNONE |
No underline. |
EEFont->Underline() |
| EE_FONT_UNDSINGLEDATA |
Single underline (cell's data underlined). |
| EE_FONT_UNDDBLDATA |
Double underline (cell's data underlined). |
| EE_FONT_UNDSINGLECELL |
Single underline (whole cell underlined). |
| EE_FONT_UNDDBLCELL |
Double underline (whole cell underlined). |
| Image type |
| EE_IMAGE_EMF |
Windows Enhanced Metafile. |
EEImage->Type() |
| EE_IMAGE_WMF |
Windows Metafile. |
| EE_IMAGE_PICT |
Macintosh PICT. |
EE_IMAGE_JFIF, EE_IMAGE_JPEG |
JPEG File Interchange Format. |
| EE_IMAGE_PNG |
Portable Network Graphics. |
| EE_IMAGE_BMP |
Windows Bitmap. |
| EE_IMAGE_GIF |
Graphics Interchange Format. |
| Link type |
| EE_LINK_URL |
Hyperlink contains an URL. E-Mail addresses, HTTP and FTP links uses this type. |
EELink->Type() |
| EE_LINK_FILE |
Hyperlink to a local file. |
| EE_LINK_WORKBOOK |
Hyperlink within current workbook or sheet. For instance "Sheet1!A1:B2". |
| EE_LINK_UNC |
Hyperlink to a file with UNC. Used for files in the local network. For instance "\\myserver\myshare\myfile.xls". |
| Horizontal data alignment |
| EE_HALIGN_GENERAL |
General alignment (depends on data type). |
EEAlign->HAlign() |
| EE_HALIGN_LEFT |
Data is left-aligned. |
| EE_HALIGN_CENTER |
Data is centered within a cell or a merged cells area. |
| EE_HALIGN_RIGHT |
Data is right-aligned. |
| EE_HALIGN_FILL |
Fill cell with data. |
| EE_HALIGN_JUSTIFY |
Justify data in the cell. |
| EE_HALIGN_CENTERSEL |
Data is centered across selection. |
| EE_HALIGN_DISTRIB |
Distributed. |
| Vertical data alignment |
| EE_VALIGN_TOP |
Top alignment. |
EEAlign->VAlign() |
| EE_VALIGN_CENTER |
Data is centered within a cell or a merged cells area. |
| EE_VALIGN_BOTTOM |
Bottom alignment. |
| EE_VALIGN_JUSTIFY |
Justify data in the cell. |
| EE_VALIGN_DISTRIB |
Distributed. |
| Border style |
| EE_BORDER_NONE |
 |
EEBorder->Style() |
| EE_BORDER_HAIR |
 |
| EE_BORDER_DOTTED |
 |
| EE_BORDER_DASHDOTDOTTED |
 |
| EE_BORDER_DASHDOTTED |
 |
| EE_BORDER_DASHED |
 |
| EE_BORDER_THIN |
 |
| EE_BORDER_MEDIUM_DASHDOTDOTTED |
 |
| EE_BORDER_SLANTED_MEDIUM_DASHDOTTED |
 |
| EE_BORDER_MEDIUM_DASHDOTTED |
 |
| EE_BORDER_MEDIUM_DASHED |
 |
| EE_BORDER_MEDIUM |
 |
| EE_BORDER_THICK |
 |
| EE_BORDER_DOUBLE |
 |
| Phonetic text alignment |
| EE_PH_ALIGN_NONE |
Not specified. |
EEDataPhonetic->Align() |
EE_PH_ALIGN_LEFT, EE_PH_ALIGN_TOP |
Phonetic text is left-aligned (top-aligned for vertical text). These two constants are equal. |
| EE_PH_ALIGN_CENTER |
Centered. |
| EE_PH_ALIGN_DISTRIB |
Distributed. |
| Phonetic text type |
| EE_PH_KATAKANA_NARROW |
Katakana (narrow). |
EEDataPhonetic->Type() |
| EE_PH_KATAKANA_WIDE |
Katakana (wide). |
| EE_PH_HIRAGANA |
Hiragana. |