Hi,
I am looking for a tips which can insert an hyperlink in a cell
and which target is a file on the same folder of the XLS file.
The Adress URL is pre-fixed by http:: …How can i change it ??
Thanks in advance !
Sorry for the English, I’am French !!
Rodolphe.
Hi Rodolphe,
Now Aspose.Excel only supports to add hyperlinks to a URL or current workbook. Adding hyperlinks to local file is not supported yet.
We will add this feature in about one week. Now thanks for your patience.
@Rodolphe2201,
Aspose.Excel is no more available now and is discarded. It is replaced by a latest product Aspose.Cells that contains all the latest features provided by different versions of MS Excel. You can set the hyperlink to external files using this new product as follows:
//Instantiating a Workbook object
Workbook workbook = new Workbook();
//Adding a new worksheet to the Excel object
int i = workbook.Worksheets.Add();
//Obtaining the reference of the newly added worksheet by passing its sheet index
Worksheet worksheet = workbook.Worksheets[i];
//Adding an internal hyperlink to the "B9" cell of the other worksheet "Sheet2" in
//the same Excel file
worksheet.Hyperlinks.Add("A5", 1, 1, "C:\\book1.xls");
//Saving the Excel file
workbook.Save("C:\\book2.xls");
You may refer to the following document to insert hyper link to an external file:
Adding hyperlink to External File
Get the latest free trial version of this new product here:
Aspose.Cells for .NET (Latest Version)
A ready to run solution is available here that can be used to test variety of features of this product without writing any code.