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.getHyperlinks(). Puoi accedere a ciascun collegamento ipertestuale da questa collezione uno per uno e modificarne le proprietà.
Il seguente esempio di codice accede a tutti gli hyperlink del foglio di lavoro e utilizza il loro metodo Hyperlink.setAddress(string) per impostare il sito web Aspose.
This file contains hidden or 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
const path = require("path"); | |
const AsposeCells = require("aspose.cells.node"); | |
// The path to the documents directory. | |
const dataDir = path.join(__dirname, "data"); | |
const workbook = new AsposeCells.Workbook(dataDir + "Sample.xlsx"); | |
const worksheet = workbook.getWorksheets().get(0); | |
for (let i = 0; i < worksheet.getHyperlinks().getCount(); i++) { | |
const hl = worksheet.getHyperlinks().get(i); | |
hl.setAddress("http://www.aspose.com"); | |
} | |
workbook.save(dataDir + "output_out.xlsx"); |