This is a weird problem.
Forgot the code…
Hi,
Thanks for reporting and considering Aspose.Cells for .NET.
I was able to replicate the problem using the latest version:
Aspose.Cells for .NET v7.0.1.5
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.
C#
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”);
Exception
System.ArgumentOutOfRangeException was unhandled
Message="Specified argument was out of the range of valid values."
Source="Aspose.Cells"
StackTrace:
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 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
This does fix the problem with ShiftCellsLeft.
Ok, I did find a repro.
/Fredrik
Hi,
The issues you have found earlier (filed as 31068) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.