ExcelScript.WorkbookRangeAreas interface

Representa um conjunto de um ou mais intervalos retangulares em várias planilhas.

Comentários

Usada por

Exemplos

/**
 * This script finds the direct precedents of the active cell.
 * It changes the font and color of those precedent cells. 
 */
function main(workbook: ExcelScript.Workbook) {
  // Get the active cell.
  const selected = workbook.getActiveCell();
  
  // Get the cells that are direct precedents of the current cell.
  const precedents : ExcelScript.WorkbookRangeAreas = selected.getDirectPrecedents();

  // Set the font to bold and the fill color to orange for all the precedent cells.
  precedents.getRanges().forEach(range => {
    range.getFormat().getFill().setColor("orange");
    range.getFormat().getFont().setBold(true);
  });
}

Métodos

getAddresses()

Retorna uma matriz de endereços no estilo A1. Os valores de endereço contêm o nome da planilha para cada bloco retangular de células (por exemplo, "Planilha1! A1:B4, Planilha1! D1:D4"). Somente leitura.

getAreas()

Retorna o RangeAreasCollection objeto. Cada RangeAreas um na coleção representa um ou mais intervalos de retângulo em uma planilha.

getRangeAreasBySheet(key)

Retorna o RangeAreas objeto com base no nome ou na ID da planilha da coleção. Se a planilha não existir, esse método retornará undefined.

getRanges()

Retorna intervalos que compreendem esse objeto em um RangeCollection objeto.

Detalhes do método

getAddresses()

Retorna uma matriz de endereços no estilo A1. Os valores de endereço contêm o nome da planilha para cada bloco retangular de células (por exemplo, "Planilha1! A1:B4, Planilha1! D1:D4"). Somente leitura.

getAddresses(): string[];

Retornos

string[]

getAreas()

Retorna o RangeAreasCollection objeto. Cada RangeAreas um na coleção representa um ou mais intervalos de retângulo em uma planilha.

getAreas(): RangeAreas[];

Retornos

getRangeAreasBySheet(key)

Retorna o RangeAreas objeto com base no nome ou na ID da planilha da coleção. Se a planilha não existir, esse método retornará undefined.

getRangeAreasBySheet(key: string): RangeAreas;

Parâmetros

key

string

O nome ou a ID da planilha.

Retornos

getRanges()

Retorna intervalos que compreendem esse objeto em um RangeCollection objeto.

getRanges(): Range[];

Retornos