CopyValue does not replace fomular with value when source and target are same

Hi

We recently found that the CopyValue function in range does not replace fomular with value when source and target are the same.

The code to repro is:

targetRange.CopyValue(sourceRange) I have attached a example file. If you cound point source and target range to A1:D9 in DailyRate worksheet, and run the repro code and save the file, when you open the file again, you will find the formulas are still there.

As I understand, copy value means the target range will be rewrite with the values of source range. Do you consider this one as a bug?

Regards

Bill

Hi,

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

We were able to notice this issue. In order to look into this issue more precisely, please provide us your sample java code replicating it with the latest version: Aspose.Cells
for Java v7.3.4.1


We will look into this issue further and fix it and update you asap.

Hi Shakeel

Thanks for your timely reply!

We are using .NET version of Aspose Cells and the version number is 7.3.4.2.

Below is the repro code:

var targetworkbook = new Workbook("CrossProcessTest.xlsx");

var sourceworkbook = new Workbook("CrossProcessTest.xlsx");

var targetSheet = targetworkbook.Worksheets["DailyRate"];
var sourceSheet = sourceworkbook.Worksheets["DailyRate"];

var targetRange = targetSheet.Cells.CreateRange("A1", "D9");
var sourceRange = sourceSheet.Cells.CreateRange("A1", "D9");

targetRange.CopyValue(sourceRange);

targetworkbook.Save(txtTargetFile.Text);

-------------------------------------------------------------

Please let me know if it is an issue on your side.

Regards

Bill

Hi,

Thanks for your sample code and the source file.

After initial investigation, we were able to notice this issue. We will look into this issue further and fix this issue.

Once, the issue is fixed or we have some other update for you, we will share it with you asap.

Thanks Shakeel for your consistant support!

Regards

Bill

james.simpson:

Thanks Shakeel for your consistant support!

Regards

Bill

Hi,

You are welcome.

Your issue has been logged with the id: CELLSNET-41245.

Once, we will have some fix or update for you, we will let you know asap.

Let us know if you face any other issue, we will be glad to assist you further.

Hi,


As we have already logged the issue into our database and we will try to fix it soon.

By the way, at the moment you may try a workaround if it suits your requirements. You may just remove the formulas and replace them with their calculated values for your “DailyRate” worksheet. See the sample code below:

Sample code:
var targetworkbook = new Workbook(“e:\test2\CrossProcessTest.xlsx”);
var targetSheet = targetworkbook.Worksheets[“DailyRate”];
targetSheet.Cells.RemoveFormulas();
targetworkbook.Save(“e:\test2\outputcopyvalueforsheet.xlsx”);

Thank you.

Hi Amjad

Thanks for your reply and providing the workaround!

The workarround is not that straightforward for us, because we need to replace the formular with the target range rather than the whole worksheet.

However, inspired by your code, I implemented a workaround that if the source range intersects with target range, we do a explict cell by cell copy value.

There is still a performance implication, so I would still be interested in your new dll with the fix:)

Thanks and regards

Bill

Hi,

Thanks for your input.

Surely, we will look into your issue and fix this problem. Please spare us some time, hopefully, this issue will be fixed in this week.

We will keep you informed with any fix or update relating to this issue.

Hi,

We have fixed this issue.

Please download and try this fix: Aspose.Cells for .NET v7.3.4.3 and let us know your feedback.

Hi Shakeel

Just confirm that this issue is fixed with v7.3.4.3. I have remove the workaround code with your fix and it runs great!

Thanks for you support! Much Appreciated!

Regards

Bill

james.simpson:

Hi Shakeel

Just confirm that this issue is fixed with v7.3.4.3. I have remove the workaround code with your fix and it runs great!

Thanks for you support! Much Appreciated!

Regards

Bill

Hi,

Thanks for your feedback.

We have closed this thread. Please feel free to post if you encounter any other issue. We will be glad to assist you further.

The issues you have found earlier (filed as CELLSNET-41245) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.