Excel.ClearApplyTo enum
Hinweise
Beispiele
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-hyperlink.yaml
await Excel.run(async (context) => {
const sheet = context.workbook.worksheets.getItem("Orders");
const productsRange = sheet.getRange("A3:A11");
productsRange.load("values");
await context.sync();
// Clear all hyperlinks.
for (let i = 0; i < productsRange.values.length; i++) {
let cellRange = productsRange.getCell(i, 0);
// Clear the hyperlink.
// This removes the hyperlink but does not update text format.
cellRange.clear(Excel.ClearApplyTo.hyperlinks);
// Update text format.
cellRange.format.font.underline = Excel.RangeUnderlineStyle.none;
cellRange.format.font.color = "#000000";
}
await context.sync();
});
Felder
| all = "All" | Löscht alles im Bereich. |
| contents = "Contents" | Löscht den Inhalt des Bereichs, wobei die Formatierung intakt bleibt. |
| formats = "Formats" | Löscht alle Formatierungen für den Bereich, wobei die Werte intakt bleiben. |
| hyperlinks = "Hyperlinks" | Löscht alle Hyperlinks, lässt jedoch alle Inhalte und Formatierungen intakt. |
| removeHyperlinks = "RemoveHyperlinks" | Entfernt Links und Formatierungen für die Zelle, lässt jedoch Inhalt, bedingte Formate und Datenüberprüfung erhalten. |