We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Is there A way to clear Aspose.Cells.Range or Aspose.Cells.Cell?

Is there A way to clear Aspose.Cells.Range or Aspose.Cells.Cell ?
I need to clear values, formats, formulas, etc.

@Diego2020,
Thank you for your query.
Please give a try to one of the following APIs and share the feedback.

Workbook workbook = new Workbook();
Cells cells = workbook.Worksheets[0].Cells;
cells.Clear();
cells.ClearContents();
cells.ClearFormats();
cells.ClearRange();

Can you clear a cell or range ?
Such as:
Workbook workbook = new Workbook();
Cell cell = workbook.Worksheets[0].Cells[“A1”];
Range range = workbook.Worksheets[0].Cells.CreateRange(2, 2, 4, 4);

@Diego2020,

See the following sample code for your reference:
e.g
Sample code:

Workbook workbook = new Workbook();
Cell cell = workbook.Worksheets[0].Cells[“A1”];
Range range = workbook.Worksheets[0].Cells.CreateRange(2, 2, 4, 4);
workbook.Worksheets[0].Cells.ClearRange(range.FirstRow, range.FirstColumn, range.FirstRow + range.RowCount - 1, range.FirstColumn + range.ColumnCount - 1);

Hope, this helps a bit.

Thank you very much

@Diego2020,
You are welcome.