Hyperlink and CopyData range issue in Aspose Cells

Hi Amjad,

Any update on this issue, please let us know by when can we expect this issue to be fixed.

Thanks & Regards,

Padmaja

Hi,

Unfortunately, the feature is not implemented yet. We will check if we can provide you an eta for it.

Thanks for your understanding!

Thank you.

Hi Padmaja,

The issue has been fixed. Please try the updated version of Aspose.Cells.dll v5.1.2.3.

Thanks,

Hi,

Could you please let me know through which API is this issue resolved, because I have tried with Copy, CopyData and also CopyValue API's on the range object , after installing the Aspose version you have sent but still it is not working, You can try this on the sample I have attached previously.If its working can you please share the code.

Thanks & Regards,

Padmaja

Hi,

I use the following sample code using your template file (with new fix we attached in the previous post) for CopyData it works fine.

I have attached my output file.

Sample code:
Workbook workbook = new Workbook(@“E:\test\hyperlinkissue\HyperLinkIssue\Book1.xlsx”);

Workbook newWb = new Workbook();
Range cpyRng = workbook.Worksheets[0].Cells.CreateRange(0, 0, 2, 2);
Range pasteRng = newWb.Worksheets[0].Cells.CreateRange(0, 0, 2, 2);
Range pasteRng2 = newWb.Worksheets[0].Cells.CreateRange(4, 4, 2, 2);

pasteRng.CopyData(cpyRng);

newWb.Save(@“e:\test\mycopydata_test.xlsx”);

Thank you.

Thanks Amjad, its working now with CopyData API.

One observation if we use CopyValue API after CopyData API then again the hyperlink is appearing as the cell value.

Thanks & Regards,

Padmaja

Hi,

I could not find the issue. Following is my sample code and attached is my generated file. I used CopyValue after CopyData in the code:

Workbook workbook = new Workbook(@“E:\test\hyperlinkissue\HyperLinkIssue\Book1.xlsx”);

Workbook newWb = new Workbook();
Range cpyRng = workbook.Worksheets[0].Cells.CreateRange(0, 0, 2, 2);
Range pasteRng = newWb.Worksheets[0].Cells.CreateRange(0, 0, 2, 2);
Range pasteRng2 = newWb.Worksheets[0].Cells.CreateRange(4, 4, 2, 2);

pasteRng.CopyData(cpyRng);


pasteRng2.CopyValue(cpyRng);

newWb.Save(@“e:\test\tst_mycopydata_and_copyvalue.xlsx”);


If you still have any confusion, kindly give us your sample code with generated file and complete details.

Thank you.

Thanks for looking into this issue.

The issue I specified i.e. hyper link getting displayed while using CopyValue after CopyData is coming only when we use the CopyValue on the same range as that of CopyData. and the same thing happens while using Copy API as well. Please find below the sample code:

Workbook workbook = new Workbook(@"E:\test\hyperlinkissue\HyperLinkIssue\Book1.xlsx");

Workbook newWb = new Workbook();
Range cpyRng = workbook.Worksheets[0].Cells.CreateRange(0, 0, 2, 2);
Range pasteRng = newWb.Worksheets[0].Cells.CreateRange(0, 0, 2, 2);
pasteRng.CopyData(cpyRng);
pasteRng.CopyValue(cpyRng);
// pasteRng.Copy(cpyRng);
newWb.Save(@"e:\\test\\tst_mycopydata_and_copyvalue.xlsx");

Thanks & Regards,

Padmaja

Hi,

I have found the issue, I have re-opened the issue again. We will let you know when the issue is resolved.

Thank you.

Hi,

Please try the attached fix.
We have removed code of copying Hyperlink of the Range.CopyValue() method.
We only copy cells’ value in Range.CopyValue() method.

Thank you.