JohnB
JohnB

Reputation: 4359

What is the .Net (C#) Apose.Cells equivalent of Excel VBA range -> ClearContents?

I am porting some Excel VBA code to .Net (C#) using Aspose.Cells.

In the following example, the named range "SomeRange" refers to a collection of other ranges.

["SomeRange"].Value = (SomeRange1, SomeRange2, SomeRange2)

Here is the VBA code snippet:

Dim rng As Range
Set rng = Range("SomeRange")
rng.ClearContents

I want to iterate over all the cells in each of the sub-ranges contained in the named range "SomeRange."

What would be the Apose.Cells equivalent in .Net (C#)?

Thanks,JB

Upvotes: 0

Views: 157

Answers (1)

shakeel
shakeel

Reputation: 1725

Please use the Worksheet.Cells.ClearContents() method. Other useful and related methods are

Worksheet.Cells.ClearContents()
Worksheet.Cells.ClearFormats()
Worksheet.Cells.ClearRange()

Note: I am working as Developer Evangelist at Aspose

Upvotes: 1

Related Questions