ITabCellStyle.SaveToXml

Syntax

SaveToXml: String;

Description

The SaveToXml saves table cell style to the row in the XML format.

Comments

To load the table cell style from the row in the XML format, use the ITabCellStyle.LoadFromXml method.

Example

Executing the example requires that the repository contains a regular report with the REG_REPORT_TAB identifier.

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

Sub UserProc;
Var
    mb: IMetabase;
    Report: IPrxReport;
    Tab: ITabSheet;
    Range: ITabRange;
    Style: ITabCellStyle;
    StyleXml: String;
    XML: FreeThreadedDOMDocument60;
Begin
    mb := MetabaseClass.Active;
    // Get regular report
    Report := mb.ItemById("REG_REPORT_TAB").Bind As IPrxReport;
    // Get cell style
    Tab := (Report.ActiveSheet As IPrxTable).TabSheet;
    Range := Tab.Cell(00);
    Style := Range.Style;
    // Save cell style to file in the XML format
    StyleXml := Style.SaveToXml;
    XML := New FreeThreadedDOMDocument60.Create;
    XML.loadXML(StyleXml);
    XML.save("C:\Style.xml");
End Sub UserProc;

After executing the example the first cell style on the available report sheet is unloaded to the C:\Style.xml file in the |XML format.

See also:

ITabCellStyle