Clears the data from the range but leaves the formatting.
[Visual Basic] Sub ClearContents() [C#] void ClearContents(); [C++] void ClearContents(); [JScript] function ClearContents();
This example clears the data from cells A1:G37 on sheet one but leaves the formatting intact.
[C#]
book.Worksheets[1].Range["A1:G37"].ClearContents();
[Visual Basic]
book.Worksheets(1).Range("A1:G37").ClearContents()
[C++]
book->Worksheets->Item[1]->Range->Item[S"A1:G37"]->ClearContents();
IRange Interface | NativeExcel Namespace | Clear Method