|
|
|
|
- Manejar una Mesa mediante programación
<Variable Document>.InsertTable (Función) Inserta un tabla en un Document Variable. // Retrieve the document MyDocument is Document <- WP_Table // Inserts a 3x3 table at position 1 MyDocument.InsertTable(1, 3, 3) // Retrieve the document MyDocument is Document <- WP_Table // Inserts a table containing 3 columns and 2 rows at cursor position MyDocument.InsertTable(WP_Table.Cursor, 3, 2)
Sintaxis
Insertar una tabla en un tratamiento de texto Document Ocultar los detalles
<Result> = <Document>.InsertTable(<Position> [, <Number of columns> [, <Number of rows>]])
<Result>: Variable de tipo DocFragment Variable de tipo docFragment que contiene el fragmento insertado. <Document>: Variable de tipo Document Nombre de la variable de tipo Document que se utilizará. <Position>: Integro La posición donde se insertará la tabla. Esta posición se expresa en número de caracteres. <Number of columns>: Entero opcional Número de columnas en la tabla. De forma predeterminada, este parámetro corresponde a 1. <Number of rows>: Entero opcional Número de filas en la tabla. Este parámetro corresponde al 1 de Default. Observaciones Manejar una Mesa mediante programación Una tabla en un procesador de textos Document puede ser manejada por las funciones de WLanguage para la gestión de arrays. Por ejemplo: // Retrieve the document MyDocument is Document <- WP_ExampleWP // Inserts a 3x3 table at position 1 MyDocument.InsertTable(1, 3, 3) // Define a fragment corresponding to the table f is docFragment(WP_ExampleWP.Value, WP_ExampleWP.Cursor, 0) let para <- f.Paragraph[1] IF para.Table = Null THEN RETURN END doc is Document <- WP_ExampleWP.Value // Adds a row to the table nIndex is int = Add(para.Table.Rows) // Input in cell 2,2 para.Table.Cells[2,2].Content.Text = "I am in cell 2,2" // Deletes row 3 Delete(para.Table.Rows, 3) // Deletes column 3 Delete(para.Table.Columns, 3) // Deletes the entire table where the cursor is positioned Delete(doc.Paragraph, para.ParagraphSubscript)
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|