SpreadsheetDocumentRange.CreateFormatOfRows

Syntax:

CreateFormatOfRows()

Description:

Creates a new line format for the area. In the new line format, column dimensions will correspond to the column dimensions specified for the area.

Availability:

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

Example:

// SprDocTarget - spreadsheet document, for which the new format is set
// Report - spreadsheet document, based on which new format will be set
Procedure AddReport(SprDocTarget, Report)

    BegNewStringFormat = SprDocTarget.TableHeight + 1;
    SquareArea = Report.Area(1, , Report.TableHeight, );
  SprDocTarget.InsertArea(SquareArea, SprDocTarget.Area(BegNewStringFormat, 1));
  SprDocTarget.Area(BegNewStringFormat, , 
        BegNewStringFormat + Report.TableHeight - 1, ).CreateFormatOfRows();
    // set column width for new string format area
    For Counter = 1 To Report.TableWidth Do
        SprDocTarget.Area(BegNewStringFormat, Counter).ColumnWidth = Report.Area(1, Counter).ColumnWidth;
    EndDo
;
  SprDocTarget.PutHorizontalPageBreak();

EndProcedure 
// AddReport


    

1C:Enterprise Developer's Community