ExcelScript.ClearApplyTo enum

Hinweise

Beispiele

/**
 * This script removes any extra formatting that's been applied to a table. 
 * This leaves only the base table style effects.
 * Any formatting outside of the table will be left as is.
 */
function main(workbook: ExcelScript.Workbook) {
  // Get the first table on the current worksheet.
  let worksheet = workbook.getActiveWorksheet();
  let table = worksheet.getTables()[0];

  // Get the range used by the table.
  let range = table.getRange();

  // Clear all the formatting that is not applied by the table and the table style.
  range.clear(ExcelScript.ClearApplyTo.formats);
}

Felder

all
contents

Löscht den Inhalt des Bereichs.

formats

Löscht alle Formatierungen für den Bereich.

hyperlinks

Löscht alle Hyperlinks, lässt jedoch alle Inhalte und Formatierungen intakt.

removeHyperlinks

Entfernt Links und Formatierungen für die Zelle, lässt jedoch Inhalt, bedingte Formate und Datenüberprüfung erhalten.