SpreadsheetDocument.InsertArea
Syntax:
Parameters:
<SourceArea> (required)
Source area.
<ReceivingArea> (optional)
Receiving area. If parameter is not specified, area is inserted to the right of source area (with taking into account of shift).
<Move> (optional)
Defines table cells offset when inserting. It has sense only for rectangular area of cells.
For rows/columns areas with any parameter value other than WithoutShift the offset will be vertical or horizontal respectively.
Default value: WithoutShift.
<FillParameters> (optional)
Whether it is necessary to fill parameters by their values.
In case of parameter's value is not set, primary cells' parameters' names will be placed in resulting cells' text.
Default value: True.
Description:
Availability:
Note:
The property Format of the spreadsheet document cell is not used to format any values displayed using a template.
Example:
Spreadsheet = New SpreadsheetDocument; Total = 0; For K=1 To 10 Do Spreadsheet.Area("R"+(K+1)+"C1").Text = "String "+K; Spreadsheet.Area("R"+(K+1)+"C2").Text = K*10; Total = Total+K*10; EndDo; Spreadsheet.InsertArea(Spreadsheet.Area("R2"), Spreadsheet.Area("R3"), SpreadsheetDocumentShiftType.Horizontal); Spreadsheet.Area("R2C1").Text = "Total:"; Spreadsheet.Area("R2C2").Text = Total; Border = New Line(SpreadsheetDocumentCellLineType.Solid, 1); Spreadsheet.Area("R2C1:R2C2").Outline(,Border,,Border); Spreadsheet.ShowGrid = False; Spreadsheet.Protection = False; Spreadsheet.ReadOnly = True; Spreadsheet.Show("Example of using the InsertArea() method."); |
See also: