Macros::GX_EXCEL_MAP_ENTRY

GX_EXCEL_MAP_ENTRY;

Remarks

The Objective Grid Pro Excel code looks in a map to see if there is a handler for the record type that it is handling. If there is then the stream is read and the data is retained and interpreted. If not the grid does a seek (based on the record length that was read in from the record header) and goes on to look at the next entry. This goes on till the file is read.

There are two maps that are defined in the application one is for handlers and the other is for tables. These maps are composed of macros in a manner that is very similar to that of CWnd message maps.

Each map macro entry has three values. The first as can be seen is the type of the record that this entry can handle. The second is the object type that is to be used when handling this entry (remember that the map merely maps a record type to an object that can handle it). The third value is rather redundant. It specifies the size of the record type data that is to be used for comparison. With this version (BIFF 8) this value can always be taken as two bytes. With future versions this may change and this is so designed to allow easy adoption of any such change.

Write maps are composed of the macro, GX_EXCEL_WRITEMAP_ENTRY. They are called to control the sequence of the write operation. They have two entries. The first specifies the type of record written and the second the type of the handler, whether it is a table or a handler. Another similar macro GX_EXCEL_WRITEMAP_ENTRY is used in the Excel read/write code. This macro is not documented and is subject to change in future versions.

Example

Shown below is a typical map structure for tables and handlers.

BEGIN_GX_EXCEL_MAP(CGXExcelTable)

GX_EXCEL_MAP_ENTRY(typeFont, CGXExcelFontTable, 2)

GX_EXCEL_MAP_ENTRY(typeStyle, CGXExcelStyleTable, 2)

END_GX_EXCEL_MAP()

See Also

 Macros::GX_EXCEL_WRITEMAP_ENTRY

Macros

 Class Overview |  Class Members