bool TabSheetPageBreaks(TabSheetId sheetMon, TabSheetPageBreaksArg tArg)
sheetMon. Moniker of the sheet, for which the operation is executed.
tArg. Operation execution parameters.
The TabSheetPageBreaks operation manages sheet page breaks.
The operation adds and removes page breaks. To execute the operation, in the sheetMon field specify sheet moniker, and in the tArg field specify parameters of an action executed with page breaks. The moniker can be based on the moniker of opened object instance, with which the work is executed.
The operation results in the logical True if the action with page breaks was completed successfully.
Below is the example of adding page breaks in the D3 cell area of the sheet table. The request contains sheet moniker, cell coordinates, and type of executed action - adding page breaks. The response contains whether page breaks were added successfully.
{
"TabSheetPageBreaks" :
{
"sheetMon" :
{
"id" : "NDGHKCDLCBLNFOAEJNBBJMAHAKIHICKEBLMNKOOJNMJDMNNL!M!S!PPMGPCHDLCBLNFOAEGPFKNEPGHMDBPLNEBIECLNEEHJGBNOFO!Sheets!1"
},
"tArg" :
{
"action" : "0",
"range" :
{
"left" : "3",
"top" : "3",
"width" : "1",
"height" : "1"
}
}
}
}
{
"TabSheetPageBreaksResult" : "1"
}
public static bool AddPageBreak(string moniker, TabRange tRange = null)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tAdd = new TabSheetPageBreaks()
{
sheetMon = new TabSheetId() { id = moniker },
tArg = new TabSheetPageBreaksArg()
{
action = 0, // 0 - Add page breaks
range = tRange
}
};
// Add page breaks
var result = somClient.TabSheetPageBreaks(tAdd);
return result;
}
See also: