SpreadsheetDocument.Put
Syntax:
Parameters:
<Table> (required)
Table being displayed.
<Level> (optional)
The level is used to auto-grouping spreadsheet document rows. Adjoining rows with the same level are included to the same group. Rows of the lowest level are not grouped.
<GroupName> (optional)
Name of the group, where belong rows being displayed.
Default value: Empty string.
<IsOpen> (optional)
True - displayed group will be open, False - group will be collapsed.
Default value: True.
Returned value:
The area which received the input.
Description:
Availability:
Note:
Example:
Spreadsheet = New SpreadsheetDocument; Section = Spreadsheet.GetArea("R1"); Section.Area("R1C1").Text = "Number of employees"; Spreadsheet.StartRowAutoGrouping(); Spreadsheet.Put(Section,1,"Group",True); Total = 0; For H=1 To 3 Do Value = H; Total = 0; Section.Area("R1C1").Text = "Department "+H; Section.Area("R1C2").Text = ""; Spreadsheet.Put(Section,2,"Group 1",True); Section.Area("R1C1").Text = "Group"; Section.Area("R1C2").Text = "Number"; Spreadsheet.Put(Section,2,"Group 1",True); For K=1 To 10 Do Section.Area("R1C1").Text = "A"+H+K; Section.Area("R1C2").Text = Value; Spreadsheet.Put(Section,3,"Group 2",True); Total = Total + Value; Value = Value + 10; EndDo; Section.Area("R1C1").Text = "Total"+H; Section.Area("R1C2").Text = Total; Spreadsheet.Put(Section,2,"Group 1",True); Section.Area("R1C1:R1C2").Text = ""; Spreadsheet.Put(Section); Total = Total + Total; EndDo; Section.Area("R1C1").Text = "Tota:"; Section.Area("R1C2").Text = Total; Spreadsheet.Put(Section,1,"Group",True); Spreadsheet.EndRowAutoGrouping(); Spreadsheet.TotalsBelow = True; Spreadsheet.ShowGrid = False; Spreadsheet.Protection = False; Spreadsheet.ReadOnly = True; Spreadsheet.Show("Example of using the vertical autogrouping"); |
See also: