CopyRange - in version 7.0.2 and above

Hi,


After upgrading aspose to 7.0.2.0 version or above (even tried 7.1.2.0) noticed a major issue with document printing in our application.
After investigating figured out that CopyRange functionality has changed drastically since the upgrade.

I have attached the documents showing the they looks before & after upgrade of aspose:

Document New1.xls - document before CopyRange being applied on L_1_1 using version 7.1.2.0
Document New2.xls - document after CopyRange being applied on L_1_1 using version 7.1.2.0
Document New3.xls - document before CopyRange being applied on L_1 using version 7.1.2.0
Document New4.xls - document after CopyRange being applied on L_1 using version 7.1.2.0

Document Old1.xls - document before CopyRange being applied on L_1_1 using version 6.0.1.0
Document Old2.xls - docuemnt after CopyRange being applied on L_1_1 using version 6.0.1.0
Document Old3.xls - document before CopyRange being applied on L_1 using version 6.0.1.0
Document Old4.xls - docuemnt after CopyRange being applied on L_1 using version 6.0.1.0

Could please let me know how can we achieve the feature of CopyRange (provided in version 6.0.1.0) using the latest version of aspose.

Regards,
Ash

Hi,

Thanks for your posting the samples.

We have logged your issue in our database. We will look into them and once we have some fix/update available. We will let you know.

This issue has been logged as CELLSNET-40474.

Hi,

Please provide us your sample project. We will check it soon.

And we think you have to add the range to Cells.Ranges list after you create range.

Please see the following code:

C#


Range range = w.Worksheets.GetRangeByName(“L_1_1”);

range.Worksheet.Cells.AddRange(range);

// then insert rows

//copy range.

We do not add the range to Cells.Ranges list for performance issue .So inserting rows/columns/ranges will not change the generated range if you do not call Cells.AddRange method.

Hi,

Please also download and use the latest version: Aspose.Cells for .NET v7.1.2.1

Hi,


We actually did try to run even on the latest version of the Aspose as well. Anyhow i have made a sample project which simulates our problem.

One thing i would like to know is that with the new version why an existing functionality which was working fine has suddenly disappeared OR was it a bug in the previous version which is fixed now?

Regards,
AZ

Hi,

a) How to make code work:

Please change your code as the following :

C#


Range range = _oAsposeWorkbook.Worksheets.GetRangeByName(“L_1_1_1”);

range.Worksheet.Cells.AddRange(range);


b) Why did we change it.

We could not update the range object if it’s not in the cells.Range list.

For performance issue, we did not add named range to cells.Ranges list.

There are too many named ranges in the files of some customers . These ranges will consume too much memory.

hi,


Thanks for the update. The solution works now.
PS: IMHO the transition from X version of Aspose to Y version should be smooth. Currently its a bit difficult to do this. Upgrades should always be smooth for clients.

Regards,
AZ

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

It’s good to know that proposed solution works fine. If you are using the v7.0.0, then you will not have any difficulty upgrading to latest version.

You can upgrade your existing code easily.

I also recommend you to please download and try the latest Offline - Aspose.Cells for .NET C#/VB.NET Demos.

It will help you to get familiar with Aspose.Cells for .NET API quickly and you will be able to upgrade your existing code easily. Also, these demos use the latest version of Aspose.Cells for .NET.