Saltar para o conteúdo principal
Versão: Próximo

VP RESIZE TABLE

História
ReleaseMudanças
18 R6Adicionado

VP RESIZE TABLE ( rangeObj : Object; tableName : Text )

ParâmetroTipoDescrição
rangeObjObject->Nova gama para a tabela
tableNameText->Nombre da tabela

Descrição

The VP RESIZE TABLE command changes the tableName size with regards to the rangeObj.

As regras abaixo são válidas:

  • Cabeçalhos devem permanecer na mesma linha e o intervalo de tabelas resultante deve sobrepor o intervalo de tabela original.
  • If the row count of the resized table is inferior to the initial row count, values inside cropped rows or columns are kept if they were not bound to a data context, otherwise they are deleted.
  • Se a tabela se expandir nas células que contêm dados:
    • se as linhas forem adicionadas, os dados serão excluídos,
    • se colunas forem adicionadas, dados serão mantidos e exibidos em novas colunas.

If tableName does not exist, nothing happens.

Exemplo

Você cria uma tabela com um contexto de dados:

var $context : Object
$context:=New object()

$context.col:=New collection
$context.col.push(New object("name"; "Smith"; "salary"; 10000))
$context.col.push(New object("name"; "Wesson"; "salary"; 50000))
$context.col.push(New object("name"; "Gross"; "salary"; 10500)) VP SET DATA CONTEXT("ViewProArea"; $context) VP CREATE TABLE(VP Cells("ViewProArea"; 1; 1; 3; 3); "PeopleTable"; "col")

Se quiser adicionar uma coluna antes e depois da tabela, bem como duas linhas vazias. Você pode escrever:

VP RESIZE TABLE(VP Cells("ViewProArea"; 0; 1; 4; 6); "PeopleTable")

Veja também

VP CREATE TABLE
VP Get table range