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 ed modificarne le proprietà.
Modifica dei collegamenti ipertestuali del foglio di lavoro
Il seguente codice di esempio accede a tutti i collegamenti ipertestuali del foglio di lavoro e ne modifica la proprietà Hyperlink.Address in ‘Aspose website’.
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-Java | |
// The path to the documents directory. | |
String dataDir = Utils.getDataDir(EditingHyperlinksOfWorksheet.class); | |
Workbook workbook = new Workbook(dataDir + "source.xlsx"); | |
Worksheet worksheet = workbook.getWorksheets().get(0); | |
for (int i = 0; i < worksheet.getHyperlinks().getCount(); i++) { | |
Hyperlink hl = worksheet.getHyperlinks().get(i); | |
hl.setAddress("http://www.aspose.com"); | |
} | |
workbook.save(dataDir + "output.xlsx"); |