I am facing a problem when trying to access page horizontal breaks with Spire.
I need to get the row number of the these horizontal page breaks.
No matter what I try, I get this once I try to use the PageBreak.
"Unable to cast object of type 'Spire.Xls.Core.Spreadsheet.XLSHPageBreak to type Spire.Xls.HPageBreak"
lWorkBook:= lWorkBook.Workbook;
lWorkBook.LoadFromFile('C:\NAV\name.xlsx',FALSE);
lWorkSheets := lWorkBook.Worksheets;
lWorkSheet := lWorkSheets.Item('Ark1');
lPageBreaks1 := lWorkSheet.HPageBreaks; //lPageBreaks1 = Spire.Xls.Collections.HPageBreaksCollection.'Spire.XLS, Version=7.11.1.7040, Culture=neutral, PublicKeyToken=663f351905198cb3'
//MESSAGE(FORMAT(lPageBreaks1.Count)); //This works fine...
lPageBreak1 := lPageBreaks2.Item(0); //lDoes not work ! lPageBreak1 = Spire.Xls.Core.IHPageBreak.'Spire.XLS, Version=7.11.1.7040, Culture=neutral, PublicKeyToken=663f351905198cb3'