This is a weird problem.
Forgot the code…
Thanks for reporting and considering Aspose.Cells for .NET.
I was able to replicate the problem using the latest version:
Aspose.Cells for .NET v220.127.116.11
We have logged this issue in our database. Once the issue is fixed or we get some update, we will let you know asap.
This issue has been logged as CELLSNET-31068.
Below is the code and exception for a reference.
string filePath = @“F:\Shak-Data-RW\Downloads\DeleteRange.xlsx”;
WorkbookDesigner designer = new WorkbookDesigner();
Workbook workbook = new Workbook(filePath);
designer.Workbook = workbook;
Range range = workbook.Worksheets.GetRangeByName(“DUP_Project”);
Worksheet worksheet = range.Worksheet;
Cells cells = range.Worksheet.Cells;
cells.DeleteRange(range.FirstRow, range.FirstColumn, range.FirstRow + range.RowCount - 1, range.FirstColumn + range.ColumnCount - 1, ShiftType.Left);
workbook.Save(filePath + “.out.xlsx”);
System.ArgumentOutOfRangeException was unhandled
Message="Specified argument was out of the range of valid values."
at Aspose.Cells.Workbook.Save(String fileName, SaveOptions saveOptions)
at Aspose.Cells.Workbook.Save(String fileName)
at AsposeProject.Program.f1() in F:\Shak-Data-RW\Projects\AsposeProject\AsposeProject\Program.cs:line 91
at AsposeProject.Program.Main(String args) in F:\Shak-Data-RW\Projects\AsposeProject\AsposeProject\Program.cs:line 57
at System.AppDomain._nExecuteAssembly(Assembly assembly, String args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String args)
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
We have fixed this issue. Please download: Aspose.Cells for .NET v18.104.22.168
This does fix the problem with ShiftCellsLeft.
Ok, I did find a repro.
We have fixed this issue. Please download: Aspose.Cells for .NET v22.214.171.124