ITabSheet.SaveStyleSheetToXml

Syntax

SaveStyleSheetToXml(pStyleSheet: IStyleSheet): String;

Parameters

pStyleSheet. The collection of table formatting styles that should be saved.

Description

The SaveStyleSheetToXml method saves the collection of table formatting styles to the row in the XML format.

Comments

To load the collection of table styles from the row in the XML format, use the ITabSheet.LoadStyleSheetFromXml method.

Example

Executing the example requires that the repository contains a regular report with the REG_REPORT_TAB identifier containing connected external styles.

Add links to the Drawing, Metabase, Report, Tab, Xml system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    Report: IPrxReport;
    Tab: ITabSheet;
    Style: IStyleSheet;
    StyleXml: String;
    XML: FreeThreadedDOMDocument60;
Begin
    mb := MetabaseClass.Active;
    // Get regular report
    Report := mb.ItemById("REG_REPORT_TAB").Bind As IPrxReport;
    // Get collection of table styles
    Tab := (Report.ActiveSheet As IPrxTable).TabSheet;
    Style := Tab.StyleSheet;
    // Save collection of table styles into the file in the XML format
    StyleXml := Tab.SaveStyleSheetToXml(Style);
    XML := New FreeThreadedDOMDocument60.Create;
    XML.loadXML(StyleXml);
    XML.save("C:\StyleSheet.xml");
End Sub UserProc;

After executing the example the collection of table styles table of available report sheet is unloaded into the C:\StyleSheet.xml file in the XML format.

See also:

ITabSheet