I’m currently using Aspose.Cells v184.108.40.206 for .NET, programming using C# targeting .NET 4.0.
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.
Workbook workbook = new Workbook(“source.xlsx”); Worksheet worksheet = workbook.Worksheets; 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”);
Thanks for your using Aspose.Cells.
Please download and try the latest fix: Aspose.Cells for .NET v220.127.116.11 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.
Range source = book.Worksheets.Cells.CreateRange(“A1:C1”);
Range destination = book.Worksheets.Cells.CreateRange(“A2:C2”);