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

Free Support Forum - aspose.com

Cells.DeleteRange() not working properly

Hi - another issue related to the conditional formatting. It seems to not update position when cells are deleted above it.

(example is slightly more convoluted than it needs to be to demonstrate, but is close to what I'm actually trying to do)

Workbook workbook = new Workbook("input3.xlsx");
Range blockRange = workbook.Worksheets.GetRangeByName("range");

//Add new blank range at bottom of current range
CellArea ca = new CellArea();
ca.StartRow = blockRange.FirstRow + blockRange.RowCount;
ca.EndRow = ca.StartRow + 3;
ca.StartColumn = blockRange.FirstColumn;
ca.EndColumn = blockRange.FirstColumn + blockRange.ColumnCount;
blockRange.Worksheet.Cells.InsertRange(ca, ShiftType.Down);

var secondRange = workbook.Worksheets.GetRangeByName("secondrow");
secondRange.MoveTo(ca.StartRow,ca.StartColumn);
var firstRange = workbook.Worksheets.GetRangeByName("firstrow");
firstRange.MoveTo(ca.StartRow+1, ca.StartColumn);
var thirdRange = workbook.Worksheets.GetRangeByName("thirdrow");
thirdRange.MoveTo(ca.StartRow+2, ca.StartColumn);

blockRange.Worksheet.Cells.DeleteRange(blockRange.FirstRow, blockRange.FirstColumn, blockRange.FirstRow+blockRange.RowCount-1,
blockRange.FirstColumn+blockRange.ColumnCount, ShiftType.Up);

workbook.Save("output.xlsx");

Hi,


Thanks for your posting and using Aspose.Cells.

We were able to observe this issue and logged it in our database for a fix.

This issue has been logged as

  • CELLSNET-45234 - Cells.DeleteRange() is not working properly

Hi,


This is to inform you that we have fixed your issue (logged earlier as “CELLSNET-45234”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

Thank you.
Hi,

Thanks for using Aspose.Cells.

Please download and try the following latest fix

Aspose.Cells for .NET v17.3.5 (.NET 2.0) compiled in .NET Framework 2.0.
Aspose.Cells for .NET v17.3.5 (.NET 4.0) compiled in .NET Framework 4.0.

and let us know your feedback.

The issues you have found earlier (filed as CELLSNET-45234) have been fixed in Aspose.Cells for .NET 17.4.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.