Hyperlink and CopyData range issue in Aspose Cells

I am trying to copy the data from one range to another but the hyperlink associated with a cell in source range is not getting copied to the destination range, the data is seen as hyperlink but the address is missing

 


This message was posted using Aspose.Live 2 Forum

Hi,

Well, Range.CopyData() only copies the data, so you need to use Range.CopyStyle() with it. Alternatively, you may use Range.Copy() as it copies both data and styles.



After some investigation, I found the hyperlink object does not copy rather only the
formatting of the hyperlink with data (formatted with blue colored and
underlined) is copied and we cannot use the link. I have logged your issue with an id:
CELLSNET-18366. We will figure it out soon.

Thank you.

Hi Amjad,

We are able to copy the hyperlink style and data using Range.Copy() or using Range.CopyStyle() and CopyData() API's but our issue is the one you found out that the Link address is not getting copied using these API's, Can you please provide us a solution for copying the hyper link address ASAP, so that when user clicks on the hyperlink the appropriate link opens after copying the range of cells?

Please let us know by when can we except an update for this issue? Awaitng for your update and hope it comes very soon,

Thanks & Regards,

Padmaja

Hi,

Yes, we already found the issue (as I mentioned in my previous post), I did log the issue with an id: CELLSNET-18366.

Hopefully, within 1-2 days, we can provide you the fixed version for Range.Copy() method for your need.



Thank you.

Hi Amjad,

Can you please let me know the status of this issue and when I can get a fix for this?

Thanks & Regards,

Padmaja

Hi Padmaja,

Please try using the attached hotfix v5.0.0.13 of Aspose.Cells for .NET. It includes the resolution of this problem. Should you have any further query, please let us know.

Hi,

I just tried with the hotfix v5.0.0.13 that you have provided but I was shocked seeing the way the its behaving now , the issue I have specified is that the hyperlink address doesnot get copied using CopyData or Copy method in Range, you have provided a fix with Copy() API, and now the Copy() Api is coping the link address to both text to display and the address, this is a weried behaviour and I didnot except this type of solution from Aspose.

I have tried in a sample application the following steps, I opened a workbook "Book1" having a hyperlink at "A1" cell, the cell text "A1" is having "Test" and the link attached is " http://www,aspose.com" to that cell, when I am using the Copy() API on Range object and saving it to "Book2" it is changing the text to display to " http://www.aspose.com" , the actual text I added in Book1 "Test" is now missing.

Please let me know if I am missing any other call or the issue is still exists and provide me with the update. If possible please support the hyperlink address copy through CopyData API as well.

Thanks & Regards,

Padmaja

Hi,

I have tested your scenario but could not find the issue you have mentioned. We appreciate if you could create a console demo application, zip it and post it here to show the issue, we will check it asap.

Thank you.

Hi Amjad,

Please find attached the sample applciation, in this Book1 is my input file having "Test" in Cell "A1" for which I have added a hyperlink address, I am trying to open this file using Aspose API and then creating the range for copying it into a different workbook(new workbook) "Book2" the added is getting copied in Cell "A1" as text as well.

Please let me know if you require any other information

Thanks & regards,

Padmaja

Hi,

We found the issue for XLSX files, thanks for the project.

We will figure your issue out soon.

Thank you.

Hi Amjad,

Can you please provide the support of copying the hyperlink address to CopyData() method along with Copy() method of the range object?

Please provide the fix for this issue ASAP.

Thanks & Regards,

Padmaja

Hi,

We have noted down your request “support of copying the hyperlink address to CopyData() method” as well. We will provide the supported version soon.

Thank you.

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


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

Hi Amjad,

We have downloaded Aspose Cells V5.1.0, the issue of hyerlink is solved by CopyValue method but still we are waiting for it to get solved in CopyData(), Can you please let us know if you are going to support the copying of hyperlink work through CopyData() method also or not.

One thing we have noticed in V5.1.0 is that few methods signature has chnaged along with few methods got deprecated, this is causing issues for us, as we need to change/modify the existing code and also put efforts and time for testing our complete application with the modified code, Its good that you are moving forward with new API and also solving issues but please ensure that there is backward compatability as well which will not cause issue for us and which will not require any code change or testing efforts for the existing application.

Thanks & Regards,

Padmaja

Hi,

We have already noted down your requirement for the enhancement over CopyData() method for hyperlinks. We will let you know when it is supported.

Well, as you already aware that we are in the process to enhance the overall api structure, we need to make the APIs more user friendly and clean as possible. We have made certain API obsolete, but mind you they are there in the product and would work same as before, your code will still work fine (only - there will be no intelligence in vs.net). Moreover, those obsoleted api will be completed eliminated from the product after one year.

Thank you.

Hi,

Please try the attached version.

We have supported copying Hyperlink in Range.CopyData in the new fix 5.1.0.1 (attached).


Thank you.

Hi Amjad,

Range.CopyData method is still not working with the new V5.1.0.1 that you have attached.

In V5.1.0 I was able to solve this issue of copying the hyperlink address and text for the cell by first calling Range.CopyData followed by Range.CopyValue, it worked for me with this combination, but in V5.1.0.1 of Aspose Cells even this stopped working.

Can you plase let me know if there is any order to call these API's?

Thanks & Regards,

Padmaja

Hi,

Could you post your sample code with template file(s) to show the issue regarding Range.CopyData(), we will check your issue soon.

Thank you.

Hi Amjad,

You can check the issue in the code/sample application I have last posted((Post 9, HyperLinkIssue code), just need to change the reference, no additional steps required for reproducing the issue.

If you are not able to reproduce the issue still then let me know I will upload the sample application.

Thanks & Regards,

Padmaja

Hi,

Yes, we found the hyperlink text is not copied with the address for CopyData method, only hyperlink address is copied. I have re-opened the issue again. We will fix it soon.

Thank you.