Hi,
Thanks for your posting and using Aspose.Cells for .NET.
We have tested your issue with the following code with the given sample file and printed the horizontal and vertical page breaks count, it printed the correct count.
C#
string filePath = “F:\Shak-Data-RW\Downloads\MySampleFile.xlsx”;
Workbook workbook = new Workbook(filePath);
Worksheet worksheet = workbook.Worksheets[0];
int horizontalCount = worksheet.HorizontalPageBreaks.Count;
int verticalCount = worksheet.VerticalPageBreaks.Count;
Debug.WriteLine("Horizontal Page Breaks: " + horizontalCount);
Debug.WriteLine("Vertical Page Breaks: " + verticalCount);
Output:Horizontal Page Breaks: 3
Vertical Page Breaks: 2