Home >Online Product Documentation >Table of Contents >Working with Tables
Stylus Studio provides several features to help you work with tables in the Grid tab. Changes you make to tables in the Grid tab, such as adding a nested table, are reflected in the underlying XML document.
This section covers the following topics:
You add nested tables to a document in the Grid tab using the Add Nested Table dialog box, shown in Figure 123. This dialog box allows you to specify the path to the root for the new table, a row element name, and the number of rows.
A nested table is created as a child of the current element. The nested table shown in Figure 124, myTable, was created as a child of the <book> element.
myTable
<book>
Nested tables are created with two default rows, which use the element name you provide in the Row Element Name field of the Add Nested Table dialog box. Rows get a default text value of Row n text, where n is an incrementing value starting with 1. You specify the number of rows using the Number of rows field.
Row
text
The Add Nested Table dialog box appears.
The nested table is added to the document and appears in the grid.
You can change the order of nested tables within a row.
The table is deleted from the document.
You can sort tables on any column in ascending or descending order.
You can also display sort options by right-clicking the column heading.
The table rows are sorted based on the order you select.
You can copy a tab-delimited text version of a table to the clipboard. This makes it possible to paste document contents from the grid into spreadsheets and other editors that can manage tab-delimited files. Figure 125 shows books/book in books.xml pasted into Microsoft Excel, for example.
books/book
books.xml
Note that when you use this feature, the entire table is copied - column headings (element and attribute names) are not distinguished from cell contents (element and attribute values) in the spreadsheet.