Class VerticalPageBreakCollection
Contents
[
Hide
]VerticalPageBreakCollection class
Encapsulates a collection of VerticalPageBreak
objects.
public class VerticalPageBreakCollection : CollectionBase<VerticalPageBreak>
Properties
Name | Description |
---|---|
Capacity { get; set; } | |
Count { get; } | |
Item { get; } | Gets the VerticalPageBreak element at the specified index. (2 indexers) |
Item { get; set; } |
Methods
Name | Description |
---|---|
Add(int) | Adds a vertical page break to the collection. |
Add(string) | Adds a vertical page break to the collection. |
Add(int, int) | Adds a vertical page break to the collection. |
Add(int, int, int) | Adds a vertical page break to the collection. |
BinarySearch(VerticalPageBreak) | |
BinarySearch(VerticalPageBreak, IComparer<VerticalPageBreak>) | |
BinarySearch(int, int, VerticalPageBreak, IComparer<VerticalPageBreak>) | |
Clear() | |
Contains(VerticalPageBreak) | |
CopyTo(VerticalPageBreak[]) | |
CopyTo(VerticalPageBreak[], int) | |
CopyTo(int, VerticalPageBreak[], int, int) | |
Exists(Predicate<VerticalPageBreak>) | |
Find(Predicate<VerticalPageBreak>) | |
FindAll(Predicate<VerticalPageBreak>) | |
FindIndex(Predicate<VerticalPageBreak>) | |
FindIndex(int, Predicate<VerticalPageBreak>) | |
FindIndex(int, int, Predicate<VerticalPageBreak>) | |
FindLast(Predicate<VerticalPageBreak>) | |
FindLastIndex(Predicate<VerticalPageBreak>) | |
FindLastIndex(int, Predicate<VerticalPageBreak>) | |
FindLastIndex(int, int, Predicate<VerticalPageBreak>) | |
GetEnumerator() | |
IndexOf(VerticalPageBreak) | |
IndexOf(VerticalPageBreak, int) | |
IndexOf(VerticalPageBreak, int, int) | |
LastIndexOf(VerticalPageBreak) | |
LastIndexOf(VerticalPageBreak, int) | |
LastIndexOf(VerticalPageBreak, int, int) | |
RemoveAt(int) | Removes the VPageBreak element at a specified name. (2 methods) |
Examples
[C#]
namespace Demos
{
using Aspose.Cells;
using System;
public class VerticalPageBreakCollectionDemo
{
public static void VerticalPageBreakCollectionExample()
{
// Create a new workbook
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
// Access the VerticalPageBreakCollection of the worksheet
VerticalPageBreakCollection verticalPageBreaks = worksheet.VerticalPageBreaks;
// Add vertical page breaks
verticalPageBreaks.Add(0, 10, 2); // From row 0 to 10 at column 2
verticalPageBreaks.Add(4); // At column 4
verticalPageBreaks.Add(5, 3); // At row 5, column 3
verticalPageBreaks.Add("G5"); // At cell G5
// Remove a vertical page break at index 1
verticalPageBreaks.RemoveAt(1);
// Access and print details of the vertical page breaks
for (int i = 0; i < verticalPageBreaks.Count; i++)
{
VerticalPageBreak vpb = verticalPageBreaks[i];
Console.WriteLine($"Vertical Page Break {i}: StartRow = {vpb.StartRow}, EndRow = {vpb.EndRow}, Column = {vpb.Column}");
}
// Save the workbook
workbook.Save("VerticalPageBreakCollectionExample.xlsx");
return;
}
}
}
See Also
- class CollectionBase<T>
- class VerticalPageBreak
- namespace Aspose.Cells
- assembly Aspose.Cells