Passa al contenuto principale

ExcelClearSheet

Structure

ExcelClearSheet

Type

Procedure

Description

This function clears 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