Modifica collegamenti ipertestuali del foglio di calcolo
Contents
[
Hide
]
Aspose.Cells ti consente di accedere a tutti i collegamenti ipertestuali del foglio di lavoro utilizzando la collezione Worksheet.Hyperlinks. Puoi accedere a ciascun collegamento ipertestuale da questa collezione uno per uno e modificarne le proprietà.
Il codice di esempio seguente accede a tutti i collegamenti ipertestuali del foglio di lavoro e cambia la loro proprietà Hyperlink.Address al sito web Aspose.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
Workbook workbook = new Workbook(dataDir + "Sample.xlsx"); | |
Worksheet worksheet = workbook.Worksheets[0]; | |
for (int i = 0; i < worksheet.Hyperlinks.Count; i++) | |
{ | |
Hyperlink hl = worksheet.Hyperlinks[i]; | |
hl.Address = "http://www.aspose.com"; | |
} | |
workbook.Save(dataDir + "output_out.xlsx"); |