[]
Iterable<IVPageBreak>Use this collection to add, access, and iterate vertical page breaks on a worksheet. A vertical page break added through this collection is positioned to the left of the specified range.
worksheet.getRange("A1:F10").setValue("Data");
IVPageBreaks pageBreaks = worksheet.getVPageBreaks();
pageBreaks.add(worksheet.getRange("D1"));
IVPageBreak pageBreak = pageBreaks.get(0);
get(int index) IVPageBreak at the specified index in the collection.intgetCount()forEach, iterator, spliteratorThis method returns the number of vertical page breaks contained in this collection within the print area.
IVPageBreaks pageBreaks = worksheet.getVPageBreaks();
pageBreaks.add(worksheet.getRange("C1"));
pageBreaks.add(worksheet.getRange("F1"));
int count = pageBreaks.getCount();
IVPageBreak at the specified index in the collection.Use this method to access a vertical page break that has been added to the worksheet print area through add(IRange) or other worksheet page break operations.
worksheet.getRange("A1:F3").setValue(new Object[][] {
{"Name", "Q1", "Q2", "Q3", "Q4", "Total"},
{"North", 100, 120, 110, 130, 460}
});
IVPageBreaks pageBreaks = worksheet.getVPageBreaks();
pageBreaks.add(worksheet.getRange("D1"));
IVPageBreak pageBreak = pageBreaks.get(0);
IRange location = pageBreak.getLocation();
index - The index of the collection.IVPageBreak object at the specified index.The page break is aligned with the left edge of the specified range.
worksheet.getRange("A1:H2").setValue(new Object[][] {
{"Name", "Q1", "Q2", "Q3", "Q4", "Total", "Region", "Status"},
{"Test", 100, 120, 140, 160, 520, "East", "Open"}
});
IVPageBreak pageBreak = worksheet.getVPageBreaks().add(worksheet.getRange("F2"));
before - The range whose left edge defines where the new page break is added. If before is null, no page break is added.IVPageBreak object, or null if before is null.IllegalArgumentException - if before starts in the first column of the worksheet.IllegalStateException - if the maximum number of vertical page breaks has been reached.