Lista de métodos
Aviso: os comandos nesta página não são thread-safe.
A - C - D - E - F - G - I - M - N - O - P - R - S
A
VP ADD FORMULA NAME
VP ADD FORMULA NAME ( vpAreaName : Text ; vpFormula : Text ; name : Text { ; options : Object } )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
vpFormula | Text | -> | Fórmula 4D View Pro | |
name | Text | -> | Nome da fórmula | |
options | Object | -> | Opções para a fórmula nomeada |
Descrição
O comando VP ADD FORMULA NAME
cria ou modifica uma fórmula nomeada no documento aberto.
As fórmulas nomeadas criadas por este comando são guardadas com o documento.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
Passar a fórmula 4D View Pro que deseja nomear em vpFormula. Para obter informações detalhadas sobre a sintaxe da fórmula, consulte a página [Fórmulas e funções] (formulas.md).
Passar o novo nome da fórmula em name. Se o nome já estiver a ser utilizado no mesmo âmbito, a nova fórmula nomeada substitui a existente. Note que pode utilizar o mesmo nome para diferentes âmbitos (ver abaixo).
Pode passar um objeto com propriedades adicionais para a fórmula nomeada em options. As propriedades abaixo são compatíveis:
Propriedade | Tipo | Descrição |
---|---|---|
scope | Number | Escopo da fórmula. Você pode passar o índice da planilha (a contagem começa em 0) ou usar as seguintes constantes: vk current sheet``vk</li><li> workbook Ovk current sheet ) ou global para toda a pasta de trabalho (scope=vk workbook ). |
comment | Text | Comentário associado à fórmula nomeada |
Exemplo
VP ADD FORMULA NAME("ViewProArea";"SUM($A$1:$A$10)";"Total2")
Veja também
Cell references
VP Get formula by name
VP Get names
VP ADD RANGE NAME
VP ADD RANGE NAME ( rangeObj : Object ; name : Text { ; options : Object } )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
name | Text | -> | Nome da fórmula | |
options | Object | -> | Opções para a fórmula nomeada |
Descrição
O comando VP ADD RANGE NAME
cria ou modifica um intervalo nomeado no documento aberto.
Os intervalos nomeados criados por este comando são guardados com o documento.
Em rangeObj, passe o intervalo que você deseja nomear e, em name, passe o novo nome para o intervalo. Se o nome já estiver a ser utilizado no mesmo âmbito, o novo intervalo nomeado substitui o existente. Note que pode utilizar o mesmo nome para diferentes âmbitos (ver abaixo).
Pode passar um objeto com propriedades adicionais para a fórmula nomeada em options. As propriedades abaixo são compatíveis:
Propriedade | Tipo | Descrição |
---|---|---|
scope | Number | Âmbito do intervalo. Você pode passar o índice da planilha (a contagem começa em 0) ou usar as seguintes constantes: vk current sheet``vk</li><li> workbook Ovk current sheet ) ou global em toda a pasta de trabalho (scope=vk workbook ). |
comment | Text | Comentário associado ao intervalo nomeado |
- Um intervalo nomeado é, na verdade, uma fórmula nomeada que contém coordenadas. O
VP ADD RANGE NAME
facilita a criação de intervalos nomeados, mas você também pode usar o método [VP ADD FORMULA NAME
] (#vp-add-formula-name) para criar intervalos nomeados.- As fórmulas que definem intervalos nomeados podem ser recuperadas com o método [
VP Get formula by name
] (#vp-get-formula-by-name).
Exemplo
Pretende criar um intervalo nomeado para um intervalo de células:
$range:=VP Cell("ViewProArea";2;10)
VP ADD RANGE NAME($range;"Total1")
Veja também
VP ADD SELECTION
VP ADD SELECTION ( rangeObj : Object )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Text | -> | Objeto intervalo |
Descrição
O comando VP ADICIONAR SELECÇÃO
adiciona as células especificadas às células selecionadas .
Em rangeObj, passe um objeto intervalo de células a adicionar à seleção atual.
A célula ativa não é modificada.
Exemplo
Tem células atualmente seleccionadas:
O código seguinte adicionará células à sua seleção:
$currentSelection:=VP Cells("myVPArea";3;4;2;3)
VP ADD SELECTION($currentSelection)
Resultados:
Veja também
VP Get active cell
VP Get selection
VP RESET SELECTION
VP SET ACTIVE CELL
VP SET SELECTION
VP SHOW CELL
VP ADD SHEET
VP ADD SHEET ( vpAreaName : Text )
VP ADD SHEET ( vpAreaName : Text ; index : Integer )
VP ADD SHEET ( vpAreaName : Text ; sheet : Integer ; name : Text )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
sheet | Integer | -> | Índice da nova folha | |
name | Text | -> | Nome da folha |
Descrição
O comando VP ADD SHEET
insere uma folha no documento carregado em vpAreaName.
Em vpAreaName, passe o nome da área 4D View Pro.
Em sheet, você pode passar um índice para a nova planilha. Se o índice passado é inferior a ou igual a 0, o comando insere a nova folha no início. Se índice exceder o número de folhas, o comando insere a nova folha após as já existentes.
A indexação começa em 0.
Em name, pode indicar um nome para a nova folha. O novo nome não pode conter os seguintes caracteres: *, :, [, ], ?,\,/
Exemplo
O documento tem atualmente 3 folhas:
Para inserir uma folha na terceira posição (índice 2) e chamar-lhe "March":
VP ADD SHEET("ViewProArea";2;"March")
Veja também
VP ADD SPAN
VP ADD SPAN ( rangeObj : Object )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo |
Descrição
O comando VP ADD SPAN
combina as células em rangeObj como um único intervalo de células.
Em rangeObj, passe um objeto de intervalo de células. As células do intervalo são unidas para criar uma célula maior que se estende por várias colunas ou linhas. Você pode passar vários intervalos de células para criar vários intervalos ao mesmo tempo. Note que se os intervalos de células se sobrepuserem, apenas o primeiro intervalo de células é utilizado.
- Só são apresentados os dados da célula superior esquerda. Os dados nas outras células combinadas ficam ocultos até que a extensão seja removida.
- Os dados ocultos em células estendidas podem ser acessados por meio de fórmulas (começando com a célula superior esquerda).
Exemplo
Para abranger as células do primeiro trimestre e do segundo trimestre nas duas células ao lado delas, e a célula da área sul nas duas linhas abaixo dela:
// Intervalo do primeiro trimestre
$q1:=VP Cells("ViewProArea";2;3;3;1)
// Intervalo do segundo trimestre
$q2:=VP Cells("ViewProArea";5;3;3;1)
// Intervalo da área sul
$south:=VP Cells("ViewProArea";0;5;1;3)
VP ADD SPAN(VP Combine ranges($q1;$q2;$south))
Veja também
4D View Pro Range Object Properties
VP Get spans
VP REMOVE SPAN
VP ADD STYLESHEET
VP ADD STYLESHEET ( vpAreaName : Text ; styleName : Text ; styleObj : Object { ; sheet : Integer } )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
styleName | Text | -> | Nome do estilo | |
styleObj | Object | -> | Objeto que define as propriedades do atributo | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) |
Descrição
O comando VP ADD STYLESHEET
cria ou modifica a folha de estilo styleName com base na combinação das propriedades especificadas em styleObj no documento aberto . .
As folhas de estilo criadas por esse comando são salvas com o documento.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
O parâmetro styleName permite que você atribua um nome à folha de estilos. Se o nome já estiver sendo usado no mesmo escopo, a nova folha de estilo substituirá a existente. Note que pode utilizar o mesmo nome para diferentes âmbitos (ver abaixo).
No styleObj, designe as configurações da folha de estilo (por exemplo, fonte, decoração de texto, alinhamento, bordas etc.). Para obter a lista completa de propriedades de estilo, consulte [Propriedades do objeto de estilo] (configuring.md#style-object-properties).
Você pode designar onde definir a folha de estilos no parâmetro opcional sheet usando o índice da folha (a indexação começa em 0) ou com as seguintes constantes:
vk current sheet
vk workbook
Se uma folha de estilo styleName for definida no nível da pasta de trabalho e em um nível de planilha, o nível da planilha terá prioridade sobre o nível da pasta de trabalho quando a folha de estilo for definida.
Para aplicar a folha de estilo, use os comandos VP SET DEFAULT STYLE ou VP SET CELL STYLE.
Exemplo
O seguinte código:
$styles:=New object
$styles.backColor:="green"
//Line Border Object
$borders:=New object("color"; "green"; "style";vk line style medium dash dot)
$styles.borderBottom:=$borders
$styles.borderLeft:=$borders
$styles.borderRight:=$borders
$styles.borderTop:=$borders
VP ADD STYLESHEET("ViewProArea"; "GreenDashDotStyle";$styles)
//Para aplicar o estilo
VP SET CELL STYLE(VP Cells("ViewProArea";1;1;2;2);New object("name"; "GreenDashDotStyle"))
criará e aplicará o seguinte objeto estilo denominado GreenDashDotStyle:
{
backColor:green,
borderBottom:{color:green,style:10},
borderLeft:{color:green,style:10},
borderRight:{color:green,style:10},
borderTop:{color:green,style:10}
}
Veja também
4D View Pro Style Objects and Style Sheets
VP Get stylesheet
VP Get stylesheets
VP REMOVE STYLESHEET
VP SET CELL STYLE
VP SET DEFAULT STYLE
VP All
VP All ( vpAreaName : Text { ; sheet : Integer } ) : Object
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) | |
Resultados | Object | <- | Objeto intervalo de todas as células |
Descrição
O comando VP ALL
retorna um novo objeto de intervalo que faz referência a todas as células.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
No parâmetro opcional sheet, pode designar uma folha específica onde o intervalo será definido (a contagem começa em 0). Se omitido ou se você passar vk current sheet
, a planilha atual será usada.
Exemplo
Pretende definir um objeto intervalo para todas as células da folha atual:
$all:=VP All("ViewProArea") // todas as células da folha atual
Veja também
VP Cell
VP Cells
VP Column
VP Combine ranges
VP Name
VP Row
C
VP Cell
VP Cell ( vpAreaName ; column : Integer ; row : Integer ; Text { ; sheet : Integer } ) : Object
Parâmetro | Tipo | Descrição | |
---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro |
column | Longint | -> | Índice de coluna |
row | Longint | -> | Índice de linha |
sheet | Integer | -> | Índice da folha (folha atual se omitida) |
Resultados | Object | <- | Objeto intervalo de uma única célula |
Descrição
O comando VP Cell
retorna um novo objeto de intervalo que faz referência a uma célula específica.
Este comando destina-se a intervalos de uma única célula. Para criar um objeto de intervalo para várias células, use o comando VP Cells.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
O parâmetro column define a coluna da posição do intervalo de células. Passe o índice da coluna neste parâmetro.
O parâmetro row define a linha da posição do intervalo de células. Passar o índice da linha neste parâmetro.
No parâmetro opcional sheet, você pode indicar o índice da planilha em que o intervalo será definido. Se for omitido ou se passar vk current sheet, é utilizada a folha de cálculo atual.
a indexação começa em 0.
Exemplo
Se quiser definir um objeto de intervalo para a célula mostrada abaixo (na planilha atual):
O código seria:
$cell:=VP Cell("ViewProArea";2;4) // C5
Veja também
VP All
VP Cells
VP Column
VP Combine ranges
VP Name
VP Row
VP Cells
VP Cells ( vpAreaName : Text ; column: Integer ; row: Integer ; columnCount : Integer ; rowCount : Integer { ; sheet : Integer } ) : Object
História
Versão | Mudanças |
---|---|
v17 R4 | Adicionado |
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
column | Integer | -> | Índice de coluna | |
row | Integer | -> | Índice de linha | |
columnCount | Integer | -> | Número de colunas | |
rowCount | Integer | -> | Número de linhas | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) | |
Resultados | Object | <- | Objeto intervalo de células |
Descrição
O comando VP Cells
retorna um novo objeto de intervalo que faz referência a células específicas.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
O parâmetro column define a primeira coluna do intervalo de células. Passar o índice da coluna (a contagem começa em 0) neste parâmetro. Se o intervalo estiver em várias colunas, você também deverá usar o parâmetro columnCount.
No parâmetro linha, você pode definir a(s) linha(s) da posição da faixa de célula. Passar o índice da linha (a contagem começa em 0) neste parâmetro. Se o intervalo estiver dentro de várias linhas, você também deverá usar o parâmetro rowCount.
O parâmetro columnCount permite que você defina o número total de colunas em que o intervalo se encontra. columnCount deve ser maior que 0.
O parâmetro rowCount permite que você defina o número total de linhas em que o intervalo se encontra. *rowCount tem de ser superior a 0.
No parâmetro opcional sheet, pode designar uma folha específica onde o intervalo será definido (a contagem começa em 0). Se for omitido ou se passar vk current sheet, é utilizada a folha de cálculo atual.
Exemplo
Você deseja definir um objeto de intervalo para as seguintes células (na planilha atual):
O código seria:
$cells:=VP Cells("ViewProArea";2;4;2;3) // C5 a D7
Veja também
VP All
VP Cells
VP Column
VP Combine ranges
VP Name
VP Row
VP Column
VP Column ( vpAreaName : Text ; column: Integer ; columnCount : Integer { ; sheet : Integer } ) : Object
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
column | Integer | -> | Índice de coluna | |
columnCount | Integer | -> | Número de colunas | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) | |
Resultados | Object | <- | Objeto intervalo de células |
Descrição
O comando VP Column
retorna um novo objeto de intervalo que faz referência a uma coluna ou colunas específicas.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
O parâmetro column define a primeira coluna do intervalo de colunas. Passar o índice da coluna (a contagem começa em 0) neste parâmetro. Se o intervalo contiver várias colunas, você também deverá usar o parâmetro opcional columnCount.
O parâmetro opcional columnCount permite que você defina o número total de colunas do intervalo. columnCount deve ser maior que 0. Se for omitido, o valor será definido como 1 por padrão e um intervalo de tipo de coluna será criado.
No parâmetro opcional sheet, pode designar uma folha específica onde o intervalo será definido (a contagem começa em 0). Se for omitido ou se passar vk current sheet, é utilizada a folha de cálculo atual.
Exemplo
Se quiser definir um objeto de intervalo para a coluna mostrada abaixo (na planilha atual):
O código seria:
$column:=VP Column("ViewProArea";3) // coluna D
Veja também
VP All
VP Cells
VP Column
VP Combine ranges
VP Name
VP Row
VP SET COLUMN ATTRIBUTES
VP COLUMN AUTOFIT
VP COLUMN AUTOFIT ( rangeObj : Object )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo |
Descrição
O comando VP COLUMN AUTOFIT
dimensiona automaticamente a(s) coluna(s) em rangeObj de acordo com seu conteúdo.
Em rangeObj, passe um objeto de intervalo contendo um intervalo de colunas cujo tamanho será tratado automaticamente.
Exemplo
As colunas a seguir são todas do mesmo tamanho e não exibem parte do texto:
Selecionar as colunas e executar este código:
VP COLUMN AUTOFIT(VP Get selection("ViewProarea"))
... redimensiona as colunas para se adaptarem ao tamanho do conteúdo:
Veja também
VP Combine ranges
VP Combine ranges ( rangeObj : Object ; otherRangeObj : Object {;...otherRangeObjN : Object } ) : Object
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
otherRangeObj | Object | -> | Objeto intervalo | |
Resultados | Object | <- | Objeto que contém um intervalo combinado |
Descrição
O comando VP Combine Ranges
retorna um novo objeto de intervalo que incorpora dois ou mais objetos de intervalo existentes. Todos os intervalos devem ser da mesma área 4D View Pro.
Em rangeObj, passe o primeiro objeto de intervalo.
Em otherRangeObj, passe outro objeto de intervalo para combinar com rangeObj.
O comando incorpora objetos rangeObj e otherRangeObj por referência.
Exemplo
Se quiser combinar objetos de intervalo de células, colunas e linhas em um novo e diferente objeto de intervalo:
$cell:=VP Cell("ViewProArea";2;4) // C5
$column:=VP Column("ViewProArea";3) // coluna D
$row:=VP Row("ViewProArea";9) // linha 10
$combine:=VP Combine ranges($cell;$column;$row)
Veja também
VP All
VP Cells
VP Column
VP Combine ranges
VP Name
VP Row
VP SET COLUMN ATTRIBUTES
VP Convert from 4D View
VP Convert from 4D View ( 4DViewDocument : Blob ) : Object
Parâmetro | Tipo | Descrição | |
---|---|---|---|
4DViewDocument | Blob | -> | Documento 4D View |
Resultados | Object | <- | Objeto 4D View Pro |
Descrição
O comando VP Convert from 4D View
permite que você converta um documento legado do 4D View em um objeto do 4D View Pro.
Esse comando não exige que o plug-in legado do 4D View esteja instalado em seu ambiente.
No parâmetro 4DViewDocument, passe uma variável ou campo BLOB que contenha o documento do 4D View a ser convertido. O comando retorna um objeto 4D View Pro no qual todas as informações originalmente armazenadas no documento 4D View são convertidas em atributos 4D View Pro.
Exemplo
Se quiser obter um objeto 4D View Pro de uma área 4D View armazenada em um BLOB:
C_OBJECT($vpObj)
$vpObj:=VP Convert from 4D View($pvblob)
VP Convert to picture
VP Convert to picture ( vpObject : Object {; rangeObj : Object} ) : Picture
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpObject | Object | -> | Objeto 4D View Pro que contém a área a converter | |
rangeObj | Object | -> | Objeto intervalo | |
Resultados | Object | <- | Imagem SVG da área |
Descrição
O comando VP Convert to picture
converte o objeto vpObject do 4D View Pro (ou o intervalo rangeObj dentro de vpObject) em uma imagem SVG.
Este comando é útil, por exemplo:
- para incorporar um documento 4D View Pro em outro documento, como um documento 4D Write Pro
- para imprimir um documento do 4D View Pro sem ter que carregá-lo em uma área do 4D View Pro.
Em vpObject, passe o objeto 4D View Pro que você deseja converter. Este objeto deve ter sido analisado anteriormente usando Exportação de VP para objeto ou salvo usando VP EXPORT DOCUMENT.
O processo de conversão de SVG exige que as expressões e os formatos (cf. Cell Format) incluídos na área do 4D View Pro sejam avaliados pelo menos uma vez, para que possam ser exportados corretamente. Se você converter um documento que não foi avaliado anteriormente, as expressões ou os formatos poderão ser renderizados de forma inesperada.
Em rangeObj, passe um intervalo de células a ser convertido. Por padrão, se esse parâmetro for omitido, todo o conteúdo do documento será convertido.
O conteúdo do documento é convertido com relação aos seus atributos de visualização, incluindo formatos (veja a observação acima), visibilidade de cabeçalhos, colunas e linhas. Há suporte para a conversão dos seguintes elementos:
- Texto: estilo / fonte / tamanho / alinhamento / orientação / rotação / formato
- Fundo da célula: cor / imagem
- Borda das células: espessura / cor / estilo
- Fusão de células
- Imagens
- Altura da linha
- Largura da coluna
- Colunas/linhas ocultas.
A visibilidade da linha quadriculada depende do atributo definido no documento com VP SET PRINT INFO.
Resultado
O comando devolve uma imagem em formato SVG.
Exemplo
Pretende converter uma área 4D View Pro em SVG, pré-visualizar o resultado e enviá-lo para uma variável imagem:
C_OBJECT($vpAreaObj)
C_PICTURE($vPict)
$vpAreaObj:=VP Export to object("ViewProArea")
$vPict:=VP Convert to picture($vpAreaObj) //exportar toda a área
Veja também
VP EXPORT DOCUMENT
VP Export to object
VP SET PRINT INFO
VP Copy to object
História
Versão | Mudanças |
---|---|
v19 R4 | Adicionado |
VP Copy to object ( rangeObj : Object {; options : Object} ) : Object
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
options | Object | -> | Opções adicionais | |
Resultados | Object | <- | Objecto devolvido. Contém os dados copiados |
Descrição
O comando VP Copy to object
copia o conteúdo, o estilo e as fórmulas de rangeObj para um objeto.
Em rangeObj, passe o intervalo de células com os valores, a formatação e as fórmulas a serem copiadas. Se rangeObj for um intervalo combinado, somente o primeiro será usado.
Você pode passar um parâmetro options opcional com as seguintes propriedades:
Propriedade | Tipo | Descrição | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
copy | Parâmetros | Verdadeiro (padrão) para manter os valores copiados, a formatação e as fórmulas após a execução do comando. Falso para removê-los. | ||||||||||||||
copyOptions | Longint | Especifica o que é copiado ou movido. Valores possíveis:
|
As opções de colagem definidas nas opções são tomadas em conta.
O comando retorna um objeto que contém os dados copiados.
Exemplo
Esse exemplo de código primeiro armazena o conteúdo, os valores, a formatação e as fórmulas de um intervalo em um objeto e, em seguida, cola-os em outro intervalo:
var $originRange; $targetRange; $dataObject; $options : Object
$originRange:=VP Cells("ViewProArea"; 0; 0; 2; 5)
$options:=New object
$options.copy:=True
$options.copyOptions:=vk clipboard options all
$dataObject:=VP Copy to object($originRange; $options)
$targetRange:=VP Cell("ViewProArea"; 4; 0)
VP PASTE FROM OBJECT($targetRange; $dataObject; vk clipboard options all)
Veja também
VP PASTE FROM OBJECT
VP MOVE CELLS
VP Get workbook options
VP SET WORKBOOK OPTIONS
VP CREATE TABLE
História
Versão | Mudanças |
---|---|
v19 R8 | Suporte das opções do tema: bandColumns , bandRows , highlightFirstColumn , highlightLastColumn , theme |
v19 R7 | Suporte da opção allowAutoExpand |
v19 R6 | Adicionado |
VP CREATE TABLE ( rangeObj : Object ; tableName : Text {; source : Text} {; options : cs.ViewPro.TableOptions} )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
tableName | Text | -> | Nome da tabela | |
source | Text | -> | Nome da propriedade de contexto de dados a apresentar na tabela | |
options | cs.ViewPro.TableOptions | -> | Opções adicionais |
Descrição
O comando VP CREATE TABLE
cria uma tabela no intervalo especificado. É possível criar uma tabela em um intervalo de células para facilitar o gerenciamento e a análise de um grupo de dados relacionados. Em geral, uma tabela contém dados relacionados em linhas e colunas e aproveita um [contexto de dados] (#vp-set-data-context).
Em rangeObj, passe o intervalo de células em que a tabela será criada.
Em tableName, passe um nome para a tabela. O nome deve:
- ser único na folha
- incluir pelo menos 5 caracteres
- não incluir espaços ou começar com um número
Em source, você pode passar um nome de propriedade de um [contexto de dados] (#vp-set-data-context) para exibir seus dados na tabela. Isto liga a tabela ao contexto de dados. Quando o contexto de dados é atualizado, os dados exibidos na tabela são atualizados de acordo. A propriedade source deve conter uma coleção de objetos e cada elemento representa uma linha.
- Se você não especificar uma fonte, o comando cria uma tabela vazia com o tamanho definido em rangeObj.
- Se a fonte especificada não puder ser totalmente exibida no documento, nenhuma tabela será criada.
Na classe opções, passe um objeto da classe cs.ViewPro.TableOptions
que contém as propriedades da tabela a serem definidas.
Dentro do objeto opções, a coleção tableColumns determina a estrutura das colunas da tabela. O comprimento da coleção tableColumns deve ser igual à contagem de colunas de intervalo:
- Quando a contagem de colunas no intervaloObj excede o número de colunas em tableColumns, a tabela é preenchida com colunas vazias adicionais.
- Quando a contagem de colunas no intervaloObj é inferior ao número de tableColumns, a tabela exibe um número de colunas que correspondem ao número de colunas do intervalo.
Se você passar uma opção source, mas sem a opção tableColumn, o comando gera colunas automaticamente. Nesse caso, rangeObj deve ser uma faixa de célula. Caso contrário, é utilizada a primeira célula do intervalo. Ao gerar colunas automaticamente, as seguintes regras se aplicam:
- Se os dados passados para o comando forem uma coleção de objetos, os nomes das propriedades serão usados como títulos de coluna. Por exemplo:
([{ LastName: \"Freehafer\", FirstName: \"Nancy\"},{ LastName: \"John\", FirstName: \"Doe\"})
Aqui, os títulos das colunas seriam LastName
e FirstName
.
Se os dados passados para o comando forem uma coleção de valores escalares, eles deverão conter uma coleção de subcoleções:
- A coleção de primeiro nível contém subcoleções de valores. Cada subcolecção define uma linha. Passa uma coleção vazia para saltar uma linha. O número de valores na primeira subcoleção determina quantas colunas são criadas.
- Os índices das subcoleções são utilizados como títulos das colunas.
- Cada subcoleção define os valores das células para a linha. Os valores podem ser
Integer
,Real
,Boolean
,Text
,Date
,Null
,Time
ouPicture
. Um valorTime
deve ser um objeto que contenha um atributo de tempo, conforme descrito em VP SET VALUE.
Isto só funciona quando se geram colunas automaticamente. Não é possível usar uma coleção de dados escalares com a opção tableColumns.
Exemplo
Para criar uma tabela utilizando um contexto de dados:
// Set a data context
var $data : Object
$data:=New object()
$data.people:=New collection()
$data.people.push(New object("firstName"; "John"; "lastName"; "Smith"; "email"; "johnsmith@gmail.com"))
$data.people.push(New object("firstName"; "Mary"; "lastName"; "Poppins"; "email"; "marypoppins@gmail.com")) VP SET DATA CONTEXT("ViewProArea"; $data)
// Define the columns for the table
var $options : cs. ViewPro. TableOptions
$options:=cs. ViewPro. TableOptions.new()
$options.tableColumns:=New collection()
$options.tableColumns.push(cs. ViewPro. TableColumns.new("name"; "First name"; "dataField"; "firstName"))
$options.tableColumns.push(cs. ViewPro. TableColumns.new("name"; "Last name"; "dataField"; "lastName"))
$options.tableColumns.push(cs. ViewPro. TableColumns.new("name"; "Email"; "dataField"; "email"))
// Create a table from the "people" collection VP CREATE TABLE(VP Cells("ViewProArea"; 1; 1; $options.tableColumns.length; 1); "ContextTable"; "people"; $options)
Aqui está o resultado:
Veja também
VP Find table
VP Get table column attributes
VP Get table column index
VP INSERT TABLE COLUMNS
VP INSERT TABLE ROWS
VP REMOVE TABLE
VP RESIZE TABLE
VP SET DATA CONTEXT
VP SET TABLE COLUMN ATTRIBUTES
VP SET TABLE THEME
D
VP DELETE COLUMNS
VP DELETE COLUMNS ( rangeObj : Object )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo |
Descrição
O comando VP DELETE COLUMNS
remove as colunas do rangeObj.
Em rangeObj, passe um objeto que contenha um intervalo de colunas a remover. Se o intervalo passado contiver:
- tanto colunas como linhas, apenas as colunas são removidas.
- apenas linhas, o comando não faz nada.
> > Columns are deleted from right to left.
Exemplo
Para eliminar as colunas seleccionadas pelo utilizador (colunas B, C e D da imagem abaixo):
utilizar o seguinte código:
VP DELETE COLUMNS(VP Get selection("ViewProArea"))
Veja também
VP DELETE ROWS
VP DELETE ROWS ( rangeObj : Object )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo |
Descrição
O comando VP DELETE ROWS
remove as linhas do rangeObj.
Em rangeObj, passe um objeto que contenha um intervalo de linhas a remover. Se o intervalo passado contiver:
- tanto colunas como linhas, apenas as linhas são removidas.
- apenas colunas, o comando não faz nada.
> > Rows are deleted from bottom to top.
Exemplo
Para eliminar as linhas selecionadas pelo usuário (na imagem abaixo, as linhas 1, 2 e 3):
utilizar o seguinte código:
VP DELETE ROWS(VP Get selection("ViewProArea"))
Veja também
E
VP EXPORT DOCUMENT
História
Versão | Mudanças |
---|---|
v20 R2 | Suporte de documentos .sjs |
VP EXPORT DOCUMENT ( vpAreaName : Text ; filePath : Text {; paramObj : Object} )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
filePath | Text | -> | Caminho do documento | |
paramObj | Object | -> | Opções de exportação |
Descrição
O comando VP EXPORT DOCUMENT
exporta o objeto do 4D View Pro anexado à área vpAreaName do 4D View Pro para um documento em disco, de acordo com os parâmetros filePath e paramObj.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
Em filePath, passe o caminho de destino e o nome do documento a ser importado. Se você não especificar um caminho, o documento será salvo no mesmo nível da pasta Project.
Você pode especificar o formato do arquivo exportado incluindo uma extensão após o nome do documento:
- 4D View Pro (".4vp")
- Microsoft Excel (".xlsx")
- PDF (".pdf")
- CSV (".txt", ou ".csv")
- Documento SpreadJS (".sjs")
Se a extensão não for incluída, mas o formato for especificado em paramObj, o arquivo exportado terá a extensão que corresponde ao formato, exceto para o formato CSV (nenhuma extensão é adicionada nesse caso).
O parâmetro opcional paramObj permite que você defina várias propriedades para o objeto exportado do 4D View Pro, bem como inicie um método de retorno de chamada quando a exportação for concluída.
Propriedade | Tipo | Descrição | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
format | text | (opcional) Quando presente, designa o formato de arquivo exportado: ".4vp" (padrão), ".csv", ".xlsx", ".pdf" ou ".sjs". Você pode usar as seguintes constantesvk 4D View Pro format``vk</li><li> csv format``vk</li><li> MS Excel format</li>``vk<li> pdf</li><li> format``vk sjs format 4D | |||||||||||||||||||||||||||
senha | text | Somente Microsoft Excel (opcional) - Senha usada para proteger o documento do MS Excel | |||||||||||||||||||||||||||
formula | 4D. Function | Método de retorno de chamada a ser lançado quando a exportação estiver concluída. O uso de um método de retorno de chamada é necessário quando a exportação é assíncrona (que é o caso dos formatos PDF e Excel) se você precisar que algum código seja executado após a exportação. O método de retorno de chamada deve ser passado com o comando Formula . Consulte [Passing a callback method (formula)] (#passing-a-callback-method-formula). | |||||||||||||||||||||||||||
valuesOnly | boolean | Especifica que somente os valores das fórmulas (se houver) serão exportados. | |||||||||||||||||||||||||||
includeFormatInfo | boolean | Verdadeiro para incluir informações de formatação; caso contrário, falso (o padrão é verdadeiro). As informações de formatação são úteis em alguns casos, por exemplo, para exportação para SVG. Por outro lado, a definição dessa propriedade como False permite reduzir o tempo de exportação. | |||||||||||||||||||||||||||
includeBindingSource | boolean | 4DVP e Microsoft Excel apenas. True (padrão) para exportar os valores do contexto de dados atual como valores de célula no documento exportado (os contextos de dados em si não são exportados). Caso contrário, false. Cell binding sempre é exportada. Para o gerenciamento do contexto de dados e da vinculação de células, consulte [VP SET DATA CONTEXT] (#vp-set-data-context) e [VP SET BINDING PATH] (#vp-set-binding-path). | |||||||||||||||||||||||||||
sheet | number | Somente PDF (opcional) - Índice da planilha a ser exportada (a partir de 0). -2=todas as planilhas visíveis (padrão), -1=apenas a planilha atual | |||||||||||||||||||||||||||
pdfOptions | object | PDF apenas (opcional) - Opções para exportação de PDF
| |||||||||||||||||||||||||||
csvOptions | object | Somente CSV (opcional) - Opções para exportação de csv
| |||||||||||||||||||||||||||
sjsOptions | object | SJS only (optional) - Options for sjs export
| |||||||||||||||||||||||||||
customProperty | any | Qualquer propriedade personalizada que estará disponível por meio do parâmetro $3 no método de retorno de chamada. |
Notas sobre o formato Excel:
- Ao exportar um documento do 4D View Pro para um arquivo no formato Microsoft Excel, algumas configurações podem ser perdidas. Por exemplo, os métodos e fórmulas 4D não são suportados pelo Excel. You can verify other settings with this list from SpreadJS.
- Exporting in this format is run asynchronously, use the
formula
property of the paramObj for code to be executed after the export.
Notas sobre o formato PDF:
- Ao exportar um documento do 4D View Pro em PDF, as fontes usadas no documento são automaticamente incorporadas ao arquivo PDF. Somente fontes OpenType (arquivos .OTF ou .TTF) com um mapa Unicode podem ser incorporadas. Se não for encontrado nenhum arquivo de fonte válido para uma fonte, será usada uma fonte padrão.
- Exporting in this format is run asynchronously, use the
formula
property of the paramObj for code to be executed after the export.
Notas sobre o formato CSV:
- Ao exportar um documento do 4D View Pro para CSV, algumas configurações podem ser perdidas, pois somente o texto e os valores são salvos.
- Todos os valores são guardados como cadeias de caracteres entre aspas duplas. For more information on delimiter-separated values, see this article on Wikipedia.
- Exporting in this format is run asynchronously, use the
formula
property of the paramObj for code to be executed after the export.
Notes about SpreadJS file format:
- SpreadJS files are zipped files.
- Exporting in this format is run asynchronously, use the
formula
property of the paramObj for code to be executed after the export.
Once the export operation is finished, VP EXPORT DOCUMENT
automatically triggers the execution of the method set in the formula property of the paramObj, if used.
Passagem de um método de retorno de chamada (fórmula)
When including the optional paramObj parameter, the command allows you to use the Formula
command to call a 4D method which will be executed once the export has completed. O método de retorno de chamada receberá os seguintes valores em parâmetros locais:
Parâmetro | Tipo | Descrição | |
---|---|---|---|
param1 | text | The name of the 4D View Pro area object | |
param2 | text | O caminho do ficheiro do objeto 4D View Pro exportado | |
param3 | object | A reference to the command's paramObj | |
param4 | object | Um objeto devolvido pelo método com uma mensagem de estado | |
.success | boolean | True se a exportação for bem sucedida, False caso contrário. | |
.errorCode | integer | Código de erro. | |
.errorMessage | text | Mensagem de erro. |
Exemplo 1
Pretende exportar o conteúdo da área "VPArea" para um documento 4D View Pro no disco:
var $docPath: Text
$docPath:="C:\\Bases\\ViewProDocs\\MyExport.4VP"
VP EXPORT DOCUMENT("VPArea";$docPath)
//MyExport.4VP is saved on your disk
Exemplo 2
Pretende exportar a folha atual em PDF:
var $params: Object
$params:=New object
$params.format:=vk pdf format
$params.sheet:=-1
$params.pdfOptions:=New object("title";"Annual Report";"author";Current user)
VP EXPORT DOCUMENT("VPArea";"report.pdf";$params)
Exemplo 3
Você deseja exportar um documento do 4D View Pro no formato ".xlsx" e chamar um método que iniciará o Microsoft Excel com o documento aberto após a conclusão da exportação:
$params:=New object
$params.formula:=Formula(AfterExport)
$params.format:=vp MS Excel format //".xlsx"
$params.valuesOnly:=True
VP EXPORT DOCUMENT("ViewProArea";"c:\\tmp\\convertedfile";$params)
Método AfterExport:
#DECLARE($areaName : Text ; $filePath : Text ; $params : Object ; $status : Object )
If($status.success=False)
ALERT($status.errorMessage)
Else
LAUNCH EXTERNAL PROCESS("C:\\Program Files\\Microsoft Office\\Office15\\excel "+$filePath)
End if
Exemplo
You want to export the current sheet to a .txt
file with pipe-separated values:
var $params : Object
$params:=New object
$params.range:=VP Cells("ViewProArea";0;0;2;5)
$params.rowDelimiter:="\n"
$params.columnDelimiter:="|" VP EXPORT DOCUMENT("ViewProArea";"c:\\tmp\\data.txt";New object("format";vk csv format;"csvOptions";$params))
Aqui está o resultado:
Veja também
VP Convert to picture
VP Export to object
VP Column
VP Print
VP EXPORT TO BLOB
VP EXPORT TO BLOB ( vpAreaName : Text ; paramObj : Object )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
paramObj | Object | -> | Opções de exportação |
Descrição
The VP EXPORT TO BLOB
command exports the vpAreaName 4D View Pro document in a 4D.Blob according to the paramObj options. The exported blob is available through the export callback. A exportação e importação de áreas do 4D View Pro como blobs é rápida e eficiente em termos de memória.
In paramObj, you can pass several properties:
Propriedade | Tipo | Descrição |
---|---|---|
formula | 4D. Function | (obrigatório) Método de retorno de chamada a ser lançado quando a exportação estiver concluída. Consulte [Passing a callback method (formula)] (#passing-a-callback-method-formula). |
includeAutoMergedCells | Parâmetros | Se deve incluir as células mescladas automaticamente ao salvar; padrão=falso. |
includeBindingSource | Parâmetros | Se deve incluir a fonte de vinculação ao salvar, padrão = true. |
includeCalcModelCache | Parâmetros | Se deve incluir os dados extras de cálculo. Pode afetar a velocidade de abertura do arquivo; padrão=false. |
includeEmptyRegionCells | Parâmetros | Se devem ser incluídas células vazias (células sem dados ou apenas com estilo) fora do intervalo de dados usado, default=true |
includeFormulas | Parâmetros | Se a fórmula deve ser incluída ao salvar, padrão = true. |
includeStyles | Parâmetros | Se deve incluir o estilo ao salvar, padrão=true. |
includeUnusedNames | Parâmetros | Se deve incluir o nome personalizado não utilizado ao salvar, padrão=true. |
|saveAsView|Boolean|Whether to apply the format string to exporting value when saving, default=false.|
Os seguintes parâmetros podem ser usados no método de retorno de chamada:
Parâmetro | Tipo | Descrição | |
---|---|---|---|
param1 | text | O nome do objeto 4D View Pro | |
param2 | 4D.blob | O blob exportado | |
param3 | object | A reference to the command's paramObj parameter | |
param4 | object | Um objeto devolvido pelo método com uma mensagem de estado | |
.success | boolean | True se a exportação for bem sucedida, False caso contrário. | |
.errorCode | integer | Código de erro. | |
.errorMessage | text | Mensagem de erro. |
Exemplo
The command VP EXPORT TO BLOB
is asynchronous. You must create a callback method (named VPBlobCallback in our example) to use the export results.
//Exportar o documento VP
VP EXPORT TO BLOB("ViewProArea"; {formula: Formula(VPBlobCallback)})
//VPBlobCallback method
#DECLARE($area : Text; $data : 4D.Blob; $parameters : Object; $status : Object)
var $myEntity : cs.myTableEntity
If ($status.success)
// Save the document in a table
$myEntity:=ds.myTable.new()
$myEntity.blob:=$data
$myEntity.save()
End if
Veja também
VP Export to object
VP Export to object ( vpAreaName : Text {; options : Object} ) : Object
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
options | Object | -> | Opções de exportação | |
Resultados | Object | <- | Objecto 4D View Pro |
Descrição
The VP Export to object
command returns the 4D View Pro object attached to the 4D View Pro area vpAreaName. Você pode usar esse comando, por exemplo, para armazenar a área do 4D View Pro em um campo de objeto do banco de dados 4D.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
In the options parameter, you can pass the following export options, if required:
Propriedade | Tipo | Descrição |
---|---|---|
includeFormatInfo | Parâmetros | Verdadeiro (padrão) para incluir informações de formatação; caso contrário, falso. As informações de formatação são úteis em alguns casos, por exemplo, para exportação para SVG. Por outro lado, a definição dessa propriedade como False permite reduzir o tempo de exportação. |
includeBindingSource | Parâmetros | True (padrão) para exportar os valores do contexto de dados atual como valores de célula no objeto exportado (os contextos de dados em si não são exportados). Caso contrário, false. Cell binding sempre é exportada. |
For more information on 4D View Pro objects, please refer to the 4D View Pro object paragraph.
Exemplo 1
Você deseja obter a propriedade "version" da área atual do 4D View Pro:
var $vpAreaObj : Object
var $vpVersion : Number
$vpAreaObj:=VP Export to object("vpArea")
// $vpVersion:=OB Get($vpAreaObj;"version")
$vpVersion:=$vpAreaObj.version
Exemplo 2
Pretende-se exportar a área, excluindo a informação de formatação:
var $vpObj : Object
$vpObj:=VP Export to object("vpArea";New object("includeFormatInfo";False))
Veja também
VP Convert to picture
VP EXPORT DOCUMENT
VP IMPORT FROM OBJECT
F
VP Find
VP Find ( rangeObj : Object ; searchValue : Text ) : Object
VP Find ( rangeObj : Object ; searchValue : Text ; searchCondition : Object } ) : Object
VP Find ( rangeObj : Object ; searchValue : Text ; searchCondition : Object ; replaceValue : Text ) : Object
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
searchValue | Text | -> | Valor da pesquisa | |
searchCondition | Object | -> | Objeto que contém condição(ões) de pesquisa | |
replaceValue | Text | -> | Valor de substituição | |
Resultados | Object | <- | Objeto intervalo |
Descrição
The VP Find
command searches the rangeObj for the searchValue. Podem ser utilizados parâmetros opcionais para refinar a pesquisa e/ou substituir quaisquer resultados encontrados.
In the rangeObj parameter, pass an object containing a range to search.
The searchValue parameter lets you pass the text to search for within the rangeObj.
You can pass the optional searchCondition parameter to specify how the search is performed. As propriedades abaixo são compatíveis:
Propriedade | Tipo | Descrição | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
afterColumn | Integer | O número da coluna imediatamente anterior à coluna inicial da pesquisa. If the rangeObj is a combined range, the column number given must be from the first range. Default value: -1 (beginning of the rangeObj) | ||||||||
afterRow | Integer | O número da linha imediatamente anterior à linha inicial da pesquisa. If the rangeObj is a combined range, the row number given must be from the first range. Default value: -1 (beginning of the rangeObj) | ||||||||
all | Parâmetros | |||||||||
flags | Integer |
$search.flags:=vk find flag use wild cards+vk find flag ignore case | ||||||||
order | Integer |
| ||||||||
target | Integer |
These flags can be combined. For example: |
In the optional replaceValue parameter, you can pass text to take the place of any instance of the text in searchValue found in the rangeObj.
Objecto devolvido
A função retorna um objeto de intervalo que descreve cada valor de pesquisa que foi encontrado ou substituído. É devolvido um objeto de intervalo vazio se não forem encontrados resultados.
Exemplo 1
Para encontrar a primeira célula que contém a palavra "Total":
var $range;$result : Object
$range:=VP All("ViewProArea")
$result:=VP Find($range;"Total")
Exemplo 2
Para encontrar "Total" e substituí-lo por "Total geral":
var $range;$condition;$result : Object
$range:=VP All("ViewProArea")
$condition:=New object
$condition.target:=vk find target text
$condition.all:=True //Search entire document
$condition.flags:=vk find flag exact match
// Replace the cells containing only 'Total' in the current sheet with "Grand Total"
$result:=VP Find($range;"Total";$condition;"Grand Total")
// Check for empty range object
If($result.ranges.length=0)
ALERT("No result found")
Else
ALERT($result.ranges.length+" results found")
End if
VP Find table
História
Versão | Mudanças |
---|---|
v19 R7 | Adicionado |
VP Find table ( rangeObj : Object ) : Text
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Intervalo de células | |
Resultados | Text | <- | Nome da tabela |
Descrição
The VP Find table
command returns the name of the table to which to the rangeObj cell belongs.
In rangeObj, pass a cell range object. Se as células designadas não pertencerem a uma tabela, o comando retornará uma string vazia.
If rangeObj is not a cell range or contains multiple ranges, the first cell of the first range is used.
Exemplo
If (FORM Event.code=On After Edit && FORM Event.action="valueChanged")
$tableName:=VP Find table(FORM Event.range)
If ($tableName#"")
ALERT("The "+$tableName+" table has been modified.")
End if
End if
Veja também
VP FLUSH COMMANDS
VP FLUSH COMMANDS ( vpAreaName : Text )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro |
Descrição
The VP FLUSH COMMANDS
command immediately executes stored commands and clears the command buffer.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
Para aumentar o desempenho e reduzir o número de solicitações enviadas, os comandos do 4D View Pro chamados pelo desenvolvedor são armazenados em um buffer de comando. When called, VP FLUSH COMMANDS
executes the commands as a batch when leaving the method and empties the contents of the command buffer.
Exemplo
Você deseja rastrear a execução dos comandos e esvaziar o buffer de comandos:
VP SET TEXT VALUE(VP Cell("ViewProArea1";10;1);"INVOICE")
VP SET TEXT VALUE(VP Cell("ViewProArea1";10;2);"Invoice date: ")
VP SET TEXT VALUE(VP Cell("ViewProArea1";10;3);"Due date: ")
VP FLUSH COMMANDS(("ViewProArea1")
TRACE
VP Font to object
VP Font to object ( font : Text ) : Object
Parâmetro | Tipo | Descrição | |
---|---|---|---|
font | Text | -> | Cadeia de caracteres abreviada da fonte |
Resultados | Object | <- | Objecto letra |
Descrição
The VP Font to object
utility command returns an object from a font shorthand string. Esse objeto pode ser usado para definir ou obter configurações de propriedade de fonte por meio de notação de objeto.
In the font parameter, pass a font shorthand string to specify the different properties of a font (e.g., "12 pt Arial"). You can learn more about font shorthand strings in this page for example.
O objeto retornado contém atributos de fonte definidos como propriedades. For more information about the available properties, see the VP Object to font command.
Exemplo 1
Este código:
$font:=VP Font to object("16pt arial")
devolverá o seguinte objeto $font:
{
family:arial
size:16pt
}
Exemplo 2
See example for VP Object to font
.
Veja também
4D View Pro Style Objects and Style Sheets
VP Object to font
VP SET CELL STYLE
VP SET DEFAULT STYLE
G
VP Get active cell
VP Get active cell ( vpAreaName : Text { ; sheet : Integer } ) : Object
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) | |
Resultados | Object | <- | Range object of single cell |
Descrição
The VP Get active cell
command returns a new range object referencing the cell which has the focus and where new data will be entered (the active cell).
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
No parâmetro opcional sheet, pode designar uma folha específica onde o intervalo será definido (a contagem começa em 0). Se omitido ou se você passar vk current sheet
, a planilha atual será usada.
Exemplo
O código seguinte irá obter as coordenadas da célula ativa:
$activeCell:=VP Get active cell("myVPArea")
//returns a range object containing:
//$activeCell.ranges[0].column=3
//$activeCell.ranges[0].row=4
//$activeCell.ranges[0].sheet=0
Veja também
VP ADD SELECTION
VP Get selection
VP RESET SELECTION
VP SET ACTIVE CELL
VP SET SELECTION
VP SHOW CELL
VP Get binding path
História
Versão | Mudanças |
---|---|
v19 R5 | Adicionado |
VP Get binding path ( rangeObj : Object ) : Text
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
Resultados | Text | <- | Name of the attribute bound to the cell |
Descrição
The VP Get binding path
command returns the name of the attribute bound to the cell specified in rangeObj.
In rangeObj, pass an object that is either a cell range or a combined range of cells. Note que:
- If rangeObj is a range with several cells, the command returns the attribute name linked to the first cell in the range.
- If rangeObj contains several ranges of cells, the command returns the attribute name linked to the first cell of the first range.
Exemplo
var $p; $options : Object
var $myAttribute : Text
$p:=New object
$p.firstName:="Freehafer"
$p.lastName:="Nancy" VP SET DATA CONTEXT("ViewProArea"; $p) VP SET BINDING PATH(VP Cell("ViewProArea"; 0; 0); "firstName")
VP SET BINDING PATH(VP Cell("ViewProArea"; 1; 0); "lastName")
$myAttribute:=VP Get binding path(VP Cell("ViewProArea"; 1; 0)) // "lastName"
Veja também
VP SET BINDING PATH
VP Get data context
VP SET DATA CONTEXT
VP Get cell style
VP Get cell style ( rangeObj : Object ) : Object
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
Resultados | Object | <- | Objecto estilo |
Descrição
The VP Get cell style
command returns a style object for the first cell in the rangeObj.
In rangeObj, pass a range containing the style to retrieve.
- If rangeObj contains a cell range, the cell style is returned.
- If rangeObj contains a range that is not a cell range, the style of the first cell in the range is returned.
- If rangeObj contains several ranges, only the style of the first cell in the first range is returned.
Exemplo
Para obter os detalhes sobre o estilo na célula selecionada (B2):
Este código:
$cellStyle:=VP Get cell style(VP Get selection("myDoc"))
... devolverá este objecto:
{
"backColor":"Azure",
"borderBottom":
{
"color":#800080,
"style":5
}
"font":"8pt Arial",
"foreColor":"red",
"hAlign":1,
"isVerticalText":"true",
"vAlign":0
}
Veja também
VP GET DEFAULT STYLE
VP SET CELL STYLE
VP Get column attributes
VP Get column attributes ( rangeObj : Object ) : Collection
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
Resultados | Collection | <- | Collection of column properties |
Descrição
The VP Get column attributes
command returns a collection of properties for any column in the rangeObj.
In rangeObj, pass an object containing a range of the columns whose attributes will be retrieved.
The returned collection contains any properties for the columns, whether or not they have been set by the VP SET COLUMN ATTRIBUTES command.
Exemplo
O seguinte código:
C_OBJECT($range)
C_COLLECTION($attr)
$range:=VP Column("ViewProArea";1;2)
$attr:=VP Get column attributes($range)
... will return a collection of the attributes within the given range:
Veja também
VP Get row attributes
VP SET COLUMN ATTRIBUTES
VP SET ROW ATTRIBUTES
VP Get column count
VP Get column count ( vpAreaName : Text { ; sheet : Integer } ) : Integer
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome da área 4D View Pro no formulário | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) | |
Resultados | Integer | <- | Total number of columns |
Descrição
The VP Get column count
command returns the total number of columns from the designated sheet.
In vpAreaName, pass the name property of the 4D View Pro area. Se passar um nome que não existe, é devolvido um erro.
You can define where to get the column count in the optional sheet parameter using the sheet index (counting begins at 0). Se omitido ou se você passar vk current sheet
, a planilha atual será usada.
Exemplo
O código seguinte retorna o número de colunas na área 4D View Pro:
C_INTEGER($colCount)
$colCount:=VP Get column count("ViewProarea")
Veja também
VP Get row count
VP SET COLUMN COUNT
VP SET ROW COUNT
VP Get current sheet
VP Get current sheet ( vpAreaName : Text )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
Resultado | Integer | <- | Índice da folha actual |
Descrição
The VP Get current sheet
command returns the index of the current sheet in vpAreaName. The current sheet is the selected sheet in the document.
Em vpAreaName, passe o nome da área 4D View Pro.
A indexação começa em 0.
Exemplo
Quando a terceira folha é selecionada:
O comando devolve 2:
$index:=VP Get current sheet("ViewProArea")
Veja também
VP Get data context
História
Versão | Mudanças |
---|---|
v19 R5 | Adicionado |
VP Get data context ( vpAreaName : Text {; sheet : Integer } ) : Object
VP Get data context ( vpAreaName : Text {; sheet : Integer } ) : Collection
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Object | -> | Nome de objeto formulário área 4D View Pro | |
sheet | Integer | -> | Índice da folha a partir da qual se obtém o contexto de dados | |
Resultados | Object | Collection | <- | Contexto de dados |
Descrição
The VP Get data context
command returns the current data context of a worksheet. O contexto retornado inclui todas as modificações feitas no conteúdo do contexto de dados.
In sheet, pass the index of the sheet to get the data context from. Se nenhum índice for passado, o comando retornará o contexto de dados da planilha atual. If there is no context for the worksheet, the command returns Null
.
The function returns an object or a collection depending on the type of data context set with VP SET DATA CONTEXT.
Exemplo
Para obter o contexto de dados ligado às células seguintes:
var $dataContext : Object
$dataContext:=VP Get data context("ViewProArea") // {firstName:Freehafer,lastName:Nancy}
Veja também
VP SET DATA CONTEXT
VP Get binding path
VP SET BINDING PATH
VP Get default style
VP Get default style ( vpAreaName : Text { ; sheet : Integer } ) : Object
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome da área 4D View Pro no formulário | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) | |
Resultados | Object | <- | Default style settings |
Descrição
The VP Get default style
command returns a default style object for a sheet. The returned object contains basic document rendering properties as well as the default style settings (if any) previously set by the VP SET DEFAULT STYLE method. For more information about style properties, see Style Objects & Style Sheets.
In vpAreaName, pass the name property of the 4D View Pro area. Se passar um nome que não existe, é devolvido um erro.
You can define where to get the column count in the optional sheet parameter using the sheet index (counting begins at 0). Se omitido ou se você passar vk current sheet
, a planilha atual será usada.
Exemplo
Para obter os detalhes sobre o estilo predefinido para este documento:
Este código:
$defaultStyle:=VP Get default style("myDoc")
will return this information in the $defaultStyle object:
{
backColor:#E6E6FA,
hAlign:0,
vAlign:0,
font:12pt papyrus
}
Veja também
VP Get cell style
VP SET DEFAULT STYLE
VP Get formula
VP Get formula ( rangeObj : Object) : Text
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
Resultados | Text | <- | Formula |
Descrição
The VP Get formula
command retrieves the formula from a designated cell range.
In rangeObj, pass a range whose formula you want to retrieve. If rangeObj designates multiple cells or multiple ranges, the formula of the first cell is returned. If rangeObj is a cell that does not contain a formula, the method returns an empty string.
Exemplo
//set a formula
VP SET FORMULA(VP Cell("ViewProArea";5;2);"SUM($A$1:$C$10)")
$result:=VP Get formula(VP Cell("ViewProArea";5;2)) // $result="SUM($A$1:$C$10)"
Veja também
VP Get formulas
VP SET FORMULA
VP SET ROW COUNT
VP Get formula by name
VP Get formula by name ( vpAreaName : Text ; name : Text { ; scope : Number } ) : Object
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
name | Text | -> | Nome do intervalo nomeado | |
scope | Number | -> | Âmbito alvo (padrão=folha atual) | |
Resultados | Object | <- | Named formula or named range definition |
Descrição
The VP Get formula by name
command returns the formula and comment corresponding to the named range or named formula passed in the name parameter, or null if it does not exist in the defined scope.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
Pass the named range or named formula that you want to get in name. Note que os intervalos com nome são devolvidos como fórmulas que contém referências absolutas de células.
You can define where to get the formula in scope using either the sheet index (counting begins at 0) or the following constants:
vk current sheet
vk workbook
Objecto devolvido
O objeto retornado contém as propriedades abaixo:
Propriedade | Tipo | Descrição |
---|---|---|
formula | Text | Texto da fórmula correspondente à fórmula nomeada ou intervalo nomeado. Para os intervalos nomeados, a fórmula é uma sequência de coordenadas absolutas. |
comment | Text | Comentário correspondente à fórmula nomeada ou ao intervalo nomeado |
Exemplo
$range:=VP Cell("ViewProArea";0;0)
VP ADD RANGE NAME("Total1";$range)
$formula:=VP Get formula by name("ViewProArea";"Total1")
//$formula.formula=Sheet1!$A$1
$formula:=VP Get formula by name("ViewProArea";"Total")
//$formula=null (if not existing)
Veja também
VP ADD FORMULA NAME
VP Get names
VP Get formulas
VP Get formulas ( rangeObj : Object ) : Collection
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
Resultados | Collection | <- | Coleção de valores de uma fórmula |
Descrição
The VP Get formulas
command retrieves the formulas from a designated rangeObj.
In rangeObj, pass a range whose formulas you want to retrieve. If rangeObj designates multiple ranges, the formula of the first range is returned. If rangeObj does not contain any formulas, the command returns an empty string.
A coleção devolvida é bidimensional:
- A coleção de primeiro nível contém subcoleções de fórmulas. Cada subcolecção representa uma linha.
- Cada subcoleção define os valores das células para a linha. The first-level collection contains subcollections of formulas.
Exemplo
Você deseja recuperar as fórmulas nas colunas Sum e Average desse documento:
Pode utilizar este código:
$formulas:=VP Get formulas(VP Cells("ViewProArea";5;1;2;3))
//$formulas[0]=[Sum(B2:D2),Average(B2:D2)]
//$formulas[1]=[Sum(B3:D3),Average(B3:D3)]
//$formulas[2]=[Sum(B4:D4),Average(C4:D4)]
Veja também
VP Get formula
VP Get values
VP SET FORMULAS
VP SET VALUES
VP Get frozen panes
VP Get frozen panes ( vpAreaName : Text { ; sheet : Integer } ) : Object
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) | |
Resultados | Object | <- | Objeto que contém as informações sobre as colunas e linhas congeladas |
Descrição
The VP Get frozen panes
command returns an object with information about the frozen columns and rows in vpAreaName.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
No parâmetro opcional sheet, pode designar uma folha específica onde o intervalo será definido (a contagem começa em 0). Se omitido ou se você passar vk current sheet
, a planilha atual será usada.
Objeto devolvido
O comando devolve um objeto que descreve as colunas e linhas congeladas. Este objeto pode conter as seguintes propriedades:
Propriedade | Tipo | Descrição |
---|---|---|
columnCount | Integer | O número de colunas congeladas à esquerda da folha |
trailingColumnCount | Integer | O número de colunas congeladas à direita da folha |
rowCount | Integer | O número de linhas congeladas na parte superior da folha |
trailingRowCount | Integer | O número de linhas congeladas na parte inferior da folha |
Exemplo
Pretende obter informações sobre o número de colunas e linhas congeladas:
var $panesObj : Object
$panesObj:=VP Get frozen panes("ViewProArea")
O objeto devolvido contém, por exemplo:
Veja também
VP Get names
VP Get names ( vpAreaName : Text { ; scope : Number } ) : Collection
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
scope | Number | -> | Escopo de destino (padrão = planilha atual) | |
Resultados | Collection | <- | Nomes existentes no âmbito definido |
Descrição
The VP Get names
command returns a collection of all defined "names" in the current sheet or in the scope designated by the scope parameter.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
You can define where to get the names in scope using either the sheet index (counting begins at 0) or the following constants:
vk current sheet
vk workbook
Coleção devolvida
A coleção devolvida contém um objeto por nome. As seguintes propriedades do objeto podem ser devolvidas:
Propriedade | Tipo | Descrição |
---|---|---|
result[ ].name | Text | nome da célula ou do intervalo |
result[ ].formula | Text | formula |
result[ ].comment | Text | Comentário associado ao nome |
Propriedades disponíveis dependendo do tipo de elemento nomeado (célula com nome, intervalo com nome ou fórmula com nome)
Exemplo
var $list : Collection
$list:=VP Get names("ViewProArea";2) //nomes na 3ª folha
Veja também
VP ADD FORMULA NAME
VP ADD RANGE NAME
VP Get formula by name
VP Name
VP Get print info
VP Get print info ( vpAreaName : Text { ; sheet : Integer } ) : Object
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) | |
Resultados | Object | <- | Object of printing information |
Descrição
The VP Get print info
command returns an object containing the print attributes of the vpAreaName.
Pass the the name of the 4D View Pro area in vpAreaName. Se passar um nome que não existe, é devolvido um erro.
In the optional sheet parameter, you can designate a specific spreadsheet (counting begins at 0) whose printing attributes you want returned. Se omitido ou se você passar vk current sheet
, a planilha atual será usada.
Exemplo
Este código:
$pinfo:=VP Get print info("ViewProArea")
... returns the print attributes of the 4D View Pro area set in the VP SET PRINT INFO command:
{
bestFitColumns:false,
bestFitRows:false,
blackAndWhite:false,
centering:0,
columnEnd:8,
columnStart:0,
firstPageNumber:1,
fitPagesTall:1,
fitPagesWide:1,
footerCenter:"&BS.H.I.E.L.D. &A Sales Per Region",
footerCenterImage:,
footerLeft:,
footerLeftImage:,
footerRight:"page &P of &N",
footerRightImage:,
headerCenter:,
headerCenterImage:,
headerLeft:"&G",
headerLeftImage:logo.png,
headerRight:,
headerRightImage:,
margin:{top:75,bottom:75,left:70,right:70,header:30,footer:30},
orientation:2,
pageOrder:0,
pageRange:,
paperSize:{width:850,height:1100,kind:1},
qualityFactor:2,
repeatColumnEnd:-1,
repeatColumnStart:-1,
repeatRowEnd:-1,
repeatRowStart:-1,
rowEnd:24,
rowStart:0,
showBorder:false,
showColumnHeader:0,
showGridLine:false,
showRowHeader:0,
useMax:true,
watermark:[],
zoomFactor:1
}
Veja também
4D View Pro Print Attributes
VP SET PRINT INFO
VP Get row attributes
VP Get row attributes ( rangeObj : Object ) : Collection
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
Resultados | Collection | <- | Coleção de propriedades de linha |
Descrição
The VP Get row attributes
command returns a collection of properties for any row in the rangeObj.
In rangeObj, pass an object containing a range of the rows whose attributes will be retrieved.
The returned collection contains any properties for the rows, whether or not they have been set by the VP SET ROW ATTRIBUTES method.
Exemplo
O código seguinte retorna uma coleção de atributos no intervalo fornecido:
var $range : Object
var $attr : Collection
$range:=VP Column("ViewProArea";1;2)
$attr:=VP Get row attributes($range)
Veja também
VP Get column attributes
VP SET COLUMN ATTRIBUTES
VP SET ROW ATTRIBUTES
VP Get row count
VP Get row count ( vpAreaName : Text {; sheet : Integer } ) : Integer
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome da área 4D View Pro no formulário | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) | |
Resultados | Integer | <- | Total number of rows |
Descrição
The VP Get row count
command returns the total number of rows from the designated sheet.
In vpAreaName, pass the name property of the 4D View Pro area. Se passar um nome que não existe, é devolvido um erro.
You can define where to get the row count in the optional sheet parameter using the sheet index (counting begins at 0). Se omitido ou se você passar vk current sheet
, a planilha atual será usada.
Exemplo
O código seguinte retorna o número de linhas na área 4D View Pro:
var $rowCount : Integer
$rowCount:=VP Get row count("ViewProarea")
Veja também
VP Get column count
VP SET COLUMN COUNT
VP SET ROW COUNT
VP Get selection
VP Get selection ( vpAreaName : Text {; sheet : Integer } ) ) : Object
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome da área 4D View Pro no formulário | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) | |
Resultados | Object | <- | Objeto intervalo de células |
Descrição
The VP Get selection
command returns a new range object referencing the current selected cells.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
No parâmetro opcional sheet, pode designar uma folha específica onde o intervalo será definido (a contagem começa em 0). Se omitido ou se você passar vk current sheet
, a planilha atual será usada.
Exemplo
O código seguinte recuperará as coordenadas de todas as células na seleção atual:
$currentSelection:=VP Get selection("myVPArea")
//returns a range object containing:
//$currentSelection.ranges[0].column=5
//$currentSelection.ranges[0].columnCount=2
//$currentSelection.ranges[0].row=8
//$currentSelection.ranges[0].rowCount=6
Veja também
VP ADD SELECTION
VP Get active cell
VP SET ACTIVE CELL
VP SET SELECTION
VP SHOW CELL
VP Get sheet count
VP Get sheet count ( vpAreaName : Text ) : Integer
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
Resultado | Integer | <- | Número de folhas |
Descrição
The VP Get sheet count
command returns the number of sheets in the document loaded in vpAreaName.
Em vpAreaName, passe o nome da área 4D View Pro.
Exemplo
No documento seguinte:
Obter a contagem de folhas e definir a folha atual como a última folha:
$count:=VP Get sheet count("ViewProArea")
//set the current sheet to the last sheet (indexing starts at 0)
VP SET CURRENT SHEET("ViewProArea";$count-1)
Veja também
VP Get sheet index
VP SET SHEET COUNT
VP Get sheet index
VP Get sheet index ( vpAreaName : Text ; name : Text ) : Integer
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
name | Text | -> | Nome da folha | |
Resultado | Integer | <- | Índice da folha |
Descrição
The VP Get sheet index
command returns the index of a sheet based on its name in vpAreaName.
Em vpAreaName, passe o nome da área 4D View Pro.
In name, pass the name of the sheet whose index will be returned. If no sheet named name is found in the document, the method returns -1.
A indexação começa em 0.
Exemplo
No documento seguinte:
Obter o índice da folha denominada "Total first quarter":
$index:=VP Get sheet index("ViewProArea"; "Total do primeiro trimestre") //retorna 2
Veja também
VP Get sheet count
VP Get sheet name
VP Get sheet name
VP Get sheet name ( vpAreaName : Text ; sheet : Integer ) : Text
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
sheet | Integer | -> | Índice da folha | |
Resultado | Text | <- | Nome da folha |
Descrição
The VP Get sheet name
command returns the name of a sheet based on its index in vpAreaName.
Em vpAreaName, passe o nome da área 4D View Pro.
In sheet, pass the index of the sheet whose name will be returned.
Se o índice de folha passado não existir, o método devolve um nome vazio.
A indexação começa em 0.
Exemplo
Obtém o nome da terceira folha do documento:
$sheetName:=VP Get sheet name("ViewProArea";2)
Veja também
VP Get sheet options
VP Get sheet options ( vpAreaName : Text {; sheet : Integer } ) ) : Object
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome da área 4D View Pro no formulário | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) | |
Resultados | Object | <- | Sheet options object |
Descrição
The VP Get sheet options
command returns an object containing the current sheet options of the vpAreaName area.
Pass the name of the 4D View Pro area in vpAreaName. Se passar um nome que não existe, é devolvido um erro.
In the optional sheet parameter, you can designate a specific spreadsheet (counting begins at 0). Se omitido ou se você passar vk current sheet
, a planilha atual será usada.
Objeto devolvido
O método devolve um objeto que contém os valores atuais de todas as opções de folha disponíveis An option value may have been modified by the user or by the VP SET SHEET OPTIONS method.
To view the full list of the options, see Sheet Options.
Exemplo
$options:=VP Get sheet options("ViewProArea")
If($options.colHeaderVisible) //column headers are visible
... //do something End if
Veja também
4D VIEW PRO SHEET OPTIONS
VP SET SHEET OPTIONS
VP Get show print lines
VP Get show print lines ( vpAreaName : Text {; sheet : Integer } ) : Boolean
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
sheet | Integer | <- | Índice da folha | |
Resultado | Parâmetros | <- | True if print lines are visible, False otherwise |
Descrição
The VP Get show print lines
command returns True
if the print preview lines are visible and False
if they are hidden.
Em vpAreaName, passe o nome da área 4D View Pro.
In sheet, pass the index of the target sheet. If sheet is omitted, the command applies to the current sheet.
A indexação começa em 0.
Exemplo
O código abaixo comprova se as linhas de visualização prévia são mostradas ou ocultadas no documento:
var $result : Boolean
$result:=VP Get show print lines("ViewProArea";1)
Veja também
VP Get spans
VP Get spans ( rangeObj : Object ) : Object
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
Resultados | Object | <- | Object of cell spans in the defined range |
Descrição
The VP Get spans
command retrieves the cell spans in the designated rangeObj.
In rangeObj, pass a range of cell spans you want to retrieve. If rangeObj does not contain a cell span, an empty range is returned.
Exemplo
Se quiser centrar o texto das células fusionadas neste documento:
// Search for all cell spans
$range:=VP Get spans(VP All("ViewProArea"))
//center text
$style:=New object("vAlign";vk vertical align center;"hAlign";vk horizontal align center)
VP SET CELL STYLE($range;$style)
Veja também
VP Get stylesheet
VP Get stylesheet ( vpAreaName : Text ; styleName : Text { ; sheet : Integer } ) : Object
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
styleName | Text | -> | Nome do estilo | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) | |
Resultados | Object | <- | Objeto da folha de estilo |
Descrição
The VP Get stylesheet
command returns the styleName style sheet object containing the property values which have been defined.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
In styleName, pass the name of the style sheet to get.
You can define where to get the style sheet in the optional sheet parameter using the sheet index (counting begins at 0) or with the following constants:
vk current sheet
vk workbook
Exemplo
O seguinte código:
$style:=VP Get stylesheet("ViewProArea";"GreenDashDotStyle")
... will return the GreenDashDotStyle style object from the current sheet:
{
backColor:green,
borderBottom:{color:green,style:10},
borderLeft:{color:green,style:10},
borderRight:{color:green,style:10},
borderTop:{color:green,style:10}
}
Veja também
4D View Pro Style Objects and Style Sheets
VP ADD STYLESHEET
VP Get stylesheets
VP REMOVE STYLESHEET
VP Get stylesheets
VP Get stylesheets ( vpAreaName : Text { ; sheet : Integer } ) : Collection
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
sheet | Integer | -> | Âmbito alvo (padrão = folha atual) | |
Resultados | Collection | <- | Collection of style sheet objects |
Descrição
The VP Get stylesheets
command returns the collection of defined style sheet objects from the designated sheet.
In vpAreaName, pass the name property of the 4D View Pro area. Se passar um nome que não existe, é devolvido um erro.
You can define where to get the style sheets in the optional sheet parameter using the sheet index (counting begins at 0) or with the following constants:
vk current sheet
vk workbook
Exemplo
O código abaixo retorna a coleção de todos os objetos de estilo na folha atual:
$styles:=VP Get stylesheets("ViewProArea")
Nesse caso, a planilha atual usa dois objetos estilo:
[
{
backColor:green,
borderLeft:{color:green,style:10},
borderTop:{color:green,style:10},
borderRight:{color:green,style:10},
borderBottom:{color:green,style:10},
name:GreenDashDotStyle
},
{
backColor:red,
textIndent:10,
name:RedIndent
}
]
Veja também
VP ADD STYLESHEET
VP Get stylesheet
VP REMOVE STYLESHEET
VP Get table column attributes
História
Versão | Mudanças |
---|---|
v19 R7 | Adicionado |
VP Get table column attributes ( vpAreaName : Text ; tableName : Text ; column : Integer {; sheet : Integer } ) : Object
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
tableName | Text | -> | Nome da tabela | |
column | Integer | -> | Índice da coluna na tabela | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) | |
Resultados | Object | <- | Atributos da coluna |
Descrição
The VP Get table column attributes
command returns the current attributes of the specified column in the tableName.
Em vpAreaName, passe o nome da área 4D View Pro.
In sheet, pass the index of the target sheet. Se nenhum indice for especcificado ou se passar -1, o comando se aplica a folha atual.
A indexação começa em 0.
The command returns an object describing the current attributes of the column:
Propriedade | Tipo | Descrição |
---|---|---|
dataField | text | Nome da propriedade da coluna da tabela no contexto de dados. Não devolvido se a tabela for apresentada automaticamente |
name | text | Nome da coluna da tabela. |
footerText | text | Valor do rodapé da coluna. |
footerFormula | text | Fórmula do rodapé da coluna. |
filterButtonVisible | boolean | True se o botão de filtro da coluna da tabela for exibido, senão False |
If tableName is not found or if column index is higher than the number of columns, the command returns null.
Exemplo
var $attributes : Object
$attributes:=VP Get table column attributes("ViewProArea"; $tableName; 1)
If ($attributes.dataField#"")
...
End if
Veja também
VP CREATE TABLE
VP Find table
VP SET TABLE COLUMN ATTRIBUTES
VP RESIZE TABLE
VP Get table column index
História
Versão | Mudanças |
---|---|
v19 R7 | Adicionado |
VP Get table column index ( vpAreaName : Text ; tableName : Text ; columnName : Text {; sheet : Integer } ) : Integer
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
tableName | Text | -> | Nome da tabela | |
columnName | Text | -> | Nome da coluna da tabela | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) | |
Resultados | Integer | <- | Index of columnName |
Descrição
The VP Get table column index
command returns the index of the columnName in the tableName.
Em vpAreaName, passe o nome da área 4D View Pro.
In columnName, pass the name of the table column for which you want to get the index.
In sheet, pass the index of the target sheet. Se nenhum indice for especcificado ou se passar -1, o comando se aplica a folha atual.
A indexação começa em 0.
If tableName or columnName is not found, the command returns -1.
Exemplo
// Search the column id according the column name
var $id : Integer
$id:=VP Get table column index($area; $tableName; "Weight price")
// Remove the column by id
VP REMOVE TABLE COLUMNS($area; $tableName; $id)
Veja também
VP CREATE TABLE
VP Find table
VP Get table column attributes
VP SET TABLE COLUMN ATTRIBUTES
VP Get table dirty rows
História
Versão | Mudanças |
---|---|
v19 R8 | Adicionado |
VP Get table dirty rows ( vpAreaName : Text ; tableName : Text { ; reset : Boolean {; sheet : Integer }} ) : Collection
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
tableName | Text | -> | Nome da tabela | |
reset | Parâmetros | -> | True para apagar o estado "dirty" da tabela atual, False para mantê-lo igual. Padrão=True | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) | |
Resultados | Collection | <- | Collection of objects with all the items modified since the last reset |
Descrição
The VP Get table dirty rows
command returns a collection of dirty row objects, containing items that were modified since the last reset in the specified tableName.
Em vpAreaName, passe o nome da área 4D View Pro.
In tableName, pass the name of the table for which you want to get the dirty rows. Only modified columns bound to a data context will be taken into account.
By default, calling the command will clear the dirty status from the current table. To keep this status untouched, pass False
in the reset parameter.
In sheet, pass the index of the target sheet. Se nenhum indice for especcificado ou se passar -1, o comando se aplica a folha atual.
A indexação começa em 0.
Each dirty row object in the returned collection contains the following properties:
Propriedade | Tipo | Descrição |
---|---|---|
item | object | Objeto modificado da linha modificada |
originalItem | object | Objeto antes da modificação |
row | integer | Índice da linha modificada |
If tableName is not found or if it does not contain a modified column, the command returns an empty collection.
Exemplo
Pretende contar o número de linhas editadas:
var $dirty : Collection
$dirty:=VP Get table dirty rows("ViewProArea"; "ContextTable"; False)
VP SET NUM VALUE(VP Cell("ViewProArea"; 0; 0); $dirty.length)
Veja também
VP CREATE TABLE
VP Find table
VP SET TABLE COLUMN ATTRIBUTES
VP RESIZE TABLE
VP Get table range
História
Versão | Mudanças |
---|---|
v19 R7 | Adicionado |
VP Get table range ( vpAreaName : Text ; tableName : Text {; onlyData : Integer {; sheet : Integer }} ) : Object
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
tableName | Text | -> | Nome da tabela | |
onlyData | Integer | -> | vk table full range (default) or vk table data range | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) | |
Resultados | Object | <- | Intervalo que contém a tabela |
Descrição
The VP Get table range
command returns the range of tableName.
Em vpAreaName, passe o nome da área 4D View Pro.
In the onlyData parameter, you can pass one of the following constants to indicate if you want to get the data only:
Parâmetros | Valor | Descrição |
---|---|---|
vk table full range | 0 | Obtém o intervalo de células para a área da tabela com rodapé e cabeçalho (padrão se omitido) |
vk table data range | 1 | Obter o intervalo de células apenas para a área de dados da tabela |
In sheet, pass the index of the target sheet. Se nenhum índice for especificado, o comando se aplica à folha atual.
A indexação começa em 0.
If tableName is not found, the command returns null.
Veja também
VP Get table theme
História
Versão | Mudanças |
---|---|
v19 R8 | Adicionado |
VP Get table theme ( vpAreaName : Text ; tableName : Text ) : cs.ViewPro.TableTheme
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
tableName | Text | -> | Nome da tabela | |
Resultados | cs.ViewPro.TableTheme | <- | Valores de propriedade do tema da tabela atual |
Descrição
The VP Get table theme
command returns the current theme propertie values of the tableName. A table theme can be set using the VP CREATE TABLE
or VP SET TABLE THEME
commands, or through the interface.
In vpAreaName, pass the name of the 4D View Pro area and in tableName, the name of the table.
The command returns an object of the cs.ViewPro.TableTheme class with properties and values that describe the current table theme.
Exemplo
The command returns a full theme
object even if a native SpreadJS theme name was used to define the theme.
var $param : cs. ViewPro. TableTheme
$param:=cs. ViewPro. TableTheme.new()
$param.theme:="dark10" //use of a native theme name VP SET TABLE THEME("ViewProArea"; "ContextTable"; $param)
$vTheme:=VP Get table theme("ViewProArea"; "ContextTable")
$result:=Asserted(Value type($vTheme.theme)=Is object) //true
Veja também
VP CREATE TABLE
VP SET TABLE THEME
VP Get tables
História
Versão | Mudanças |
---|---|
v19 R7 | Adicionado |
VP Get tables ( vpAreaName : Text { ; sheet : Integer } ) : Collection
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) | |
Resultados | Collection | <- | Text collection with all table names |
Descrição
The VP Get tables
command returns a collection of all table names defined in the sheet.
Em vpAreaName, passe o nome da área 4D View Pro.
In sheet, pass the index of the target sheet. Se nenhum índice for especificado, o comando se aplica à folha atual.
A indexação começa em 0.
Exemplo
O código abaixo devolverá uma coleção de todos os nomes de tabelas da folha atual:
$tables:=VP Get tables("ViewProArea")
//$tables contains for example ["contextTable","emailTable"]
Veja também
VP Get value
VP Get value ( rangeObj : Object ) : Object
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
Resultados | Object | <- | Object containing a cell value |
Descrição
The VP Get value
command retrieves a cell value from a designated cell range.
In rangeObj, pass a range whose value you want to retrieve.
Objeto devolvido
The object returned will contain the value
property, and, in case of a js date value, a time
property:
Propriedade | Tipo | Descrição |
---|---|---|
value | Integer, Real, Boolean, Text, Date | Valor de rangeObj (exceto - tempo) |
time | Real | Valor hora (em segundos) se o valor for do tipo data js |
Se o objetivo retornado incluir uma data ou hora, é tratado como uma datetime e completado como abaixo:
- valor hora - a porção da data se completa como dezembro, 30, 1899 em formato dd/MM/yyyy
- valor data - a parte da hora se completa como meia noite no formato HH:mm:ss (00:00:00)
If rangeObj contains multiple cells or multiple ranges, the value of the first cell is returned. O comando retorna um objeto null se a célula estiver vazia.
Exemplo
$cell:=VP Cell("ViewProArea";5;2)
$value:=VP Get value($cell)
If(Value type($value.value)=Is text)
VP SET VALUE($cell;New object("value";Uppercase($value.value)))
End if
Veja também
VP Get values
VP SET VALUE
VP SET VALUES
VP Get values
VP Get values ( rangeObj : Object ) : Collection
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
Resultados | Collection | <- | Collection of values |
Descrição
The VP Get values
command retrieves the values from the designated rangeObj.
In rangeObj, pass a range whose values you want to retrieve. If rangeObj includes multiple ranges, only the first range is used.
The collection returned by VP Get values
contains a two-dimensional collection:
- Cada elemento da coleção de primeiro nível representa uma linha e contém uma subcoleção de valores.
- Cada subcoleção contém valores de células para a linha. Os valores podem ser Inteiros, Reais, Booleanos, Texto, Null. Se um valor for uma data ou hora, é retornado em um objeto com as propriedades abaixo:
Propriedade | Tipo | Descrição |
---|---|---|
value | Date | Valor da célula (exceto - time) |
time | Real | Valor hora (em segundos) se o valor for do tipo data js |
Datas ou horas são tratadas como um datetime e são completadas da forma abaixo:
- valor hora - a parte da data é preenchida como 30 de dezembro de 1899
- valor data - a porção hora é completa como meia noite (00:00:00:000)
Exemplo
Pretende obter valores de C4 a G6:
$result:=VP Get values(VP Cells("ViewProArea";2;3;5;3))
// $result[0]=[4,5,null,hello,world]
// $result[1]=[6,7,8,9,null]
// $result[2]=[null,{time:42,value:2019-05-29T00:00:00.000Z},null,null,null]
Veja também
VP Get formulas
VP Get value
VP SET FORMULAS
VP SET VALUES
VP Get workbook options
VP Get workbook options ( vpAreaName : Text ) : Object
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
Resultados | Object | <- | Objeto que contém as opções do livro de trabalho |
Descrição
VP Get workbook options
returns an object containing all the workbook options in vpAreaName
Em vpAreaName, passe o nome da área 4D View Pro.
O objeto devolvido contém todas as opções de workbook (padrão e modificadas) no workbook.
The list of workbook options is referenced in VP SET WORKBOOK OPTIONS
's description.
Exemplo
var $workbookOptions : Object
$workbookOptions:=VP Get workbook options("ViewProArea")
Veja também
I
VP IMPORT DOCUMENT
História
Versão | Mudanças |
---|---|
v20 R2 | Suporte de documentos .sjs |
VP IMPORT DOCUMENT ( vpAreaName : Text ; filePath : Text { ; paramObj : Object} )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
filePath | Text | -> | Caminho do documento | |
paramObj | Object | -> | Opções de importação |
Descrição
The VP IMPORT DOCUMENT
command imports and displays the document designated by filePath in the 4D View Pro area vpAreaName. O documento importado substitui qualquer dado já inserido na área
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
In filePath, pass the path and name of the document to be imported. São suportados os seguintes formatos:
- Os documentos 4D View Pro (extensão ".4vp")
- Microsoft Excel (extensão ".xlsx")
- documentos textos (extensão ".txt", ".csv", o documento deve ser em utf-8)
- SpreadJS documents (extension ".sjs")
If the document extension is not a recognized extension, such as .4vp
or .xlsx
, the document is considered a text document. Deve passar uma rota completa, a não ser que o documento esteja localizado no mesmo nível que a pasta Project, em cujo caso pode passar apenas seu nome.
An error is returned if the filePath
parameter is invalid, or if the file is missing or malformed.
The optional paramObj parameter allows you to define properties for the imported document:
Parâmetro | Tipo | Descrição | |
---|---|---|---|
formula | 4D. Function | Um método de retorno de chamada a ser iniciado quando a importação for concluída. You must use a formula returned by the Formula command. Consulte [Passing a callback method (formula)] (#passing-a-callback-method-formula). | |
senha | text | Somente Microsoft Excel (opcional) - Senha usada para proteger o documento do MS Excel. | |
csvOptions | object | opções para importação csv | |
range | object | O intervalo de células que contém a primeira célula onde os dados serão escritos. Se o intervalo especificado não é um intervalo de células, só a primeira célula do intervalo é usada. | |
rowDelimiter | text | Delimitador de linha. Se não estiver presente, o delimitador é automaticamente determinado por 4D. | |
columnDelimiter | text | Delimitador de coluna. O padrão: "," | |
sjsOptions | object | opções para importação de sjs | |
calcOnDemand | boolean | Se as fórmulas devem ser calculadas somente quando forem exigidas; padrão=falso. | |
dynamicReferences | boolean | Se deve calcular funções com referências dinâmicas; o padrão é true. | |
fullRecalc | boolean | Para decidir se calcula depois do carregamento do dado json, falso por padrão | |
includeFormulas | boolean | Se deve incluir as fórmulas ao carregar; o padrão é true. | |
includeStyles | boolean | Se os estilos devem ser incluídos no carregamento; o padrão é true. | |
includeUnusedStyles | boolean | Se deve incluir os estilos de nome não utilizados ao converter o xml do Excel em json; o padrão é true. | |
openMode | integer |
- Importing files in .xslx, .csv, and .sjs formats is asynchronous. With these formats, you must use the
formula
attribute if you want to start an action at the end of the document processing. - Quando importar um arquivo formatado em Excel em um documento 4D View Pro, algumas configurações podem ser perdidas. You can verify your settings with this list from SpreadJS.
- For more information on the CSV format and delimiter-separated values in general, see this article on Wikipedia
Exemplo 1
Se quiser importar um documento 4D View Pro armazenado no disco quando o formulário for aberto:
C_TEXT($docPath)
If(Form event code=On VP Ready) //A zona 4D View Pro está carregada e pronta
$docPath:="C:\\Bases\\ViewProDocs\\MyExport.4VP"
VP IMPORT DOCUMENT("VPArea";$docPath)
End if
Exemplo 2
Você deseja importar um documento do Microsoft Excel protegido por senha para uma área do 4D View Pro:
//Import code
var $o : Object
$o:=New object
$o.password:="excel123"
$o.formula:=Formula(myImport)
VP IMPORT DOCUMENT("ViewProArea";"c:\\tmp\\excelfilefile.xlsx";$o)
//myImport callback method
#DECLARE($area : Text; $filePath : Text; $param : Object; $status : Object)
If ($status.success)
ALERT("Import successfully completed")
Else
ALERT("Error: "+$status.errorMessage)
End if
Exemplo 3
You want to import a .txt
file that uses a comma (",") as delimiter:
$params:=New object
$params.range:=VP Cells("ViewProArea";0;0;2;5)
VP IMPORT DOCUMENT("ViewProArea";"c:\\import\\my-file.txt";New object("csvOptions";$params))
Here's the result:
Veja também
VP EXPORT DOCUMENT
VP NEW DOCUMENT
VP IMPORT FROM BLOB
VP IMPORT FROM BLOB ( vpAreaName : Text ; vpBlob : 4D.blob { ; paramObj : Object} )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
vpBlob | 4D. Blob | -> | Blob contendo um documento 4D View Pro | |
paramObj | Object | -> | Opções de importação |
Descrição
The VP IMPORT FROM BLOB
command imports the vpBlob in the 4D View Pro area vpAreaName and replaces its contents. vpBlob must contain a 4D View Pro document previously saved as Blob either by using the VP EXPORT TO BLOB command or via the 4D View Pro interface.
In paramObj, you can pass several properties:
Propriedade | Tipo | Descrição |
---|---|---|
formula | 4D. Function | Método de retorno de chamada a ser iniciado quando a importação for concluída. Consulte [Passing a callback method (formula)] (#passing-a-callback-method-formula). |
calcOnDemand | Parâmetros | Se as fórmulas devem ser calculadas somente quando forem exigidas; padrão=falso. |
dynamicReferences | Parâmetros | Se deve calcular funções com referência dinâmica; padrão = true. |
fullRecalc | Parâmetros | Para decidir se calcula depois do carregamento do dado json, falso por padrão |
includeFormulas | Parâmetros | Se deve incluir a fórmula ao carregar, padrão=true. |
includeStyles | Parâmetros | Se deve incluir o estilo ao carregar, padrão = true. |
includeUnusedStyles | Parâmetros | Se deve incluir o estilo de nome não utilizado ao converter o xml do Excel para o json, default=true. |
openMode | Integer | pode ser: 0: modo aberto normal, sem lazy e incremental. Ao abrir o documento, a interface do usuário e o evento da interface do usuário podem ser atualizados e responsivos em momentos específicos. 1: modo aberto preguiçoso. Quando abrir o documento, só a folha ativa será carregada diretamente. Outras folhas serão carregadas somente quando estiverem sendo usadas. 2: incremental open mode. Quando abrir o documento, UI e evento UI poderiam ser recarregados e diretamente responsivos. |
Os seguintes parâmetros podem ser usados no método de retorno de chamada:
Parâmetro | Tipo | Descrição | |
---|---|---|---|
param1 | text | The name of the 4D View Pro area object | |
param2 | 4D. Blob | O blob importado | |
param3 | object | A reference to the command's paramObj parameter | |
param4 | object | Um objeto devolvido pelo método com uma mensagem de estado | |
.success | boolean | True se a importação for bem-sucedida, False caso contrário. | |
.errorCode | integer | Código de erro. | |
.errorMessage | text | Mensagem de erro. |
Exemplo
Você deseja importar para a "ViewProArea" um documento 4D View Pro salvo anteriormente como Blob na primeira entidade da classe de dados Table.
var $myBlobDocument : 4D.Blob :=ds.Table.all().first().blob
VP IMPORT FROM BLOB("ViewProArea"; $myBlobDocument)
Veja também
VP IMPORT FROM OBJECT
VP IMPORT FROM OBJECT ( vpAreaName : Text { ; viewPro : Object} )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
viewPro | Object | -> | Objecto 4D View Pro |
Descrição
The VP IMPORT FROM OBJECT
command imports and displays the viewPro 4D View Pro object in the vpAreaName 4D View Pro area. O documento importado substitui qualquer dado já inserido na área
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
In viewPro, pass a valid 4D View Pro object. This object can have been created using VP Export to object or manually. For more information on 4D View Pro objects, please refer to the 4D View Pro object section.
An error is returned if the viewPro object is invalid.
Exemplo
Se quiser importar uma folha de cálculo que foi salva previamente em um campo objeto:
QUERY([VPWorkBooks];[VPWorkBooks]ID=10)
VP IMPORT FROM OBJECT("ViewProArea1";[VPWorkBooks]SPBook)
Veja também
VP INSERT COLUMNS
VP INSERT COLUMNS ( rangeObj : Object )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo |
Descrição
The VP INSERT COLUMNS
command inserts columns into the rangeObj.
In rangeObj, pass an object containing a range of the starting column (the column which designates where the new column will be inserted) and the number of columns to insert. Se o número de colunas a inseriri for omitido (não definido), uma única coluna é inserida.
New columns are inserted on the left, directly before the starting column in the rangeObj.
Exemplo
Para inserir três colunas antes da segunda coluna:
VP INSERT COLUMNS(VP Column("ViewProArea";1;3))
O resultado é:
Veja também
VP DELETE COLUMNS
VP DELETE ROWS
VP INSERT ROWS
VP INSERT ROWS
VP INSERT ROWS ( rangeObj : Object )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo |
Descrição
The VP INSERT ROWS
command inserts rows defined by the rangeObj.
In rangeObj, pass an object containing a range of the starting row (the row which designates where the new row will be inserted) and the number of rows to insert. Se o número de linhas a inserir for omitido (não definido), uma única linha é inserida.
New rows are inserted directly before the first row in the rangeObj.
Exemplo
Para inserir 3 linhas antes da primeira linha:
VP INSERT ROWS(VP Row("ViewProArea";0;3))
O resultado é:
Veja também
VP DELETE COLUMNS
VP DELETE ROWS
VP INSERT COLUMNS
VP INSERT TABLE COLUMNS
História
Versão | Mudanças |
---|---|
v19 R7 | Adicionado |
VP INSERT TABLE COLUMNS ( vpAreaName : Text ; tableName : Text ; column : Integer {; count : Integer {; insertAfter : Integer {; sheet : Integer }}} )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
tableName | Text | -> | Nome da tabela | |
column | Integer | -> | Índice na tabela da coluna inicial a inserir | |
count | Text | -> | Number of columns to add (must be >0) | |
insertAfter | Integer | -> | vk table insert before or vk table insert after column | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) |
Descrição
The VP INSERT TABLE COLUMNS
command inserts one or count empty column(s) in the specified tableName at the specified column index.
When a column has been inserted with this command, you typically modify its contents using the VP SET TABLE COLUMN ATTRIBUTES command.
In the insertAfter parameter, you can pass one of the following constants to indicate if the column(s) must be inserted before or after the column index:
Parâmetros | Valor | Descrição |
---|---|---|
vk table insert before | 0 | Insert column(s) before the column (default if omitted) |
vk table insert after | 1 | Inserir coluna(s) após a coluna |
This command inserts some columns in the tableName table, NOT in the sheet. O número total de colunas da folha não é impactado pelo comando. Dados presentes à direita da tabela (se houver) são movidos para a direita automaticamente de acordo com o número de colunas adicionadas.
If tableName does not exist or if there is not enough space in the sheet, nothing happens.
Exemplo
See examples for VP INSERT TABLE ROWS and VP SET TABLE COLUMN ATTRIBUTES.
Veja também
VP INSERT TABLE ROWS
VP REMOVE TABLE COLUMNS
VP SET TABLE COLUMN ATTRIBUTES
VP INSERT TABLE ROWS
História
Versão | Mudanças |
---|---|
v19 R7 | Adicionado |
VP INSERT TABLE ROWS ( vpAreaName : Text ; tableName : Text ; row : Integer {; count : Integer {; insertAfter : Integer {; sheet : Integer }}} )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
tableName | Text | -> | Nome da tabela | |
row | Integer | -> | Índice na tabela da linha inicial a inserir | |
count | Text | -> | Number of rows to add (must be >0) | |
insertAfter | Integer | -> | vk table insert before or vk table insert after row | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) |
Descrição
The VP INSERT TABLE ROWS
command inserts one or count empty row(s) in the specified tableName at the specified row index.
In the insertAfter parameter, you can pass one of the following constants to indicate if the row(s) must be inserted before or after the row index:
Parâmetros | Valor | Descrição |
---|---|---|
vk table insert before | 0 | Insert row(s) before the row (default if omitted) |
vk table insert after | 1 | Inserir linha(s) após a row |
This command inserts some rows in the tableName table, NOT in the sheet. O número total de linhas da folha não é impactado pelo comando. Dados presentes abaixo da tabela (se houver) são movidos para baixo automaticamente de acordo com o número de linhas adicionadas.
If the tableName table is bound to a data context, the command inserts new, empty element(s) in the collection.
If tableName does not exist or if there is not enough space in the sheet, 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 inserir duas linhas e duas colunas na tabela, pode escrever:
VP INSERT TABLE ROWS("ViewProArea"; "PeopleTable"; 1; 2)
VP INSERT TABLE COLUMNS("ViewProArea"; "PeopleTable"; 1; 2)
Veja também
VP INSERT TABLE COLUMNS
VP REMOVE TABLE ROWS
M
VP MOVE CELLS
História
Versão | Mudanças |
---|---|
v19 R4 | Adicionado |
VP MOVE CELLS ( originRange : Object ; targetRange : Object ; options : Object )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
originRange | Object | -> | Intervalo de células a partir do qual copiar | |
targetRange | Object | -> | Intervalo de destino para os valores, formatação e fórmulas | |
options | Object | -> | Opções adicionais |
Descrição
The VP MOVE CELLS
command moves or copies the values, style and formulas from originRange to targetRange.
originRange and targetRange can refer to different View Pro areas.
In originRange, pass a range object containing the values, style, and formula cells to copy or move. If originRange is a combined range, only the first one is used.
In targetRange, pass the range of cells where the cell values, style, and formulas will be copied or moved.
The options parameter has several properties:
Propriedade | Tipo | Descrição | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
copy | Parâmetros | Determines if the values, formatting and formulas of the cells in originRange are removed after the command executes:
| ||||||||||||||
pasteOptions | Longint | Especifica o que é colado. Possible values:
|
As opções de colagem definidas nas opções são tomadas em conta.
Exemplo
Para copiar os conteúdos, valores, formatação e fórmulas de um intervalo de origem:
var $originRange; $targetRange; $options : Object
$originRange:=VP Cells("ViewProArea"; 0; 0; 2; 5)
$targetRange:=VP Cells("ViewProArea"; 4; 0; 2; 5)
$options:=New object
$options.copy:=True
$options.pasteOptions:=vk clipboard options all
VP MOVE CELLS($originRange; $targetRange; $options)
Veja também
VP Copy to object
VP PASTE FROM OBJECT
VP SET WORKBOOK OPTIONS
N
VP Name
VP Name ( vpAreaName : Text ; rangeName : Text { ; sheet : Integer } ) : Object
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
rangeName | Text | -> | Nome do intervalo existente | |
sheet | Integer | -> | Localização do intervalo (folha atual se omitida) | |
Resultados | Object | <- | Range object of name |
Descrição
The VP Name
command returns a new range object referencing a named range.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
The rangeName parameter specifies an existing named cell range.
In the optional sheet parameter, you can designate a specific spreadsheet where rangeName is defined. Se omitido, a planilha atual será utilizada por padrão. Você pode selecionar explicitamente a planilha atual ou toda a pasta de trabalho com as seguintes constantes:
vk current sheet
vk workbook
Exemplo
Pretende atribuir um valor ao intervalo nomeado "Total".
// name the B5 cell as Total VP ADD RANGE NAME(VP Cell("ViewProArea";1;4);"Total")
$name:=VP Name("ViewProArea";" Total")
VP SET NUM VALUE($name;285;"$#,###.00")
Veja também
VP ADD RANGE NAME
VP ALL
VP Cell
VP Cells
VP Column
VP Combine ranges
VP Get names
VP REMOVE NAME
VP Row
VP NEW DOCUMENT
VP NEW DOCUMENT ( vpAreaName : Text )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro |
Descrição
The VP NEW DOCUMENT
command loads and display a new, default document in the 4D View Pro form area object vpAreaName. O novo documento vazio substitui quaisquer dados já inseridos na área.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
Exemplo
Se quiser exibir um documento vazio no formulário "myVPArea":
VP NEW DOCUMENT("myVPArea")
Veja também
O
VP Object to font
VP Object to font ( fontObj : Object ) : Text
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
fontObj | Object | -> | Objecto letra | |
Resultados | Text | <- | Fonte abreviada |
Descrição
The VP Object to font
command returns a font shorthand string from fontObj.
In fontObj, pass an object containing the font properties. As propriedades abaixo são compatíveis:
Propriedade | Tipo | Descrição | Valores possíveis | Obrigatório |
---|---|---|---|---|
family | text | Especifica o tipo de letra. | qualquer família de tipos de letra padrão ou genérica. Ex. Ex. Ex. "Arial", "Helvetica", "serif", "arial,sans-serif" | Sim |
size | text | Defines the size of the font. The line-height can be added to the font-size: font-size/line-height: Ex: "15pt/20pt" | a number with one of the following units: vk font size large vk font size larger vk font size x large vk font size xx large vk font size small vk font size smaller vk font size x small vk font size xx small | Sim |
style | text | O estilo do tipo de letra. | vk font style italic vk font style oblique | Não |
variant | text | Especifica o tipo de letra em pequenas maiúsculas. | vk font variant small caps | Não |
weight | text | Define a espessura do tipo de letra. | vk font weight 100 vk font weight 200 vk font weight 300 vk font weight 400 vk font weight 500 vk font weight 600 vk font weight 700 vk font weight 800 vk font weight 900 vk font weight bold vk font weight bolder vk font weight lighter | Não |
This object can be created with the VP Font to object command.
The returned shorthand string can be assigned to the "font" property of a cell with the VP SET CELL STYLE, for example.
Exemplo
$cellStyle:=VP Get cell style($range)
$font:=VP Font to object($cellStyle.font)
$font.style:=vk font style oblique
$font.variant:=vk font variant small caps
$font.weight:=vk font weight bolder
$cellStyle.font:=VP Object to font($font)
//$cellStyle.font contains "bolder oblique small-caps 16pt arial"
Veja também
4D View Pro Style Objects and Style Sheets
VP Font to object
VP SET CELL STYLE
VP SET DEFAULT STYLE
P
VP PASTE FROM OBJECT
História
Versão | Mudanças |
---|---|
v19 R4 | Adicionado |
VP PASTE FROM OBJECT ( rangeObj : Object ; dataObject : Object {; options : Longint} )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo de células | |
dataObject | Object | -> | Objeto que contém os dados a colar | |
options | Longint | -> | Especifica o que é colado |
Descrição
The VP PASTE FROM OBJECT
command pastes the contents, style and formulas stored in dataObject to the rangeObj object.
In rangeObj, pass the cell range object where the values, formatting, and/or formula cells will be pasted. If rangeObj refers to more than one cell, only the first one is used.
In dataObject, pass the object that contains the cell data, formatting, and formulas to be pasted.
In the optional options parameter, you can specify what to paste in the cell range. Valores possíveis:
|Constant|Description|
|---|---|---|
|vk clipboard options all
|Pastes all data objects, including values, formatting, and formulas.|
|vk clipboard options formatting
|Pastes only the formatting.|
|vk clipboard options formulas
|Pastes only the formulas.|
|vk clipboard options formulas and formatting
|Pastes formulas and formatting.|
|vk clipboard options values
|Pastes only values.|
|vk clipboard options value and formatting
|Pastes values and formatting.|
As opções de colagem definidas nas opções são tomadas em conta.
If options refers to a paste option not present in the copied object (e.g. formulas), the command does nothing.
Exemplo
See example the example from VP Copy to object
Veja também
VP Copy to object
VP MOVE CELLS
VP Get workbook options
VP SET WORKBOOK OPTIONS
VP PRINT
VP PRINT ( vpAreaName : Text { ; sheet : Integer } )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) |
Descrição
The VP PRINT
command opens a print dialog window to print vpAreaName.
Pass the 4D View Pro area to be printed in vpAreaName. O comando abrirá a janela de diálogo de impressão do sistema onde a impressora pode ser especificada e as propriedades da página podem ser definidas.
As propriedades definidas na janela de diálogo de impressão são para o papel de impressora, elas não são as propriedades de impressão para a área 4D View Pro. Printing properties for 4D View Pro areas are defined using the VP SET PRINT INFO command. É altamente recomendável que as propriedades tanto para impressora quanto para correspondência 4D View Pro, caso contrário, o documento impresso pode não corresponder às suas expectativas.
In the optional sheet parameter, you can designate a specific spreadsheet to print (counting begins at 0). Se omitido, a folha atual será usada como padrão. Você pode selecionar explicitamente a planilha atual ou toda a planilha com as seguintes constantes:
vk current sheet
vk workbook
- 4D View Pro areas can only be printed with the
VP PRINT
command.- Commands from the 4D Printing language theme are not supported by
VP PRINT
.- Esse comando é destinado a impressão individual pelo usuário final. For automated print jobs, it is advised to export the 4D View Pro area as a PDF with the VP EXPORT DOCUMENT method.
Exemplo
O seguinte código:
VP PRINT("myVPArea")
... will open a print dialog window:
Veja também
VP EXPORT DOCUMENT
VP SET PRINT INFO
R
VP RECOMPUTE FORMULAS
VP RECOMPUTE FORMULAS ( vpAreaName : Text )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro |
Descrição
The VP RECOMPUTE FORMULAS
command immediately evaluates all formulas in vpAreaName. Por padrão, o 4D calcula automaticamente fórmulas quando elas são inseridas, importadas ou exportadas. VP RECOMPUTE FORMULAS
allows you to force the compute at any time (e.g, in case modifications are made to the formulas or if the formulas contain calls to the database). The command launches the execution of the VP FLUSH COMMANDS command to execute any stored commands and clear the command buffer, then calculates all formulas in the workbook.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
Be sure the VP SUSPEND COMPUTING command has not been executed before using
VP RECOMPUTE FORMULAS
, otherwise the command does nothing.
Exemplo
Para atualizar todas as fórmulas no livro de trabalho:
VP RECOMPUTE FORMULAS("ViewProArea")
Veja também
VP RESUME COMPUTING
VP SUSPEND COMPUTING
VP REMOVE NAME
VP REMOVE NAME ( vpAreaName : Text ; name : Text { ; sheet : Integer } )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
name | Text | -> | Nome do intervalo nomeado ou da fórmula nomeada a remover | |
scope | Integer | -> | Âmbito alvo (padrão=folha atual) |
Descrição
The VP REMOVE NAME
command removes the named range or named formula passed in the name parameter in the defined scope.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
Pass the named range or named formula that you want to remove in name.
You can define where to remove the name in scope using either the sheet index (counting begins at 0) or the following constants:
vk current sheet
vk workbook
Exemplo
$range:=VP Cell("ViewProArea";0;0)
VP ADD RANGE NAME("Total1";$range)
VP REMOVE NAME("ViewProArea";"Total1")
$formula:=VP Get formula by name("ViewProArea";"Total1")
//$formula=null
Veja também
VP REMOVE SHEET
VP REMOVE SHEET ( vpAreaName : Text ; index: Integer )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
index | Integer | -> | Índice da folha a remover |
Veja também
Descrição
The VP REMOVE SHEET
command removes the sheet with the specified index from the document loaded in vpAreaName.
Em vpAreaName, passe o nome da área 4D View Pro.
In index, pass the index of the sheet to remove. If the passed index does not exist, the command does nothing.
A indexação começa em 0.
Exemplo
O documento tem atualmente três folhas:
Retirar a terceira folha:
VP REMOVE SHEET("ViewProArea";2)
VP REMOVE SPAN
VP REMOVE SPAN ( rangeObj : Object )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo |
Descrição
The VP REMOVE SPAN
command removes the span from the cells in rangeObj.
In rangeObj, pass a range object of the cell span. As células geradas no alcance são divididas em células individuais.
Exemplo
Para remover todos os intervalos de células deste documento:
//find all cell spans
$span:=VP Get spans(VP All("ViewProArea"))
//remove the cell spans
VP REMOVE SPAN($span)
Resultados:
Veja também
VP REMOVE STYLESHEET
VP REMOVE STYLESHEET ( vpAreaName : Text ; styleName : Text { ; sheet : Integer } )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
styleName | Text | -> | Nome do estilo a remover | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) |
Descrição
The VP REMOVE STYLESHEET
command removes the style sheet passed in the styleName from the vpAreaName.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
Pass the style sheet to remove in the styleName parameter.
You can define where to remove the style in the optional sheet parameter using the sheet index (counting begins at 0) or with the following constants:
vk current sheet
vk workbook
Exemplo
To remove the GreenDashDotStyle style object from the current sheet:
VP REMOVE STYLESHEET("ViewProArea";"GreenDashDotStyle")
Veja também
VP ADD STYLESHEET
VP Get stylesheet
VP Get stylesheets
VP REMOVE TABLE
História
Versão | Mudanças |
---|---|
v19 R6 | Adicionado |
VP REMOVE TABLE ( vpAreaName : Object; tableName : Text {; options : Integer} {; sheet : Integer}} )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome da área View Pro | |
tableName | Text | -> | Nome da tabela a remover | |
options | Integer | -> | Opções adicionais | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) |
Descrição
The VP REMOVE TABLE
command removes a table that you created with VP CREATE TABLE.
In vpAreaName, pass the name of the area where the table to remove is located.
In tableName, pass the name of the table to remove.
In options, you can specify additional behavior. Valores possíveis:
Parâmetros | Valor | Descrição |
---|---|---|
vk table remove all | 0 | Remover tudo, incluindo o estilo e os dados |
vk table remove style | 1 | Remover o estilo, mas manter os dados |
vk table remove data | 2 | Remover dados, mas manter o estilo |
Os nomes das tabelas são definidos ao nível da folha. You can specify where the table is located using the optional sheet parameter (indexing starts at 0).
Exemplo
Para remover a tabela "pessoas" na segunda folha e manter os dados nas células:
VP REMOVE TABLE("ViewProArea"; "people"; vk table remove style; 2)
Veja também
VP REMOVE TABLE COLUMNS
História
Versão | Mudanças |
---|---|
v19 R7 | Adicionado |
VP REMOVE TABLE COLUMNS ( vpAreaName : Text ; tableName : Text ; column : Integer {; count : Integer {; sheet : Integer }}} )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
tableName | Text | -> | Nome da tabela | |
column | Integer | -> | Índice na tabela da coluna inicial a remover | |
count | Text | -> | Número de colunas a remover (tem de ser >0) | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) |
Descrição
The VP REMOVE TABLE COLUMNS
command removes one or count column(s) in the specified tableName at the specified column index. O comando remove valores e estilos.
The command removes columns from the tableName table, NOT from the sheet. O número total de colunas da folha não é impactado pelo comando. The total number of columns of the sheet is not impacted by the command.
If tableName does not exist, nothing happens.
Exemplo
Para remover duas colunas da 3.ª coluna da tabela "dataTable":
VP REMOVE TABLE COLUMNS("ViewProArea"; "dataTable"; 3; 2)
Veja também
VP INSERT TABLE COLUMNS
VP REMOVE TABLE ROWS
VP REMOVE TABLE ROWS
História
Versão | Mudanças |
---|---|
v19 R7 | Adicionado |
VP REMOVE TABLE ROWS ( vpAreaName : Text ; tableName : Text ; row : Integer {; count : Integer {; sheet : Integer }}} )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
tableName | Text | -> | Nome da tabela | |
row | Integer | -> | Índice na tabela da linha inicial a remover | |
count | Text | -> | Number of rows to remove (must be >0) | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) |
Descrição
The VP REMOVE TABLE ROWS
command removes one or count row(s) from the specified tableName at the specified row index. O comando remove valores e estilos.
This command removes rows from the tableName table, NOT from the sheet. O número total de linhas da folha não é impactado pelo comando. Dados presentes abaixo da tabela (se houver) são movidos automaticamente de acordo com o número de linhas removidas.
If the tableName table is bound to a data context, the command removes element(s) from the collection.
If tableName does not exist, nothing happens.
Exemplo
Para remover duas linhas da 3.ª linha da tabela "dataTable":
VP REMOVE TABLE ROWS("ViewProArea"; "dataTable"; 3; 2)
Veja também
VP INSERT TABLE ROWS
VP REMOVE TABLE COLUMNS
VP RESET SELECTION
VP RESET SELECTION ( vpAreaName : Text { ; sheet : Integer } )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) |
Descrição
The VP RESET SELECTION
command deselects all cells, resulting in no current selection or visible active cell.
Uma célula ativa padrão (célula A1) permanece definida para comandos 4D View Pro.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
No parâmetro opcional sheet, pode designar uma folha específica onde o intervalo será definido (a contagem começa em 0). Se omitido, a planilha atual será utilizada por padrão. Você pode selecionar explicitamente a planilha atual com a seguinte constante:
vk current sheet
Exemplo
Se quiser desmarcar todas as células (a célula ativa e as células selecionadas):
VP RESET SELECTION("myVPArea")
Veja também
VP ADD SELECTION
VP Get active cell
VP Get selection
VP SET ACTIVE CELL
VP SET SELECTION
VP SHOW CELL
VP RESIZE TABLE
História
Versão | Mudanças |
---|---|
v19 R7 | Adicionado |
VP RESIZE TABLE ( rangeObj : Object; tableName : Text )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Nova gama para a tabela | |
tableName | Text | -> | 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
VP RESUME COMPUTING
VP RESUME COMPUTING ( vpAreaName : Text )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro |
Descrição
The VP RESUME COMPUTING
command restarts the calculation of formulas in vpAreaName.
O comando reativa o serviço de cálculo de 4D View Pro. Any formulas impacted by changes made while calculations were suspended are updated, and formulas added after VP RESUME COMPUTING
is executed are calculated.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
O serviço de cálculo de 4D View Pro mantém um contador de ações de sugastar/retomar. Therefore, each execution of
VP RESUME COMPUTING
must be balanced by a corresponding execution of the VP SUSPEND COMPUTING command.
Exemplo
See example in VP SUSPEND COMPUTING.
Veja também
VP RECOMPUTE FORMULAS
VP SUSPEND COMPUTING
VP Row
VP Row ( vpAreaName : Text; row : Integer { ; rowCount : Integer { ; sheet : Integer } } ) : Object
Parâmetro | Tipo | Descrição | |
---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro |
row | Integer | -> | Índice de linha |
rowCount | Integer | -> | Número de linhas |
|sheet |Integer|->|Sheet index (current sheet if omitted)| |Result |Object|<-|Range object of row(s)|
Descrição
The VP Row
command returns a new range object referencing a specific row or rows.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
The row parameter defines the first row of the row range. Passar o índice da linha (a contagem começa em 0) neste parâmetro. If the range contains multiple rows, you should also use the optional rowCount parameter.
The optional rowCount parameter allows you to define the total number of rows of the range. *rowCount tem de ser superior a 0. Se for omisso, o valor será definido como 1 por padrão.
No parâmetro opcional sheet, pode designar uma folha específica onde o intervalo será definido (a contagem começa em 0). Se não for especificada, a folha de cálculo atual é utilizada por padrão. Você pode selecionar explicitamente a planilha atual com a seguinte constante:
vk current sheet
Exemplo
Se quiser definir um objeto de intervalo para a linha exibida abaixo (na planilha atual):
Você pode escrever:
$row:=VP Row("ViewProArea";9) // linha 10
Veja também
VP All
VP Cell
VP Cells
VP Column
VP Combine ranges
VP Name
VP ROW AUTOFIT
VP ROW AUTOFIT ( rangeObj : Object)
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo |
Descrição
The VP ROW AUTOFIT
command automatically sizes the row(s) in rangeObj according to their contents.
In rangeObj, pass a range object containing a range of the rows whose size will be automatically handled.
Exemplo
As linhas seguintes não apresentam corretamente o texto:
VP ROW AUTOFIT(VP Row("ViewProArea";1;2))
Resultados:
Veja também
VP Run offscreen area
VP Run offscreen area ( parameters : Object) : Mixed
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
parameters | Object | -> | Objeto que contém os atributos da área fora do ecrã | |
Resultados | Mixed | <- | .result property of the .onEvent object, or Null if does not return a value |
Descrição
The VP Run offscreen area
command creates an offscreen area in memory which can be used to process 4D View Pro area commands and functions.
In parameters object, pass any of the following optional properties. These properties will be available through the This
command within the onEvent
method and reference the instance:
Propriedade | Tipo | Descrição |
---|---|---|
area | text | O nome da área offscreen. Se omitido ou nulo, um nome genérico é atribuído (por exemplo, "OffscreenArea1"). |
onEvent | object (fórmula) | Um método de callback que será iniciado quando a área fora da tela estiver pronta. It can be either:onEvent function of a class, orFormula objectOn VP Ready , On Load , On Unload , On End URL Loading , On URL Loading Error , On VP Range Changed , or On Timer events. The callback method can be used to access the 4D View Pro form object variable. |
autoQuit | boolean | True (default value) if the command must stop the formula execution when the On End URL Loading or On URL Loading Error events occur. If false, you must use the CANCEL or ACCEPT commands in the onEvent callback method. |
timeout | number | Tempo máximo (expresso em segundos) antes que a área seja encerrada automaticamente, se nenhum evento for gerado. Se for definido para 0, não é aplicada qualquer limitação. Valor por padrão: 60 |
result | misto | Resultado do processamento (se for caso disso) |
<customProperty> | misto | Any custom attribute to be available in the onEvent callback method. |
A seguinte propriedade é automaticamente adicionada pelo comando, se necessário:
Propriedade | Tipo | Descrição |
---|---|---|
timeoutReached | boolean | Adicionado com valor true se o tempo limite tiver sido excedido |
The offscreen area is only available during the execution of the
VP Run offscreen area
command. Ele será destruído automaticamente após o término da execução.
Os seguintes comandos podem ser utilizados no método de retorno de chamada:
ACCEPT
CANCEL
SET TIMER
WA Evaluate JavaScript
WA EXECUTE JAVASCRIPT FUNCTION
Exemplo 1
Se quiser criar uma zona fora da área da tela do 4D View Pro e ler o valor de uma célula:
// cs.OffscreenArea class declaration
Class constructor ($path : Text)
This.filePath:=$path
// This function will be called on each event of the offscreen area
Function onEvent()
Case of
:(FORM Event.code=On VP Ready)
VP IMPORT DOCUMENT(This.area;This.filePath)
This.result:=VP Get value(VP Cell(This.area;6;22))
ALERT("The G23 cell contains the value: "+String(This.result))
End case
The OffscreenArea callback method:
$o:=cs. OffscreenArea.new()
$result:=VP Run offscreen area($o)
Exemplo 2
Se quiser carregar um grande documento offscreen, aguardar todos os cálculos para concluir a avaliação e exportá-lo como um PDF:
//cs.OffscreenArea class declaration
Class constructor($pdfPath : Text)
This.pdfPath:=$pdfPath
This.autoQuit:=False
This.isWaiting:=False
Function onEvent()
Case of
:(FORM Event.code=On VP Ready)
// Document import
VP IMPORT DOCUMENT(This.area;$largeDocument4VP)
This.isWaiting:=True
// Start a timer to verify if all calculations are finished.
// If during this period the "On VP Range Changed" is thrown, the timer will be restarted
// The time must be defined according to the computer configuration.
SET TIMER(60)
:(FORM Event.code=On VP Range Changed)
// End of calculation detected. Restarts the timer
If(This.isWaiting)
SET TIMER(60)
End if
:(FORM Event.code=On Timer)
// To be sure to not restart the timer if you call others 4D View command after this point
This.isWaiting:=False
// Stop the timer
SET TIMER(0)
// Start the PDF export
VP EXPORT DOCUMENT(This.area;This.pdfPath;New object("formula";Formula(ACCEPT)))
:(FORM Event.code=On URL Loading Error)
CANCEL
End case
The OffscreenArea callback method:
$o:=cs.OffscreenArea.new()
$result:=VP Run offscreen area($o)
Veja também
Blog post: End of document loading
S
VP SET ACTIVE CELL
VP SET ACTIVE CELL ( rangeObj : Object)
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo |
Descrição
The VP SET ACTIVE CELL
command defines a specified cell as active.
In rangeObj, pass a range containing a single cell as an object (see VP Cell). If rangeObj is not a cell range or contains multiple ranges, the first cell of the first range is used.
Exemplo
Para definir a célula na coluna D, linha 5 como a célula ativa:
$activeCell:=VP Cell("myVPArea";3;4)
VP SET ACTIVE CELL($activeCell)
Veja também
VP ADD SELECTION
VP Get active cell
VP Get selection
VP RESET SELECTION
VP SET SELECTION
VP SHOW CELL
VP SET ALLOWED METHODS
VP SET ALLOWED METHODS ( methodObj : Object)
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
methodObj | Object | -> | Métodos permitidos nas áreas 4D View Pro |
Compatibidade
For greater flexiblity, it is recommended to use the
VP SET CUSTOM FUNCTIONS
command which allows you to designate 4D formulas that can be called from 4D View Pro areas. As soon asVP SET CUSTOM FUNCTIONS
is called,VP SET ALLOWED METHODS
calls are ignored. 4D View Pro also supports 4D's genericSET ALLOWED METHODS
command if neitherVP SET CUSTOM FUNCTIONS
norVP SET ALLOWED METHODS
are called, however using the generic command is not recommended.
Descrição
The VP SET ALLOWED METHODS
command designates the project methods that can be called in 4D View Pro formulas. Esse comando se aplica a todas as áreas do 4D View Pro inicializadas após sua chamada durante a sessão. Ele pode ser chamado várias vezes na mesma sessão para inicializar diferentes configurações.
By default for security reasons, if you do not execute the VP SET ALLOWED METHODS
command, no method call is allowed in 4D View Pro areas -- except if 4D's generic SET ALLOWED METHODS
command was used (see compatibility note). A utilização de um método não autorizado numa fórmula imprime um error #NOME? erro na área 4D View Pro.
In the methodObj parameter, pass an object in which each property is the name of a function to define in the 4D View Pro areas:
Propriedade | Tipo | Descrição | ||
---|---|---|---|---|
<functionName> | Object | Definição da função personalizada. The <functionName> property name defines the name of the custom function to display in 4D View Pro formulas (no spaces allowed) | ||
method | Text | (obrigatório) Nome do método projeto 4D existente para permitir | ||
parameters | Uma coleção de objetos | Coleção de parâmetros (na ordem em que são definidos no método). | ||
[ ].name | Text | Name of a parameter to display for the <functionName> .Note: Parameter names must not contain space characters. | ||
[ ].type | Number | Tipo do parâmetro. Supported types:Is Boolean Is date Is Integer Is object Is real Is text Is time Is object , the object has the same structure as the object returned by VP Get value . | ||
resumo | Text | Descrição da função a ser exibida no 4D View Pro | ||
minParams | Number | Número mínimo de parâmetros | ||
maxParams | Number | Número máximo de parâmetros. Passar um número maior que o comprimento dos parâmetros permite declarar parâmetros "opcionais" com o tipo padrão |
Exemplo
Pretende permitir dois métodos nas suas áreas 4D View Pro:
C_OBJECT($allowed)
$allowed:=New object //parameter for the command
$allowed.Hello:=New object //create a first simple function named "Hello"
$allowed.Hello.method:="My_Hello_Method" //sets the 4D method
$allowed.Hello.summary:="Hello prints hello world"
$allowed.Byebye:=New object //create a second function with parameters named "Byebye"
$allowed.Byebye.method:="My_ByeBye_Method"
$allowed.Byebye.parameters:=New collection
$allowed.Byebye.parameters.push(New object("name";"Message";"type";Is text))
$allowed.Byebye.parameters.push(New object("name";"Date";"type";Is date))
$allowed.Byebye.parameters.push(New object("name";"Time";"type";Is time))
$allowed.Byebye.summary:="Byebye prints a custom timestamp"
$allowed.Byebye.minParams:=3
$allowed.Byebye.maxParams:=3
VP SET ALLOWED METHODS($allowed)
Depois que esse código é executado, as funções definidas podem ser usadas nas fórmulas do 4D View Pro:
Nas fórmulas do 4D View Pro, os nomes das funções são automaticamente exibidos em letras maiúsculas.
Veja também
4D functions
VP SET CUSTOM FUNCTIONS
VP SET BINDING PATH
História
Versão | Mudanças |
---|---|
v19 R5 | Adicionado |
VP SET BINDING PATH ( rangeObj : Object ; dataContextAttribute : Text)
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
dataContextAttribute | Text | -> | Name of the attribute to bind to rangeObj |
Descrição
The VP SET BINDING PATH
command binds an attribute from a sheet's data context to rangeObj. After you set a data context using the SET DATA CONTEXT method. When loaded, if the data context contains the attribute, the value of dataContextAttribute is automatically displayed in the cells in rangeObj.
In rangeObj, pass an object that is either a cell range or a combined range of cells.
- If rangeObj is a range with several cells, the command binds the attribute to the first cell of the range.
- If rangeObj contains several ranges of cells, the command binds the attribute to the first cell of each range.
In dataContextAttribute, pass the name of the attribute to bind to rangeObj. If dataContextAttribute is an empty string, the function removes the current binding.
Os atributos do tipo coleção não são suportados. Quando você passar o nome de uma coleção, o comando não faz nada.
Exemplo
Set a data context and bind the firstName
and lastName
attribute to cells:
var $p : Object
$p:=New object
$p.firstName:="Freehafer"
$p.lastName:="Nancy" VP SET DATA CONTEXT("ViewProArea"; $p) VP SET BINDING PATH(VP Cell("ViewProArea"; 0; 0); "firstName")
VP SET BINDING PATH(VP Cell("ViewProArea"; 1; 0); "lastName")
Veja também
VP Get binding path
VP Get data context
VP SET DATA CONTEXT
VP SET BOOLEAN VALUE
VP SET BOOLEAN VALUE ( rangeObj : Object ; boolValue : Boolean)
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
boolValue | Parâmetros | -> | Boolean value to set |
Descrição
The VP SET BOOLEAN VALUE
command assigns a specified boolean value to a designated cell range.
In rangeObj, pass a range of the cell(s) (created for example with VP Cell
or VP Column
) whose value you want to specify. If rangeObj includes multiple cells, the value specified will be repeated in each cell.
The boolValue parameter allows you to pass the boolean value (True or False) that will be assigned to the rangeObj.
Exemplo
//Set the cell value as False VP SET BOOLEAN VALUE(VP Cell("ViewProArea";3;2);False)
Veja também
VP SET BORDER
VP SET BORDER ( rangeObj : Object ; borderStyleObj : Object ; borderPosObj : Object )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
borderStyleObj | Object | -> | Objeto que contém o estilo da borda | |
borderPosObj | Object | -> | Object containing border placement |
Descrição
The VP SET BORDER
command applies the border style(s) defined in borderStyleObj and borderPosObj to the range defined in the rangeObj.
In rangeObj, pass a range of cells where the border style will be applied. If the rangeObj contains multiple cells, borders applied with VP SET BORDER
will be applied to the rangeObj as a whole (as opposed to the VP SET CELL STYLE
command which applies borders to each cell of the rangeObj). If a style sheet has already been applied, VP SET BORDER
will override the previously applied border settings for the rangeObj.
The borderStyleObj parameter allows you to define the style for the lines of the border. The borderStyleObj supports the following properties:
Propriedade | Tipo | Descrição | Valores possíveis |
---|---|---|---|
color | text | Define a cor da margem. Predefinição = black. | Sintaxe da cor CSS "#rrggbb" (sintaxe preferencial), sintaxe da cor CSS "rgb(r,g,b)" (sintaxe alternativa), nome da cor CSS (sintaxe alternativa) |
style | Integer | Define o estilo da borda. Predefinição = vazio. | vk line style dash dot vk line style dash dot dot vk line style dashed vk line style dotted vk line style double vk line style empty vk line style hair vk line style medium vk line style medium dash dot vk line style medium dash dot dot vk line style medium dashed vk line style slanted dash dot vk line style thick vk line style thin |
You can define the position of the borderStyleObj (i.e., where the line is applied) with the borderPosObj:
Propriedade | Tipo | Descrição |
---|---|---|
all | boolean | Estilo de linha de fronteira aplicado a todas as fronteiras. |
left | boolean | Estilo de linha de fronteira aplicado à fronteira esquerda. |
top | boolean | Estilo de linha da borda aplicado à borda superior. |
direita | boolean | Estilo de linha de fronteira aplicado à fronteira direita. |
bottom | boolean | Estilo da linha de fronteira aplicado à fronteira inferior. |
outline | boolean | Estilo da linha de fronteira aplicado apenas às fronteiras exteriores. |
inside | boolean | Estilo da linha de fronteira aplicado apenas às fronteiras interiores. |
innerHorizontal | boolean | Estilo de linha da borda aplicado apenas às bordas horizontais interiores. |
innerVertical | boolean | Estilo da borda aplicado apenas a bordas verticais interiores. |
Exemplo 1
Este código produz uma borda à volta de todo o intervalo:
$border:=New object("color";"red";"style";vk line style thick)
$option:=New object("outline";True)
VP SET BORDER(VP Cells("ViewProArea";1;1;3;3);$border;$option)
Exemplo 2
This code demonstrates the difference between VP SET BORDER
and setting borders with the VP SET CELL STYLE
command:
// Set borders using VP SET BORDER
$border:=New object("color";"red";"style";vk line style thick)
$option:=New object("outline";True)
VP SET BORDER(VP Cells("ViewProArea";1;1;3;3);$border;$option)
// // Set borders using VP SET CELL STYLE
$cellStyle:=New object
$cellStyle.borderBottom:=New object("color";"blue";"style";vk line style thick)
$cellStyle.borderRight:=New object("color";"blue";"style";vk line style thick)
VP SET CELL STYLE(VP Cells("ViewProArea";4;4;3;3);$cellStyle)
Veja também
VP SET CELL STYLE
VP SET CELL STYLE ( rangeObj : Object ; styleObj : Object)
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
styleObj | Object | -> | Objecto estilo |
Descrição
The VP SET CELL STYLE
command applies the style(s) defined in the styleObj to the cells defined in the rangeObj.
In rangeObj, pass a range of cells where the style will be applied. If the rangeObj contains multiple cells, the style is applied to each cell.
Borders applied with
VP SET CELL STYLE
will be applied to each cell of the rangeObj, as opposed to the VP SET BORDER command which applies borders to the rangeObj as a whole.
The styleObj parameter lets you pass an object containing style settings. Pode utilizar uma folha de estilos existente ou criar um novo estilo. If the styleObj contains both an existing style sheet and additional style settings, the existing style sheet is applied first, followed by the additional settings.
Para remover um estilo e reverter para as configurações de estilo padrão (se houver), passe um valor NULL:
- giving the styleObj parameter a NULL value will remove any style settings from the rangeObj,
- giving an attribute a NULL value will remove this specific attribute from the rangeObj.
For more information about style objects and style sheets, see the Style Objects paragraph.
Exemplo
$style:=New object
$style.font:="8pt Arial"
$style.backColor:="Azure"
$style.foreColor:="red"
$style.hAlign:=1
$style.isVerticalText:=True
$style.borderBottom:=New object("color";"#800080";"style";vk line style thick)
$style.backgroundImage:=Null //remove a specific attribute
VP SET CELL STYLE(VP Cell("ViewProArea";1;1);$style)
Veja também
VP ADD STYLESHEET
VP Font to object
VP Get cell style
VP Object to font
VP SET BORDER
VP SET DEFAULT STYLE
VP SET COLUMN ATTRIBUTES
VP SET COLUMN ATTRIBUTES ( rangeObj : Object ; propertyObj : Object)
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
propertyObj | Object | -> | Object containing column properties |
Descrição
The VP SET COLUMN ATTRIBUTES
command applies the attributes defined in the propertyObj to the columns in the rangeObj.
In rangeObj, pass an object containing a range. If the range contains both columns and rows, attributes are applied only to the columns.
The propertyObj parameter lets you specify the attributes to apply to the columns in the rangeObj. Estes atributos são:
Propriedade | Tipo | Descrição |
---|---|---|
width | number | Largura da coluna expressa em píxeis |
pageBreak | boolean | True para inserir uma quebra de página antes da primeira coluna do intervalo, senão false |
visible | boolean | True se a coluna for visível, senão false |
resizable | boolean | True se a coluna puder ser redimensionada, senão false |
header | text | Texto do cabeçalho da coluna |
Exemplo
Para alterar o tamanho da segunda coluna e definir o cabeçalho, escreve-se:
C_OBJECT($column;$properties)
$column:=VP Column("ViewProArea";1) //column B
$properties:=New object("width";100;"header";"Hello World")
VP SET COLUMN ATTRIBUTES($column;$properties)
Veja também
VP Column
VP Get column attributes
VP Get row attributes
VP SET ROW ATTRIBUTES
VP SET COLUMN COUNT
VP SET COLUMN COUNT ( vpAreaName : Text , columnCount : Integer { , sheet : Integer } )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
columnCount | Integer | -> | Número de colunas | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) |
Descrição
The VP SET COLUMN COUNT
command defines the total number of columns in vpAreaName.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
Pass the total number of columns in the columnCount parameter. columnCount deve ser maior que 0.
In the optional sheet parameter, you can designate a specific spreadsheet where the columnCount will be applied (counting begins at 0). Se omitido, a planilha atual será utilizada por padrão. Você pode selecionar explicitamente a planilha atual com a seguinte constante:
vk current sheet
Exemplo
O código seguinte define cinco colunas na área 4D View Pro:
VP SET COLUMN COUNT("ViewProArea";5)
Veja também
VP Get column count
VP Get row count
VP SET ROW COUNT
VP SET CURRENT SHEET
VP SET CURRENT SHEET ( vpAreaName : Text ; sheet : Integer)
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
sheet | Integer | <- | Index of the new current sheet |
Descrição
The VP SET CURRENT SHEET
command sets the current sheet in vpAreaName . A folha atual é a folha selecionada no documento.
Em vpAreaName, passe o nome da área 4D View Pro.
In sheet, pass the index of the sheet to be set as current sheet. If the index passed is inferior to 0 or exceeds the number of sheets, the command does nothing.
A indexação começa em 0.
Exemplo
A folha atual do documento é a primeira folha:
Definir a folha atual como a terceira folha:
VP SET CURRENT SHEET("ViewProArea";2)
Veja também
VP SET CUSTOM FUNCTIONS
VP SET CUSTOM FUNCTIONS ( vpAreaName : Text ; formulaObj : Object )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
formulaObj | Object | -> | Objecto fórmula |
Descrição
The VP SET CUSTOM FUNCTIONS
command designates the 4D formulas that can be called directly from 4D View Pro formulas. Because custom functions are not stored in the document,VP SET CUSTOM FUNCTIONS
must be executed in the On Load
form event.
The formulas specified by VP SET CUSTOM FUNCTIONS
appear in a pop-up menu when the first letter of their name is entered. See the Formulas and Functions page.
If
VP SET CUSTOM FUNCTIONS
is called multiple times for the same area, in the same session, only the last call is taken into account.
Pass the name of the 4D View Pro area in vpAreaName. Se passar um nome que não existe, é devolvido um erro.
In the formulaObj parameter, pass an object containing the 4D formulas that can be called from 4D View Pro formulas as well as additional properties. Each customFunction
property passed in formulaObj becomes the name of a function in the 4D View Pro area.
Propriedade | Tipo | Descrição | ||
---|---|---|---|---|
<customFunction> | Object | Definição da função personalizada. <customFunction> defines the name of the custom function to display in 4D View Pro formulas (no spaces allowed) | ||
formula | Object | Objeto fórmula 4D (obrigatório). Ver o comando Formula . | ||
parameters | Uma coleção de objetos | Coleção de parâmetros (pela ordem em que são definidos na fórmula) | ||
[ ].name | Text | Nome do parâmetro a mostrar no 4D View Pro | ||
[ ].type | Number | Tipo do parâmetro. Supported types:Is Boolean Is date Is Integer Is object Is real Is text Is time Is object , the object has the same structure as the object returned by VP Get value. | ||
resumo | Text | Descrição da fórmula a mostrar no 4D View Pro | ||
minParams | Number | Número mínimo de parâmetros | ||
maxParams | Number | Número máximo de parâmetros. Passing a number higher than the length of parameters allows declaring "optional" parameters with default type |
AVISO
- As soon as
VP SET CUSTOM FUNCTIONS
is called, the methods allowed by the VP SET ALLOWED METHODS command (if any) are ignored in the 4D View Pro area.- As soon as
VP SET CUSTOM FUNCTIONS
is called, the functions based uponSET TABLE TITLES
andSET FIELD TITLES
commands are ignored in the 4D View Pro area.
Exemplo
You want to use formula objects in a 4D View Pro area to add numbers, retrieve a customer's last name and gender:
Case of
:(FORM Event.code=On Load)
var $o : Object
$o:=New object
// Define "addnum" function from a method named "addnum"
$o.addnum:=New object
$o.addnum.formula:=Formula(addnum)
$o.addnum.parameters:=New collection
$o.addnum.parameters.push(New object("name";"num1";"type";Is Integer))
$o.addnum.parameters.push(New object("name";"num2";"type";Is Integer))
// Define "ClientLastName" function from a database field
$o.ClientLastName:=New object
$o.ClientLastName.formula:=Formula([Customers]lastname)
$o.ClientLastName.summary:="Lastname of the current client"
// Define "label" function from a 4D expression with one parameter
$o.label:=New object
$o.label.formula:=Formula(ds.Customers.get($1).label)
$o.label.parameters:=New collection
$o.label.parameters.push(New object("name";"ID";"type";Is Integer))
// Define "Title" function from a variable named "Title"
$o.Title:=New object
$o.Title.formula:=Formula(Title)
VP SET CUSTOM FUNCTIONS("ViewProArea";$o)
End case
Veja também
VP SET DATA CONTEXT
História
Versão | Mudanças |
---|---|
v19 R5 | Adicionado |
VP SET DATA CONTEXT ( vpAreaName : Text ; dataObj : Object {; options : Object } {; sheet : Integer} )
VP SET DATA CONTEXT ( vpAreaName : Text ; dataColl : Collection ; {options : Object } {; sheet : Integer} )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Object | -> | Nome de objeto formulário área 4D View Pro | |
dataObj | Object | -> | Objeto dados a carregar no contexto de dados | |
dataColl | Collection | -> | Recolha de dados a carregar no contexto de dados | |
options | Object | -> | Opções adicionais | |
sheet | Integer | -> | Índice da folha |
Descrição
The VP SET DATA CONTEXT
command sets the data context of a sheet. A data context is an object or a collection bound to a worksheet, and whose contents can be used to automatically fill the sheet cells, either by using an autogenerate option or the VP SET BINDING PATH method. On the other hand, the VP Get data context command can return a context containing user modifications.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
In dataObj or dataColl, pass an object or a collection containing the data to load in the data context. As imagens são convertidas em esquemas URI de dados.
To pass a time value in dataObj or dataColl, encapsulate it in an object with the following properties (see example 4):
Propriedade | Tipo | Descrição |
---|---|---|
value | Integer, Real, Boolean, Text, Date, Null | Valor a inserir no contexto |
time | Real | Valor de hora (em segundos) a introduzir no contexto |
In options, you can pass an object that specifies additional options. As propriedades possíveis são:
Propriedade | Tipo | Descrição |
---|---|---|
reset | Object | True to reset the sheet's contents before loading the new context, False (default) otherwise. |
autoGenerateColumns | Object | Apenas utilizado quando os dados são uma coleção. True (default) to specify that columns must be generated automatically when the data context is bound. In this case, the following rules apply:
|
In sheet, pass the index of the sheet that will receive the data context. Se nenhum índice for passado, o contexto será aplicado à folha atual.
If you export your document to an object using VP Export to object, or to a 4DVP document using VP EXPORT DOCUMENT, the includeBindingSource
option lets you copy the contents of the current contexts as cell values in the exported object or document. Para obter mais detalhes, consulte a descrição desses métodos.
Exemplo
Passa um objeto e associa os dados de contexto às células da primeira linha:
var $data : Object
$data:=New object
$data.firstName:="Freehafer"
$data.lastName:="Nancy"
VP SET DATA CONTEXT("ViewProArea"; $data)
VP SET BINDING PATH(VP Cell("ViewProArea"; 0; 0); "firstName")
VP SET BINDING PATH(VP Cell("ViewProArea"; 1; 0); "lastName")
Exemplo 2
Passe uma coleção de objetos e gere colunas automaticamente:
var $options : Object
var $data : Collection
$data:=New collection()
$data.push(New object("firstname"; "John"; "lastname"; "Smith"))
$data.push(New object("firstname"; "Mary"; "lastname"; "Poppins"))
$options:=New object("autoGenerateColumns"; True) VP SET DATA CONTEXT("ViewProArea"; $data; $options)
Exemplo 3
The data passed as a parameter is a collection that contains subcollections. Cada subcoleção define o conteúdo de uma linha:
var $data : Collection
var $options : Object
$data:=New collection
$data.push(New collection(1; 2; 3; False; "")) // 5 columns are created
$data.push(New collection) // Second row is empty
$data.push(New collection(4; 5; Null; "hello"; "world")) // Third row has 5 values
$data.push(New collection(6; 7; 8; 9)) // Fourth row has 4 values
$options:=New object("autoGenerateColumns"; True) VP SET DATA CONTEXT("ViewProArea"; $data; $options)
Exemplo 4 - Sintaxe de data e hora
var $data : Collection
var $options : Object
$data:= New collection()
// Dates can be passed as scalar values
$data.push(New collection("Date"; Current date))
// Time values must be passed as object attributes
$data.push(New collection("Time"; New object("time"; 5140)))
// Date + time example
$data.push(New collection("Date + Time"; New object("value"; Current date; "time"; 5140)))
$options:=New object("autoGenerateColumns"; True) VP SET DATA CONTEXT("ViewProArea"; $data; $options)
Eis o resultado após as colunas serem geradas:
Veja também
VP SET BINDING PATH
VP Get binding path
VP Get data context
VP SET DATE TIME VALUE
VP SET DATE TIME VALUE ( rangeObj : Object ; dateValue : Date ; timeValue : Time {; formatPattern : Text } )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
dateValue | Date | -> | Valor date a definir | |
timeValue | Hora | -> | Valor hora a definir | |
formatPattern | Text | -> | Formato do valor |
Descrição
The VP SET DATE TIME VALUE
command assigns a specified date and time value to a designated cell range.
In rangeObj, pass a range of the cell(s) (created for example with VP Cell
or VP Column
) whose value you want to specify. If rangeObj includes multiple cells, the value specified will be repeated in each cell.
The dateValue parameter specifies a date value to be assigned to the rangeObj.
The timeValue parameter specifies a time value (expressed in seconds) to be assigned to the rangeObj.
The optional formatPattern defines a pattern for the dateValue and timeValue parameters. For information on patterns and formatting characters, please refer to the Date and time formats section.
Exemplo
//Set the cell value as the current date and time
VP SET DATE TIME VALUE(VP Cell("ViewProArea";6;2);Current time;Current date;vk pattern full date time)
//Set the cell value as the 18th of December
VP SET DATE TIME VALUE(VP Cell("ViewProArea";3;9);!2024-12-18!;?14:30:10?;vk pattern sortable date time)
Veja também
4D View Pro cell format
VP SET DATE VALUE
VP SET TIME VALUE
VP SET VALUE
VP SET DATE VALUE
VP SET DATE VALUE ( rangeObj : Object ; dateValue : Date { ; formatPattern : Text } )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
dateValue | Date | -> | Valor date a definir | |
formatPattern | Text | -> | Formato do valor |
Descrição
The VP SET DATE VALUE
command assigns a specified date value to a designated cell range.
In rangeObj, pass a range of the cell(s) whose value you want to specify. If rangeObj includes multiple cells, the value specified will be repeated in each cell.
The dateValue parameter specifies a date value to be assigned to the rangeObj.
The optional formatPattern defines a pattern for the dateValue parameter. Passe qualquer formato personalizado ou você pode usar uma das seguintes constantes:
Parâmetros | Descrição | Padrão predefinido dos EUA |
---|---|---|
vk pattern long date | Formato ISO 8601 para a data completa | "dddd, dd MMMM yyyy" |
vk pattern month day | Formato ISO 8601 para o mês e o dia | "MMMM dd" |
vk pattern short date | Formato ISO 8601 abreviado para a data | "MM/dd/yyyy" |
vk pattern year month | Formato ISO 8601 para o mês e o ano | "yyyy MMMM" |
For information on patterns and formatting characters, please refer to the Date and time formats section.
Exemplo
//Set the cell value to the current date
VP SET DATE VALUE(VP Cell("ViewProArea";4;2);Current date))
//Set the cell value to a specific date with a designated format
VP SET DATE VALUE(VP Cell("ViewProArea";4;4);Date("12/25/94");"d/m/yy ")
VP SET DATE VALUE(VP Cell("ViewProArea";4;6);!2005-01-15!;vk pattern month day)
Veja também
4D View Pro cell format
VP SET DATE TIME VALUE
VP SET VALUE
VP SET DEFAULT STYLE
VP SET DEFAULT STYLE ( vpAreaName : Text ; styleObj : Object { ; sheet : Integer } )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
styleObj | Object | -> | Objecto estilo | |
sheet | Integer | -> | Sheet index (default = current sheet) |
Descrição
The VP SET DEFAULT STYLE
command defines the style in the styleObj as the default style for a sheet.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
The styleObj lets you pass an object containing style settings. Você pode usar uma folha de estilo existente ou criar um estilo. For more information, see the Style objects paragraph.
In the optional sheet parameter, you can designate a specific spreadsheet where the style will be defined. Se omitido, a planilha atual será utilizada por padrão. Você pode selecionar explicitamente a planilha atual com a seguinte constante:
vk current sheet
Exemplo
$style:=New object
$style.hAlign:=vk horizontal align left
$style.font:="12pt papyrus"
$style.backColor:="#E6E6FA" //light purple color
VP SET DEFAULT STYLE("myDoc";$style)
Veja também
VP ADD STYLESHEET
VP Font to object
VP Get default style
VP Object to font
VP SET BORDER
VP SET CELL STYLE
VP SET FIELD
VP SET FIELD ( rangeObj : Object ; field : Pointer { ; formatPattern : Text } )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
campo | Ponteiro | -> | Referência ao campo na estrutura virtual | |
formatPattern | Text | -> | Formato do campo |
Descrição
The VP SET FIELD
command assigns a 4D database virtual field to a designated cell range.
In rangeObj, pass a range of the cell(s) whose value you want to specify. If rangeObj includes multiple cells, the specified field will be linked in each cell.
The field parameter specifies a 4D database virtual field to be assigned to the rangeObj. The virtual structure name for field can be viewed in the formula bar. If any of the cells in rangeObj have existing content, it will be replaced by field.
The optional formatPattern defines a pattern for the field parameter. You can pass any valid custom format.
Exemplo
VP SET FIELD(VP Cell("ViewProArea";5;2);->[TableName]Field)
Veja também
VP SET FORMULA
VP SET FORMULA ( rangeObj : Object ; formula : Text { ; formatPattern : Text } )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
formula | Text | -> | Fórmula ou método 4D | |
formatPattern | Text | -> | Formato do campo |
Descrição
The VP SET FORMULA
command assigns a specified formula or 4D method to a designated cell range.
In rangeObj, pass a range of the cell(s) (created for example with VP Cell
or VP Column
) whose value you want to specify. If rangeObj includes multiple cells, the formula specified will be linked in each cell.
The formula parameter specifies a formula or 4D method name to be assigned to the rangeObj.
If the formula is a string, use the period
.
as numerical separator and the comma,
as parameter separator. If a 4D method is used, it must be allowed with theVP SET ALLOWED METHODS
command.
The optional formatPattern defines a pattern for the formula.
You remove the formula in rangeObj by replacing it with an empty string ("").
Exemplo 1
VP SET FORMULA(VP Cell("ViewProArea";5;2);"SUM($A$1:$C$10)")
Exemplo 2
Para remover a fórmula:
VP SET FORMULA(VP Cell("ViewProArea";5;2);"")
Exemplo 3
VP SET FORMULA($range; "SUM(A1,B7,C11)") //"," para separar parâmetros
Veja também
Cell format
VP Get Formula
VP SET FORMULAS
VP SET VALUE
VP SET FORMULAS
VP SET FORMULAS ( rangeObj : Object ; formulasCol : Collection )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo de células | |
formulasCol | Collection | -> | Collection of formulas |
Descrição
The VP SET FORMULAS
command assigns a collection of formulas starting at the specified cell range.
In rangeObj, pass a range of the cell (created with VP Cell) whose formula you want to specify. If rangeObj includes multiple ranges, only the first range is used.
The formulasCol is a two-dimensional collection:
- A coleção de primeiro nível contém subcoleções de fórmulas. Cada subcolecção define uma linha.
- Cada subcoleção define os valores das células para a linha. Values must be text elements containing the formulas to assign to the cells.
If the formula is a string, use the period
.
as numerical separator and the comma,
as parameter separator. If a 4D method is used, it must be allowed with theVP SET ALLOWED METHODS
command.
You remove the formulas in rangeObj by replacing them with an empty string ("").
Exemplo 1
$formulas:=New collection
$formulas.push(New collection("MAX(B11,C11,D11)";"myMethod(G4)")) // First row
$formulas.push(New collection("SUM(B11:D11)";"AVERAGE(B11:D11)")) // Second row
VP SET FORMULAS(VP Cell("ViewProArea";6;3);$formulas) // Set the cells with the formulas
myMethod:
$0:=$1*3.33
Exemplo 2
Para remover fórmulas:
$formulas:=New collection
$formulas.push(New collection("";"")) // first collection
$formulas.push(New collection("";"")) // second collection
VP SET FORMULAS(VP Cell("ViewProArea";0;0);$formulas) // Assign to cells
Veja também
VP Get Formulas
VP GET VALUESVP SET FORMULA
VP SET VALUES
VP SET FROZEN PANES
VP SET FROZEN PANES ( vpAreaName : Text ; paneObj : Object { ; sheet : Integer } )
Parâmetro | Tipo | Descrição | |
---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro |
paneObj | Object | -> | Objeto que contém as informações sobre as colunas e linhas congeladas |
sheet | Integer | -> | Índice da folha (folha atual se omitida) |
Descrição
The VP SET FROZEN PANES
command sets the frozen status of the columns and rows in the paneObj so they are always displayed in the vpAreaName. Frozen columns and rows are fixed in place and do not move when the rest of the document is scrolled. Uma linha sólida é exibida para indicar que as colunas e linhas estão congeladas. The location of the line depends on where the frozen column or row is on the sheet:
- Columns on the left or right: For columns on the left of the sheet, the line is displayed on the right side of the last frozen column. For columns on the right side of the sheet, the line is displayed on the left side of the first frozen column.
- Rows on the top or bottom: For rows at the top of the sheet, the line is displayed below the last frozen row. For rows at the bottom of the sheet, the line is displayed above the first frozen row.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
You can pass an object defining the columns and rows to freeze in the paneObj parameter. Setting the value of any of the column or row properties equal to zero resets (unfreezes) the property. Se uma propriedade for definida para menos de zero, o comando não fará nada. Pode passar:
Propriedade | Tipo | Descrição |
---|---|---|
columnCount | Integer | O número de colunas congeladas à esquerda da folha |
trailingColumnCount | Integer | O número de colunas congeladas à direita da folha |
rowCount | Integer | O número de linhas congeladas na parte superior da folha |
trailingRowCount | Integer | O número de linhas congeladas na parte inferior da folha |
No parâmetro opcional sheet, pode designar uma folha específica onde o intervalo será definido (a contagem começa em 0). Se omitido, a planilha atual será utilizada por padrão. Você pode selecionar explicitamente a planilha atual com a seguinte constante:
vk current sheet
Exemplo
You want to freeze the first three columns on the left, two columns on the right, and the first row:
C_OBJECT($panes)
$panes:=New object
$panes.columnCount:=3
$panes.trailingColumnCount:=2
$panes.rowCount:=1
VP SET FROZEN PANES("ViewProArea";$panes)
Veja também
VP SET NUM VALUE
VP SET NUM VALUE ( rangeObj : Object ; numberValue : Number { ; formatPattern : Text } )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
numberValue | Number | -> | Valor do número a definir | |
formatPattern | Text | -> | Formato do valor |
Descrição
The VP SET NUM VALUE
command assigns a specified numeric value to a designated cell range.
In rangeObj, pass a range of the cell(s) (created for example with VP Cell
or VP Column
) whose value you want to specify. If rangeObj includes multiple cells, the value specified will be repeated in each cell.
The numberValue parameter specifies a numeric value to be assigned to the rangeObj.
The optional formatPattern defines a pattern for the numberValue parameter.
Exemplo
//Set the cell value to 2
VP SET NUM VALUE(VP Cell("ViewProArea";3;2);2)
//Set the cell value and format it in dollars
VP SET NUM VALUE(VP Cell("ViewProArea";3;2);12.356;"_($* #,##0.00_)")
Veja também
VP SET PRINT INFO
VP SET PRINT INFO ( vpAreaName : Text ; printInfo : Object { ; sheet : Integer } )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome da área 4D View Pro | |
printInfo | Object | -> | Objeto que contém atributos de impressão | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) |
Descrição
The VP SET PRINT INFO
command defines the attributes to use when printing the vpAreaName.
Pass the name of the 4D View Pro area to print in vpAreaName. Se passar um nome que não existe, é devolvido um erro.
You can pass an object containing definitions for various printing attributes in the printInfo parameter. To view the full list of the available attributes, see Print Attributes.
In the optional sheet parameter, you can designate a specific spreadsheet to print (counting begins at 0). Se omitido, a planilha atual será utilizada por padrão. Você pode selecionar explicitamente a planilha atual com a seguinte constante:
vk current sheet
Exemplo
O código seguinte imprime uma área 4D View Pro num documento PDF:
var $printInfo : Object
//declare print attributes object
$printInfo:=New object
//define print attributes
$printInfo.headerCenter:="&BS.H.I.E.L.D. &A Sales Per Region"
$printInfo.firstPageNumber:=1
$printInfo.footerRight:="page &P of &N"
$printInfo.orientation:=vk print page orientation landscape
$printInfo.centering:=vk print centering horizontal
$printInfo.columnStart:=0
$printInfo.columnEnd:=8
$printInfo.rowStart:=0
$printInfo.rowEnd:=24
$printInfo.showGridLine:=True
//Add corporate logo
$printInfo.headerLeftImage:=logo.png
$printInfo.headerLeft:="&G"
$printInfo.showRowHeader:=vk print visibility hide
$printInfo.showColumnHeader:=vk print visibility hide
$printInfo.fitPagesWide:=1
$printInfo.fitPagesTall:=1
//print PDF document
VP SET PRINT INFO ("ViewProArea";$printInfo)
//export the PDF
VP EXPORT DOCUMENT("ViewProArea";"Sales2018.pdf";New object("formula";Formula(ALERT("PDF ready!"))))
O PDF:
Veja também
4D View Pro print attributes
VP Convert to picture
VP Get print info
VP PRINT
VP SET ROW ATTRIBUTES
VP SET ROW ATTRIBUTES ( rangeObj : Object ; propertyObj : Object )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Intervalo de linhas | |
propertyObj | Object | -> | Object containing row properties |
Descrição
The VP SET ROW ATTRIBUTES
command applies the attributes defined in the propertyObj to the rows in the rangeObj.
In the rangeObj, pass an object containing a range. Se o intervalo contiver colunas e linhas, os atributos são aplicados apenas às linhas.
The propertyObj parameter lets you specify the attributes to apply to the rows in the rangeObj. Estes atributos são:
Propriedade | Tipo | Descrição |
---|---|---|
height | number | Altura da linha expressa em píxeis |
pageBreak | boolean | True para inserir uma quebra de página antes da primeira linha do intervalo, senão false |
visible | boolean | True se a linha for visível, senão false |
resizable | boolean | True se a linha puder ser redimensionada, senão false |
header | text | Texto do cabeçalho da linha |
Exemplo
Pretende-se alterar o tamanho da segunda linha e definir o cabeçalho:
var $row; $properties : Object
$row:=VP Row("ViewProArea";1)
$properties:=New object("height";75;"header";"June")
VP SET ROW ATTRIBUTES($row;$properties)
Veja também
VP Get row attributes
VP get column attributes
VP SET ROW ATTRIBUTES
VP SET ROW COUNT
VP SET ROW COUNT ( vpAreaName : Text ; rowCount : Integer { ; sheet : Integer } )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
rowCount | Integer | -> | Número de linhas | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) |
Descrição
The VP SET ROW COUNT
command defines the total number of rows in vpAreaName.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
Pass the total number of rows in the rowCount parameter. *rowCount tem de ser superior a 0.
In the optional sheet parameter, you can designate a specific spreadsheet where the rowCount will be applied (counting begins at 0). Se omitido, a planilha atual será utilizada por padrão. Você pode selecionar explicitamente a planilha atual com a seguinte constante:
vk current sheet
Exemplo
O código seguinte define cinco linhas na área 4D View Pro:
VP SET ROW COUNT("ViewProArea";5)
Veja também
VP Get column count
VP get row-count
VP SET COLUMN COUNT
VP SET SELECTION
VP SET SELECTION ( rangeObj : Object )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo de células |
Descrição
The VP SET SELECTION
command defines the specified cells as the selection and the first cell as the active cell.
In rangeObj, pass a range object of cells to designate as the current selection.
Exemplo
$currentSelection:=VP Combine ranges(VP Cells("myVPArea";3;2;1;6);VP Cells("myVPArea";5;7;1;7))
VP SET SELECTION($currentSelection)
Veja também
VP Get active cell
VP Get selection
VP RESET SELECTION
VP SET ACTIVE CELL
VP ADD SELECTION
VP SHOW CELL
VP SET SHEET COUNT
VP SET SHEET COUNT ( vpAreaName : Text ; number : Integer )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
number | Integer | -> | Número de folhas |
Descrição
The VP SET SHEET COUNT
command sets the number of sheets in vpAreaName.
In number
, pass a number corresponding to how many sheets the document will contain after the command is executed.
Warning: The command will delete sheets if the previous amount of sheets in your document is superior to the number passed. For example, if there are 5 sheets in your document and you set the sheet count to 3, the command will delete sheets number 4 and 5.
Exemplo
O documento tem atualmente uma folha:
Para definir o número de folhas como 3:
VP SET SHEET COUNT("ViewProArea";3)
Veja também
VP SET SHEET NAME
VP SET SHEET NAME ( vpAreaName : Text ; name : Text {; sheet: Integer} )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
name | Text | -> | Novo nome para a folha | |
sheet | Integer | -> | Index of the sheet to be renamed |
Descrição
The VP SET SHEET NAME
command renames a sheet in the document loaded in vpAreaName.
Em vpAreaName, passe o nome da área 4D View Pro.
In name, pass a new name for the sheet.
In sheet, pass the index of the sheet to rename.
A indexação começa em 0.
If no sheet is passed, the command renames the current sheet.
O novo nome não pode conter os seguintes caracteres: *, :, [, ], ?,\,/
O comando não faz nada se:
- o novo nome contém caracteres proibidos
- o valor do novo nome está em branco
- o novo nome já existe
- the passed sheet index does not exist
Exemplo
Defina o nome da terceira folha como "Total first quarter":
VP SET SHEET NAME("ViewProArea";"Total first quarter";2)
VP SET SHEET OPTIONS
VP SET SHEET OPTIONS ( vpAreaName : Text; sheetOptions : Object { ; sheet : Integer} )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Object | -> | Nome da área 4D View Pro | |
sheetOptions | Object | -> | Opção(ões) de folha a definir | |
sheet | Object | -> | Índice da folha (folha atual se omitida) |
Descrição
The VP SET SHEET OPTIONS
command allows defining various sheet options of the vpAreaName area.
Pass the name of the 4D View Pro area in vpAreaName. Se passar um nome que não existe, é devolvido um erro.
Pass an object containing definitions for the options to set in the sheetOptions parameter. To view the full list of the available options, see the Sheet Options paragraph.
In the optional sheet parameter, you can designate a specific spreadsheet (counting begins at 0). Se omitido, a planilha atual será utilizada por padrão. Você pode selecionar explicitamente a planilha atual com a seguinte constante:
vk current sheet
Exemplo 1
Pretende proteger todas as células exceto o intervalo C5:D10:
// Activate protection on the current sheet
var $options : Object
$options:=New object
$options.isProtected:=True
VP SET SHEET OPTIONS("ViewProArea";$options)
// mark cells C5:D10 as 'unlocked'
VP SET CELL STYLE(VP Cells("ViewProArea";2;4;2;6);New object("locked";False))
Exemplo 2
You need to protect your document while your users can resize rows and columns:
var $options : Object
$options:=New object
// Activate protection
$options.isProtected:=True
$options.protectionOptions:=New object
// Allow user to resize rows
$options.protectionOptions.allowResizeRows=True;
// Allow user to resize columns
$options.protectionOptions.allowResizeColumns=True;
// Apply protection on the current sheet
VP SET SHEET OPTIONS("ViewProArea";$options)
Exemplo 3
You want to customize the colors of your sheet tabs, frozen lines, grid lines, selection background and selection border:
var $options : Object
$options:=New object
// Customize color of Sheet 1 tab
$options.sheetTabColor:="Black"
$options.gridline:=New object("color";"Purple")
$options.selectionBackColor:="rgb(255,128,0,0.4)"
$options.selectionBorderColor:="Yellow"
$options.frozenlineColor:="Gold"
VP SET SHEET OPTIONS("ViewProArea";$options;0)
// Customize color of Sheet 2 tab
$options.sheetTabColor:="red"
VP SET SHEET OPTIONS("ViewProArea";$options;1)
// Customize color of Sheet 3 tab
$options.sheetTabColor:="blue"
VP SET SHEET OPTIONS("ViewProArea";$options;2)
Resultados:
Exemplo
Pretende ocultar as linhas da grelha, bem como os cabeçalhos das linhas e das colunas.
var $options : Object
$options:=New object
$options.gridline:=New object()
$options.gridline.showVerticalGridline:=False
$options.gridline.showHorizontalGridline:=False
$options.rowHeaderVisible:=False
$options.colHeaderVisible:=False
VP SET SHEET OPTIONS("ViewProArea";$options)
Resultados:
Veja também
4D View Pro sheet options
VP Get sheet options
VP SET SHOW PRINT LINES
VP SET SHOW PRINT LINES ( vpAreaName : Text {; visible : Boolean}{; sheet : Integer} )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
visible | Parâmetros | -> | Linhas de impressão apresentadas se True (padrão), ocultas se False | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) |
Descrição
The VP SET SHOW PRINT LINES
command sets whether to display print preview lines in a spreadsheet..
Em vpAreaName, passe o nome da área 4D View Pro.
In visible, pass True
to display the print lines, and False
to hide them. True
é passado por padrão.
In sheet, pass the index of the target sheet. Se nenhum índice for especificado, o comando se aplica à folha atual.
A indexação começa em 0.
The position of a spreadsheet's print lines varies according to that spreadsheet's page breaks.
Exemplo
O código a seguir exibe linhas de impressão na segunda folha de um documento:
VP SET SHOW PRINT LINES("ViewProArea";True;1)
Com uma quebra de página:
Veja também
VP SET TABLE COLUMN ATTRIBUTES
História
Versão | Mudanças |
---|---|
v19 R7 | Adicionado |
VP SET TABLE COLUMN ATTRIBUTES ( vpAreaName : Text ; tableName : Text ; column : Integer ; attributes : Object {; sheet : Integer } )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
tableName | Text | -> | Nome da tabela | |
column | Integer | -> | Índice da coluna na tabela | |
attributes | Object | -> | Attribute(s) to apply to the column | |
sheet | Integer | -> | Índice da folha (folha atual se omitida) |
Descrição
The VP SET TABLE COLUMN ATTRIBUTES
command applies the defined attributes to the column in the tableName.
Em vpAreaName, passe o nome da área 4D View Pro.
In the attributes parameter, pass an object that contains the properties to set:
Propriedade | Tipo | Descrição |
---|---|---|
dataField | text | Nome da propriedade da coluna da tabela no contexto de dados. |
name | text | Nome da coluna da tabela. Deve ser único na tabela. If this name already used by another column, it is not applied and a default name is automaticaly used. |
formula | text | Define a fórmula para cada célula da coluna. See Structured Reference Formulas in the SpreadJS documentation |
footerText | text | Valor do rodapé da coluna. |
footerFormula | text | Fórmula do rodapé da coluna. |
filterButtonVisible | boolean | Sets whether the table column's filter button is displayed (default is True when the table is created). |
In sheet, pass the index of the target sheet. Se nenhum indice for especcificado ou se passar -1, o comando se aplica a folha atual.
A indexação começa em 0.
If tableName is not found or if column is higher than the number of columns, the command does nothing.
Exemplo
Você cria uma tabela com um contexto de dados:
var $context;$options : Object
$context:=New object()
$context.col:=New collection()
$context.col.push(New object("name"; "Smith"; "firstname"; "John"; "salary"; 10000))
$context.col.push(New object("name"; "Wesson"; "firstname"; "Jim"; "salary"; 50000))
$context.col.push(New object("name"; "Gross"; "firstname"; "Maria"; "salary"; 10500))
VP SET DATA CONTEXT("ViewProArea"; $context)
//Define the columns for the table
$options:=New object()
$options.tableColumns:=New collection()
$options.tableColumns.push(New object("name"; "Last Name"; "dataField"; "name"))
$options.tableColumns.push(New object("name"; "Salary"; "dataField"; "salary"))
VP CREATE TABLE(VP Cells("ViewProArea"; 1; 1; 2; 3); "PeopleTable"; "col"; $options)
Then you want to insert a column with data from the data context and hide some filter buttons:
//insert a column
VP INSERT TABLE COLUMNS("ViewProArea"; "PeopleTable"; 1; 1)
var $param : Object
$param:=New object()
// Bind the column to the firstname field from the datacontext
$param.dataField:="firstname"
// Change the default name of the column to "First name"
// and hide the filter button
$param.name:="First Name"
$param.filterButtonVisible:=False
VP SET TABLE COLUMN ATTRIBUTES("ViewProArea"; "PeopleTable"; 1; $param)
// Hide the filter button of the first column
VP SET TABLE COLUMN ATTRIBUTES("ViewProArea"; "PeopleTable"; 0; \
New object("filterButtonVisible"; False))
Veja também
VP CREATE TABLE
VP Find table
VP Get table column attributes
VP RESIZE TABLE
VP SET TABLE THEME
História
Versão | Mudanças |
---|---|
v19 R8 | Adicionado |
VP SET TABLE THEME ( vpAreaName : Text ; tableName : Text ; options : cs.ViewPro.TableTheme )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
tableName | Text | -> | Nome da tabela | |
options | cs.ViewPro.TableTheme | -> | Table theme properties to modify |
Descrição
The VP SET TABLE THEME
command modifies the current theme of the tableName.
In vpAreaName, pass the name of the 4D View Pro area and in tableName, the name of the table to modify.
In the options parameter, pass an object of the cs.ViewPro.TableTheme
class that contains the theme properties to modify.
Exemplo 1
Pretende-se definir um tema predefinido para uma tabela:
var $param : cs. ViewPro. TableTheme
$param:=cs. ViewPro. TableTheme.new()
$param.theme:="medium2" VP SET TABLE THEME("ViewProArea"; "myTable"; $param)
Exemplo 2
Pretende ter esta renderização de coluna alternativa:
var $param : cs.ViewPro.TableTheme
$param:=cs.ViewPro.TableTheme.new()
// Enable the band column rendering
$param.bandColumns:=True
$param.bandRows:=False
// Create the theme object with header and column styles
$param.theme:=cs.ViewPro.TableThemeOptions.new()
var $styleHeader; $styleColumn; $styleColumn2 : cs.ViewPro.TableStyle
$styleHeader:=cs.ViewPro.TableStyle.new()
$styleHeader.backColor:="Gold"
$styleHeader.foreColor:="#03045E"
$param.theme.headerRowStyle:=$styleHeader
$styleColumn1:=cs.ViewPro.TableStyle.new()
$styleColumn1.backColor:="SkyBlue"
$styleColumn1.foreColor:="#03045E"
$param.theme.firstColumnStripStyle:=$styleColumn1
$styleColumn2:=cs.ViewPro.TableStyle.new()
$styleColumn2.backColor:="LightCyan"
$styleColumn2.foreColor:="#03045E"
$param.theme.secondColumnStripStyle:=$styleColumn2
VP SET TABLE THEME("ViewProArea"; "myTable"; $param)
Veja também
VP CREATE TABLE
VP Get table theme
VP SET TEXT VALUE
VP SET TEXT VALUE ( rangeObj : Object ; textValue : Text { ; formatPattern : Text } )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
textValue | Text | -> | Valor texto a definir | |
formatPattern | Text | -> | Formato do valor |
Descrição
The VP SET TEXT VALUE
command assigns a specified text value to a designated cell range.
In rangeObj, pass a range of the cell(s) (created for example with VP Cell
or VP Column
) whose value you want to specify. If rangeObj includes multiple cells, the value specified will be repeated in each cell.
The textValue parameter specifies a text value to be assigned to the rangeObj.
The optional formatPattern defines a pattern for the textValue parameter.
Exemplo
VP SET TEXT VALUE(VP Cell("ViewProArea";3;2);"Test 4D View Pro")
Veja também
VP SET TIME VALUE
VP SET TIME VALUE ( rangeObj : Object ; timeValue : Text { ; formatPattern : Text } )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
timeValue | Text | -> | Valor hora a definir | |
formatPattern | Text | -> | Formato do valor |
Descrição
The VP SET TIME VALUE
command assigns a specified time value to a designated cell range.
In rangeObj, pass a range of the cell(s) (created for example with VP Cell
or VP Column
) whose value you want to specify. If rangeObj includes multiple cells, the value specified will be repeated in each cell.
The timeValue parameter specifies a time expressed in seconds to be assigned to the rangeObj.
The optional formatPattern defines a pattern for the timeValue parameter.
Exemplo
//Set the value to the current time
VP SET TIME VALUE(VP Cell("ViewProArea";5;2);Current time)
//Set the value to a specific time with a designated format
VP SET TIME VALUE(VP Cell("ViewProArea";5;2);?12:15:06?;vk pattern long time)
Veja também
Cell Format
VP SET DATE TIME VALUE
VP SET VALUE
VP SET VALUE
VP SET VALUE ( rangeObj : Object ; valueObj : Object )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
valueObj | Object | -> | Cell values and format options |
Descrição
The VP SET VALUE
command assigns a specified value to a designated cell range.
The command allows you to use a generic code to set and format the types of values in rangeObj, whereas other commands, such as VP SET TEXT VALUE
and VP SET NUM VALUE
, reduce the values to specific types.
In rangeObj, pass a range of the cell(s) (created for example with VP Cell
or VP Column
) whose value you want to specify. If rangeObj includes multiple cells, the value specified will be repeated in each cell.
The parameter valueObj is an object that includes properties for the value and the format to assign to rangeObj. Pode incluir as seguintes propriedades:
Propriedade | Tipo | Descrição |
---|---|---|
value | Integer, Real, Boolean, Text, Date, Null | Value to assign to rangeObj (except- time). Passar null para apagar o conteúdo da célula. |
time | Real | Time value (in seconds) to assign to rangeObj |
format | Text | Pattern for value/time property. For information on patterns and formatting characters, please refer to the Cell Format paragraph. |
Exemplo
//Set the cell value as False
VP SET VALUE(VP Cell("ViewProArea";3;2);New object("value";False))
//Set the cell value as 2
VP SET VALUE(VP Cell("ViewProArea";3;2);New object("value";2))
//Set the cell value as $125,571.35
VP SET VALUE(VP Cell("ViewProArea";3;2);New object("value";125571.35;"format";"_($* #,##0.00_)"))
//Set the cell value as Hello World!
VP SET VALUE(VP Cell("ViewProArea";3;2);New object("value";"Hello World!"))
//Set the cell value as current date
VP SET VALUE(VP Cell("ViewProArea";4;2);New object("value";Current date))
//Set the cell value as current hour
VP SET VALUE(VP Cell("ViewProArea";5;2);New object("time";Current hour))
//Set the cell value as specific date and time
VP SET VALUE(VP Cell("ViewProArea";3;9);New object("value";!2024-12-18!);"time";?14:30:10?;"format";vk pattern full date time))
//Erase cell content
VP SET VALUE(VP Cell("ViewProArea";3;9);New object("value";Null))
Veja também
Cell Format
VP Get values
VP SET VALUE
VP SET BOOLEAN VALUE
VP SET DATE TIME VALUE
VP SET FIELD
VP SET FORMULA
VP SET NUM VALUE
VP SET TEXT VALUE
VP SET TIME VALUE
VP SET VALUES
VP SET VALUES ( rangeObj : Object ; valuesCol : Collection )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
valuesCol | Collection | -> | Collection of values |
Descrição
The VP SET VALUES
command assigns a collection of values starting at the specified cell range.
In rangeObj, pass a range for the cell (created with VP Cell
) whose value you want to specify. The cell defined in the rangeObj is used to determine the starting point.
- If rangeObj is not a cell range, only the first cell of the range is used.
- If rangeObj includes multiple ranges, only the first cell of the first range is used.
The valuesCol parameter is two-dimensional:
- A coleção de primeiro nível contém subcoleções de valores. Cada subcolecção define uma linha. Passa uma coleção vazia para saltar uma linha.
- Cada subcoleção define os valores das células para a linha. Os valores podem ser Integer, Real, Boolean, Text, Date, Null ou Object. Se o valor for um objeto, pode ter as seguintes propriedades:
Propriedade | Tipo | Descrição |
---|---|---|
value | Integer, Real, Boolean, Text, Date, Null | Valor da célula (exceto - time) |
time | Real | Valor hora (em segundos) |
Exemplo
$param:=New collection
$param.push(New collection(1;2;3;False)) //first row, 4 values
$param.push(New collection) //second row, untouched
$param.push(New collection(4;5;Null;"hello";"world")) // third row, 5 values
$param.push(New collection(6;7;8;9)) // fourth row, 4 values
$param.push(New collection(Null;New object("value";Current date;"time";42))) //fifth row, 1 value
VP SET VALUES(VP Cell("ViewProArea";2;1);$param)
Veja também
VP Get formulas
VP Get value
VP Get Values
VP SET FORMULAS
VP SET VALUE
VP SET WORKBOOK OPTIONS
VP SET WORKBOOK OPTIONS ( vpAreaName : Text ; optionObj : Object)
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro | |
optionObj | Object | -> | Object containing the workbook options to be set |
Descrição
VP SET WORKBOOK OPTIONS
sets the workbook options in vpAreaName.
Em vpAreaName, passe o nome da área 4D View Pro.
In optionObj, pass the workbook options to apply to vpAreaName.
If optionObj is empty, the command does nothing.
As opções modificadas do livro são guardadas com o documento.
A tabela seguinte lista as opções de libro disponíveis:
Propriedade | Tipo | Descrição | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
allowUserDragMerge | boolean | The drag merge operation is allowed (select cells and drag the selection to merge cells) | |||||||||||||||||||||
allowAutoCreateHyperlink | boolean | Permite a criação automática de hiperlinks na planilha. | |||||||||||||||||||||
allowContextMenu | boolean | O menu de contexto incorporado pode ser aberto. | |||||||||||||||||||||
allowCopyPasteExcelStyle | boolean | Styles from a spreadsheet can be copied and pasted to Excel, and vice-versa. | |||||||||||||||||||||
allowDynamicArray | boolean | Permite arrays dinâmicos em folhas de trabalho | |||||||||||||||||||||
allowExtendPasteRange | boolean | Estende o intervalo colado se o intervalo colado não for suficiente para os dados colados | |||||||||||||||||||||
allowSheetReorder | boolean | É permitida a reordenação de folhas | |||||||||||||||||||||
allowUndo | boolean | É permitido desfazer as edições. | |||||||||||||||||||||
allowUserDeselect | boolean | É permitido desmarcar células específicas de uma seleção. | |||||||||||||||||||||
allowUserDragDrop | boolean | É permitido arrastar e largar dados de intervalo | |||||||||||||||||||||
allowUserDragFill | boolean | É permitido o preenchimento por arrastamento | |||||||||||||||||||||
allowUserEditFormula | boolean | As fórmulas podem ser introduzidas nas células | |||||||||||||||||||||
allowUserResize | boolean | As colunas e as linhas podem ser redimensionadas | |||||||||||||||||||||
allowUserZoom | boolean | É permitido fazer zoom (ctrl + roda do rato) | |||||||||||||||||||||
autoFitType | number | O conteúdo é formatado para caber em células, ou células e cabeçalhos. Available values:
| |||||||||||||||||||||
backColor | string | A color string used to represent the background color of the area, such as "red", "#FFFF00", "rgb(255,0,0)", "Accent 5". A cor de fundo inicial fica oculta quando uma backgroundImage é definida. | |||||||||||||||||||||
backgroundImage | string / picture / file | Imagem de fundo para a área. | |||||||||||||||||||||
backgroundImageLayout | number | Como é apresentada a imagem de fundo. Available values:
| |||||||||||||||||||||
calcOnDemand | boolean | As fórmulas só são calculadas quando são solicitadas. | |||||||||||||||||||||
columnResizeMode | number | Modo de redimensionamento de colunas. Available values:
| |||||||||||||||||||||
copyPasteHeaderOptions | number | Cabeçalhos a incluir quando os dados são copiados ou colados. Available values:
| |||||||||||||||||||||
customList | collection | The list for users to customize drag fill, prioritize matching this list in each fill. Cada item da coleção é um conjunto de cadeias de caracteres. See on SpreadJS docs. | |||||||||||||||||||||
cutCopyIndicatorBorderColor | string | Border color for the indicator displayed when the user cuts or copies the selection. | |||||||||||||||||||||
cutCopyIndicatorVisible | boolean | Apresenta um indicador quando se copia ou corta o item selecionado. | |||||||||||||||||||||
defaultDragFillType | number | O tipo de preenchimento de arrastamento padrão. Available values :
| |||||||||||||||||||||
enableAccessibility | boolean | O suporte de acessibilidade está ativado na folha de cálculo. | |||||||||||||||||||||
enableFormulaTextbox | boolean | A caixa de texto da fórmula está activada. | |||||||||||||||||||||
grayAreaBackColor | string | A color string used to represent the background color of the gray area , such as "red", "#FFFF00", "rgb(255,0,0)", "Accent 5", and so on. | |||||||||||||||||||||
highlightInvalidData | boolean | Os dados inválidos são realçados. | |||||||||||||||||||||
iterativeCalculation | boolean | Ativa o cálculo iterativo. See on SpreadJS docs. | |||||||||||||||||||||
iterativeCalculationMaximumChange | numeric | Quantidade máxima de variação entre dois valores de cálculo. | |||||||||||||||||||||
iterativeCalculationMaximumIterations | numeric | Número de vezes que a fórmula deve ser recalculada. | |||||||||||||||||||||
newTabVisible | boolean | Apresentar um separador especial para permitir que os usuários insiram novas folhas. | |||||||||||||||||||||
numbersFitMode | number | Muda o modo de exibição quando a largura de dados/data é maior que a largura da coluna. Available values:
| |||||||||||||||||||||
pasteSkipInvisibleRange | boolean | Paste or skip pasting data in invisible ranges:
| |||||||||||||||||||||
referenceStyle | number | Estilo para referências de células e intervalos em fórmulas de células. Available values:
| |||||||||||||||||||||
resizeZeroIndicator | number | Política de desenho quando a linha ou coluna é redimensionada para zero. Available values:
| |||||||||||||||||||||
rowResizeMode | number | A forma como as linhas são redimensionadas. Os valores disponíveis são os mesmos que columnResizeMode | |||||||||||||||||||||
scrollbarAppearance | number | Aspeto da barra de deslocação. Available values:
| |||||||||||||||||||||
scrollbarMaxAlign | boolean | A barra de rolagem se alinha com a última linha e coluna da folha ativa. | |||||||||||||||||||||
scrollbarShowMax | boolean | The displayed scroll bars are based on the entire number of columns and rows in the sheet. | |||||||||||||||||||||
scrollByPixel | boolean | Ativar a deslocação de precisão por pixel. | |||||||||||||||||||||
scrollIgnoreHidden | boolean | A barra de rolagem ignora as linhas ou colunas ocultas. | |||||||||||||||||||||
scrollPixel | integer | Decides scrolling by that number of pixels at a time when scrollByPixel is true. The final scrolling pixels are the result of scrolling delta * scrollPixel . For example: scrolling delta is 3, scrollPixel is 5, the final scrolling pixels are 15. | |||||||||||||||||||||
showDragDropTip | boolean | Exibir a dica de arrastar e soltar. | |||||||||||||||||||||
showDragFillSmartTag | boolean | Display the drag fill dialog. | |||||||||||||||||||||
showDragFillTip | boolean | Exibir a dica de preenchimento de arrasto. | |||||||||||||||||||||
showHorizontalScrollbar | boolean | Mostrar a barra de deslocação horizontal. | |||||||||||||||||||||
showResizeTip | number | Position of the tab strip. Available values:
| |||||||||||||||||||||
showScrollTip | number | Position of the tab strip. Available values:
| |||||||||||||||||||||
showVerticalScrollbar | boolean | Mostrar a barra de deslocação vertical. | |||||||||||||||||||||
tabEditable | boolean | The sheet tab strip can be edited. | |||||||||||||||||||||
tabNavigationVisible | boolean | Display the sheet tab navigation. | |||||||||||||||||||||
tabStripPosition | number | Position of the tab strip. Available values:
| |||||||||||||||||||||
tabStripRatio | number | Percentage value (0.x) that specifies how much of the horizontal space will be allocated to the tab strip. The rest of the horizontal area (1 - 0.x) will allocated to the horizontal scrollbar. | |||||||||||||||||||||
tabStripVisible | boolean | Display the sheet tab strip. | |||||||||||||||||||||
tabStripWidth | number | Width of the tab strip when position is left or right. O padrão e o mínimo são 80. | |||||||||||||||||||||
useTouchLayout | boolean | Se deve ser usado o layout de toque para apresentar o componente Spread. |
Exemplo
Para definir a opção allowExtendpasteRange em "ViewProArea":
var $workbookOptions : Object
$workbookOptions:= New Object
$workbookOptions.allowExtendPasteRange:=True VP SET WORKBOOK OPTIONS("ViewProArea";$workbookOptions)
Veja também
VP SHOW CELL
VP SHOW CELL ( rangeObj : Object { ; vPos : Integer; hPos : Integer } )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
rangeObj | Object | -> | Objeto intervalo | |
vPos | Integer | -> | Posição vertical da vista da célula ou linha | |
hPos | Integer | -> | Horizontal view position of cell or row |
Descrição
The VP SHOW CELL
command vertically and horizontally repositions the view of the rangeObj.
In rangeObj, pass a range of cells as an object to designate the cells to be viewed. The view of the rangeObj will be positioned vertically or horizontally (i.e., where rangeObj appears) based on the vPos and hPos parameters. The vPos parameter defines the desired vertical position to display the rangeObj, and the hPos parameter defines the desired horizontal position to display the rangeObj.
Estão disponíveis os seguintes selectores:
Selector | Descrição | Available with vPos | Available with hPos |
---|---|---|---|
vk position bottom | Alinhamento vertical para o fundo da célula ou linha. | X | |
vk position center | Alinhamento com o centro. The alignment will be to the cell, row, or column limit according to the view position indicated: | X | X |
vk position left | Alinhamento horizontal à esquerda da célula ou coluna | X | |
vk position nearest | Alinhamento ao limite mais próximo (superior, inferior, esquerda, direita, centro). The alignment will be to the cell, row, or column limit according to the view position indicated: | X | X |
vk position right | Alinhamento horizontal à direita da célula ou coluna | X | |
vk position top | Alinhamento vertical ao topo da célula ou linha | X |
Este comando só é eficaz se o reposicionamento da vista for possível. For example, if the rangeObj is in cell A1 (the first column and the first row) of the current sheet, repositioning the view will make no difference because the vertical and horizontal limits have already been reached (i.e., it is not possible to scroll any higher or any more to the left). The same is true if rangeObj is in cell C3 and the view is repositioned to the center or the bottom right. A vista mantém-se inalterada.
Exemplo
You want to view the cell in column AY, row 51 in the center of the 4D View Pro area:
$displayCell:=VP Cell("myVPArea";50;50)
// Move the view to show the cell VP SHOW CELL($displayCell;vk position center;vk position center)
Resultados:
The same code with the vertical and horizontal selectors changed to show the same cell positioned at the top right of the 4D View Pro area:
$displayCell:=VP Cell("myVPArea";50;50)
// Move the view to show the cell VP SHOW CELL($displayCell;vk position top;vk position right)
Resultados:
Veja também
VP ADD CELL
VP Get active cell
VP Get selection
VP RESET SELECTION
VP SET ACTIVE CELL
VP SET SELECTION
VP SUSPEND COMPUTING
VP SUSPEND COMPUTING ( vpAreaName : Text )
Parâmetro | Tipo | Descrição | ||
---|---|---|---|---|
vpAreaName | Text | -> | Nome de objeto formulário área 4D View Pro |
Descrição
The VP SUSPEND COMPUTING
command stops the calculation of all formulas in vpAreaName. This command is useful when you want to suspend calculations in this 4D View Pro area so you can manually make modifications to formulas without encountering errors before you've finished making the changes.
O comando pausa o serviço de cálculo no 4D View Pro. Formulas that have already been calculated remain unchanged, however any formulas added after VP SUSPEND COMPUTING
command is executed are not calculated.
Em vpAreaName, passe o nome da área 4D View Pro. Se passar um nome que não existe, é devolvido um erro.
O serviço de cálculo de 4D View Pro mantém um contador de ações de sugastar/retomar. Therefore, each execution of
VP SUSPEND COMPUTING
command must be balanced by a corresponding execution of theVP RESUME COMPUTING
command. Any formula impacted by modifications made while calculations are suspended will be recalculated when the command is executed.
Exemplo
You've added two buttons to the form so that the user can suspend/resume calculations:
O código do botão Suspend Computing:
//pause calculations while users enter information
If(FORM Event.code=On Clicked)
VP SUSPEND COMPUTING("ViewProArea")
End if
If(FORM Event.code=On Clicked)
VP RESUME COMPUTING("ViewProArea")
End if