Clear Spreadsheet
Command description
Clear the content, formatting, or both from the specified spreadsheet range.
Command Input Parameters
| input parameters | Input parameter type | Description |
|---|---|---|
| Excel Object | ExcelApp | |
| Clear Method | enum | All, Content, Format |
| Start Row Number | str | One-based row number; -n means the nth row from the bottom |
| Start Column Name | str | Column letter such as A or a one-based column number; -n means the nth column from the right |
| End Row Number | str | One-based row number; -n means the nth row from the bottom |
| End Column Name | str | Column letter such as A or a one-based column number; -n means the nth column from the right |
| sheet | str | Worksheet name. Defaults to the active worksheet |
Command Output Parameters
None
Clear Methods
-
Content
Clears cell values and formulas while preserving formatting such as fonts, colors, and borders.
-
Format
Clears cell formatting while preserving values and formulas.
-
All
Clears both cell contents and formatting.