The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



ReadFromOpenXMLFile


Unit:SDL_replist
Class:TReportListView
Declaration:function ReadFromOpenXMLFile (var InFile : TextFile; DataID: string): boolean;

The function ReadFromOpenXMLFile reads a report listview from the current position of the file InFile. If the parameter DataID is empty, the first <replist> tag is evaluated and read into the listview control. If DataID is not empty, the entire rest of the open file InFile is read until a <replist> tag is found whose attribute "id " matches DataID (the recognition of the "id " attribute is not case-sensitive). The property DataID is set to the identification string of the XML data source. The function ReadFromOpenXMLFile returns TRUE if both a valid starting tag <replist> and a valid end tag </replist> has been found and the report list view has been updated. In this case the OnChange event is triggered.

Hint 1: For a description of the valid tags, please see WriteToOpenXMLFile.

Hint 2: The XML description of the report listview data has to follow a certain order: number of columns and rows have to precede all other data of the control.

Hint 3: ReadFromOpenXMLFile is by a factor of 5 faster than ReadFromXMLStream. Thus you should use ReadFromOpenXMLFile when reading large listviews with more than approx. 10000 cells.



Last Update: 2023-Dec-13