<< Return to Main Index

< Return to Class Index

CGXExcelTable::WriteToStream

virtual BOOL WriteToStream(IStream* pStream, DWORD& dwLength, CGXGridParam** pParam, UINT nTabs = 1) = 0;

pStream

Stream to write to

dwLength

Variable that needs to have the bytes written added to it

pParam

Array of CGXGridParam objects (one for each tab that gets written out)

nTabs

Number of tabs to be actually considered for the write. There should be atleast that many parameter objects in the third parameter.

Remarks

In this method the table is composed. Often this requires access to all the parameter objects (for all the tabs being written out). The parameters reflect this. The entire table is composed in this method and written out. Since this method has access to all the tabs it has all the data that it needs to perform the write operation in one place. The override should increment the dwLength parameter to indicate the number of bytes that was actually written out. This information is used in the calculation of certain offsets that are written out and failure to increment this value will cause the file to be corrupt. This only applied if you are adding support for new tables. The existing tables all increment the count.

See Also

CGXExcelHandler::WriteToStream CGXExcelTable::ReadFromStream

CGXExcelTable

Class Overview | Class Members