AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones Procesador de texto
  • Handling a Table programmatically
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Inserts a table in a Document variable.
Ejemplo
// Récupération du document
MonDocument is Document <- TT_Tableau
// Insère un tableau à la position 1 de taille 3x3
MonDocument.InsèreTableau(1, 3, 3)
// Récupération du document
MonDocument is Document <- TT_Tableau
// Insère un tableau à la position du curseur de taille 3 colonnes et 2 lignes
MonDocument.InsèreTableau(TT_Tableau.Curseur, 3, 2)
Sintaxis

Insertar una tabla en un documento Word Ocultar los detalles

<Result> = <Document>.InsertTable(<Position> [, <Number of columns> [, <Number of rows>]])
<Result>: Variable de tipo DocFragment
docFragment variable with the inserted fragment.
<Document>: Variable de tipo Document
Name of the Document variable to be used.
<Position>: Integro
Position where the table will be inserted. This position is expressed in number of characters.
<Number of columns>: Entero opcional
Number of columns in the table. This parameters corresponds to 1 by default.
<Number of rows>: Entero opcional
Number of rows in the table. This parameters corresponds to 1 by default.
Observaciones

Handling a Table programmatically

A table in a Word Processing document can be handled by the WLanguage functions for managing arrays.
For example:
// Récupération du document
MonDocument is Document <- TT_ExempleTT
// Insère un tableau à la position 1 de taille 3x3
MonDocument.InsèreTableau(1, 3, 3)
// Définition d'un fragment correspondant au tableau
f is docFragment(TT_ExempleTT.Valeur, TT_ExempleTT.Curseur, 0)
let para <- f.Paragraph[1]
IF para.Table = Null THEN
	RETURN
END
doc is Document <- TT_ExempleTT.Valeur
// Ajoute une ligne au tableau
nIndice is int = Add(para.Tableau.Lignes)
// Saisie dans la cellule 2,2
para.Tableau.Cellules[2,2].Contenu.Texte = "Je suis dans la cellule 2,2"
// Supprime la ligne 3
Delete(para.Tableau.Lignes, 3)
// Supprime la colonne 3
Delete(para.Tableau.Colonnes, 3)
// Supprime le tableau entier où se trouve le curseur
Delete(doc.Paragraph, para.ParagraphIndex)
Componente: wd300mdl.dll
Versión mínima requerida
  • Versión 24
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 30/09/2024

Señalar un error o enviar una sugerencia | Ayuda local