SpreadsheetDocument.Join

Syntax:

Join(<Table>, <Level>, <GroupName>, <IsOpen>)

Parameters:

<Table> (required)

Type: SpreadsheetDocument; SpreadsheetDocumentField.
Table being displayed.

<Level> (optional)

Type: Number.
The level is used to automatically group spreadsheet document columns. Adjoining columns with the same level are referred to the same group. Rows of the lowest level are not grouped.

<GroupName> (optional)

Type: String.
Name of the group, where belong columns being displayed.

<IsOpen> (optional)

Type: Boolean.
True - group will be expanded; False - group will be displayed as collapsed.

Returned value:

Type: SpreadsheetDocumentRange.
The area which received the input.

Description:

Joins the spreadsheet document to the resulting spreadsheet document. Places it in the column to the right of the last displayed, beginning from the row where the previous spreadsheet document is was placed.

Availability:

Server, thick client, external connection, Mobile application (server).

Note:

The property Format of the spreadsheet document cell is not used to format any values displayed using a template.

Example:

Spreadsheet = New SpreadsheetDocument;
Section = Spreadsheet.GetArea("R1C1");
Spreadsheet.StartColumnAutoGrouping();
Section.Area("R1C1").Text = "Parameter";
Spreadsheet.Put(Section,1,"Group 1",False);
For 
K=To 10 Do
    Section = Spreadsheet.GetArea("R1C1");
    Section.Area().Text = "A"+K;
    Section.Area().HorizontalAlign = HorizontalAlign.Right;
    Spreadsheet.Join(Section,2,"Group 2",True);
EndDo
;
Section.Area("R1C1").Text = "Total:";
Spreadsheet.Join(Section,1,"Group 2",False);
Section.Area("R1C1").Text = "Value";
Spreadsheet.Put(Section,1,"Group 2",False);
Cost = 10; Total = Cost;
For 
K=To 10 Do
    Section = Spreadsheet.GetArea("R1C1");
    Section.Area().Text = Cost;
    Spreadsheet.Join(Section,2,"Group 2",True);
    Cost = Cost + 10;
    Total = Total + Cost;
EndDo
;
Section.Area("R1C1").Text = Total;
Spreadsheet.Join(Section,1,"Group 2",False);
Spreadsheet.EndColumnAutoGrouping();
Spreadsheet.TotalsRight = True;
Spreadsheet.ShowGrid = False;
Spreadsheet.Protection = False;
Spreadsheet.ReadOnly = True;
Spreadsheet.Show("Example of using the horizontal autogrouping");

See also:

SpreadsheetDocument, method Put

    

1C:Enterprise Developer's Community