Aller au contenu principal

ExcelGetRowCount

Structure

ExcelGetRowCount

Type

Function

Description

This function returns the number of rows in the currently selected sheet in the Excel file.

Parameters: 0

Example

Try

ExcelOpen("C:\Temp\TestExcel.xlsx")

ShowMessage(ExcelGetSheetCount)

ExcelGetSheetByIndex(1)

ShowMessage(ExcelGetRowCount&","&ExcelGetColCount) ' shows the number of rows and columns on the current sheet

ExcelClearSheet

ShowMessage(ExcelGetRowCount&","&ExcelGetColCount) ' shows 0,0

Except

ShowMessage(LastExceptionMessage) 'would display an error message from Windows if the file doesn't exist or cannot be opened.

End Try