Hyperlink classe

Incapsula l’oggetto che rappresenta un collegamento ipertestuale.

Il tipo Hyperlink espone i seguenti membri:

Proprietà

ProprietàDescrizione
addressRappresenta l’indirizzo di un collegamento ipertestuale.
text_to_displayRappresenta il testo da visualizzare per il collegamento ipertestuale specificato. Il valore predefinito è l’indirizzo del collegamento ipertestuale.
areaOttiene l’intervallo del collegamento ipertestuale.
screen_tipRestituisce o imposta il testo della descrizione comando per il collegamento ipertestuale specificato.
link_typeOttiene il tipo di collegamento.

Metodi

MetodoDescrizione
deleteElimina questo collegamento ipertestuale

Esempio

from aspose.cells import Workbook

# Instantiating a Workbook object
workbook = Workbook()
# Adding a new worksheet to the Workbook object
workbook.worksheets.add()
# Obtaining the reference of the newly added worksheet by passing its sheet index
worksheet = workbook.worksheets[0]
# Adding a hyperlink to a URL at "A1" cell
index = worksheet.hyperlinks.add("A1", 1, 1, "http://www.aspose.com")
# Getting a Hyperlink by index.
hyperlink = worksheet.hyperlinks[index]
# Setting display text of this hyperlink.
hyperlink.text_to_display = "Aspose"
# Saving the Excel file
workbook.save("book1.xls")

Guarda anche