row count in Excel (OLE automation)



Hi!

How do I get the row count here?
Does anyone know this?

Thanks
Sonnich


ExcelApplication := CreateOleObject('Excel.Application');
{ ExcelApplication.Visible := true; { debug only }
ExcelApplication.Workbooks.Open(OpenDialog2.FileName);
ExcelApplication.Workbooks[1].WorkSheets[1].Select;

//needed here:
ProgressBar1.Max :=
ExcelApplication.Workbooks[1].WorkSheets[1].Rowcount?



.