Hello,
So far, I am satisfied with Aspose.Cells, however, I have not been able to figure out how to retrieve hyperlinks in cells from existing XLS files, without adding a new one first in the cell (and overwrite/lose the existing one).
I hope I am clear enough and I hope someone here can assist me on this.
Thank you very much in advance.
Ben
Hi Ben,
Thank you for considering Aspose.
Well, you can get the collection of Hyperlinks in a worksheet of existing XLS file. Please see the following sample code in this regard,
//Instantiating a Workbook object
Workbook workbook = new Workbook();
//Opening the workbook with Hyperlink
workbook.Open("C:\\hyperlinks.xls");
Worksheet worksheet = workbook.Worksheets[0];
//Get the Hyperlinks collection
Hyperlinks hps = worksheet.Hyperlinks;
//add new Hyperlink with the same address as prviously existing hyperlink
worksheet.Hyperlinks.Add(10, 10, 1, 1, hps[0].Address);
workbook.Save("C:\\tstHyperlink.xls");
Thank You & Best Regards,
Thank you very much.
I used LoadData instead of Open, and worksheet.Hyperlinks was empty when I used LoadData instead.
Thank you again, and I apologize for the trouble.