I’m currently using Aspose.Cells v8.4.1.0 for .NET, programming using C# targeting .NET 4.0.
Hi,
Thanks for your posting and using Aspose.Cells.
We were able to observe this issue by executing the following sample code with the latest version: Aspose.Cells for .NET 8.5.2. Range.CopyData is working fine but Range.Copy is not working.
We have logged this issue in our database for investigation. We will look into it and fix this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as
- CELLSNET-43836 - Range.CopyData works but Range.Copy is not working
I have also attached the source excel file used in this code and the output excel file generated by it for a reference.
C#
Workbook workbook = new Workbook(“source.xlsx”);
Worksheet worksheet = workbook.Worksheets[0];
Range srcRange = worksheet.Cells.CreateRange(2, 1, false);
Range dstRange = worksheet.Cells.CreateRange(3, 1, false);
//copy data works fine
//dstRange.CopyData(srcRange);
//but copy does not work
dstRange.Copy(dstRange);
workbook.Save(“output.xlsx”);
Hi Ahsun,
Hi,
Thanks for your using Aspose.Cells.
Please download and try the latest fix: Aspose.Cells for .NET v8.5.2.1 and let us know your feedback.
The issues you have found earlier (filed as CELLSNET-43836) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Hi,
Hi Volker,
book.Worksheets[0].Cells[“A1”].PutValue(“A1”);
book.Worksheets[0].Cells[“B1”].PutValue(“B1”);
book.Worksheets[0].Cells[“C1”].PutValue(“C1”);
Range source = book.Worksheets[0].Cells.CreateRange(“A1:C1”);
Range destination = book.Worksheets[0].Cells.CreateRange(“A2:C2”);
destination.Copy(source);
book.Save(“c:/temp/output.xlsx”, SaveFormat.Xlsx);