Basically i want to create a HTML link in Excel but i dont know the correct code to do so. I just type in the web address like normal in a colum in Excel and when i convert it over into an html page it just shows the actually address of the link i typed.
For example:
I type inhttp://www.abc123456789.com
The link shows up but it is not clickable its only normal text. I want it to come up as clickable.
Hi, thanks for your consideration.
If you want to add a hyperlink in Cell A1 of the first worksheet, try the following code:
excel.Worksheets[0].Hyperlinks.Add(0, 0, 1, 1, “http://www.abc123456789.com
”);
@mwgsr,
We recommend you to try our latest release for the latest features and much better performance. You desired feature can be achieved using the following sample code:
// Instantiating a Workbook object
Workbook workbook = new Workbook();
// Obtaining the reference of the first worksheet
Worksheet worksheet = workbook.Worksheets[0];
// Adding a hyperlink to a URL at "A1" cell
worksheet.Hyperlinks.Add("A1", 1, 1, "http:// Www.aspose.com");
// Saving the Excel file
workbook.Save(dataDir + "output.out.xls");
For more details have a look at the following article:
Working with Hyperlinks to Link Data
Download the latest version of Aspose.Cells for .NET from the following link:
Aspose.Cells for .NET (Latest Version)
You can download the latest demos here.