# To edit a table

(Redirected from Edit table)

To open the Edit Table window, click the Edit Table button in either:

In the Attribute panel, select Definition from the Attribute dropdown menu.

The Edit Table window: The Edit Table window looks much like the Result window table view. The difference is that you can add indexes and edit the values in cells.

Edit a cell: Click the cell, and start typing to replace what’s in it. To add to what’s there, click three times to get a cursor in the cell, and type. You can use left-arrow and right-arrow keys to move the cursor. Press Enter to accept the value and to select the next cell, or click in another cell.

Tip
You can enter an expression into a table cell with operations, function calls, and so on. But, if the expression is complex, it’s easier to enter it as the definition of a new variable, and then just type the name of the variable into the table.

Select a cell: Click the cell once.

Select a range of cells: Drag the cursor from a cell at one corner of a rectangular region to the cell at the opposite corner.

Copy and paste a cell or region: You can copy a cell or a range (two-dimensional rectangular region) of cells from a table or paste a cell into a region, just as with a spreadsheet:

1. Select the source cell or region as above, and choose Copy from the Edit menu or press Control+c.
2. Select the destination cell (or top-left cell of the destination region), and choose Paste from the Edit menu or press Control+v.

If you select a destination region that is n times larger (width, height, or both) than the source cell or region, it repeats the source n times in the destination.

Accept: Click to accept all the changes you have made to the table. If you close a table, it also accepts the changes, unless you click .

Cancel: Click to cancel all the changes you have made to the table since you opened it or last clicked .

Copy and paste to or from a spreadsheet: Copy and paste of a cell or region works much the same from a spreadsheet to an Analytica table or vice versa. If necessary, you can easily pivot the Analytica table so its rows and columns correspond with those in the spreadsheet. It copies numbers in exponential format with full precision, no matter what number format is used in the table, so that other applications can receive them with no problems.

Copy an entire table: To copy a table, including its row and column headers, click the top-left cell to select the whole table. You can also copy a table with more than two dimensions: Select Copy table from the Edit menu. When you paste into a spreadsheet, it includes the name of the table, and all indexes, including the slicer index(es) for the third and higher dimensions.

Entering multi-line text: When entering multi-line text or multiple line expressions into single cells of an edit table, press Ctrl+Enter while editing the cell contents to insert a new line within the cell. Pressing just Enter when editing the contents of a cells accepts the changes for that cell and leaves the cell edit; hence, you need to hold Alt when inserting the new line. You can also select Add new line within cell from the right-mouse context menu while editing.

## Editing or extending indexes in an edit table

One convenient aspect of Intelligent Arrays is that you can edit and extend the indexes of an array right in the edit table, to change index values, insert or remove rows or columns, or, more generally, subarrays.

This works for an index defined as a list of numbers or list of labels. If an index is defined in another way — for example as m .. n or Sequence(x1, x2, dx) — you must edit the original index. Either way, all edit tables that use the changed index are automatically modified accordingly.

To edit or extend an index, either you must be in edit mode or the index variable you want to modify must have an input node.

Edit a cell in a row or column index: Click the cell once to select its row or column. Then double-click the cell to select its contents. Start typing to replace the text or number. Remember, the same change happens to all tables that use that index.

Append a row: Click the bottom element of the row index to select the bottom row, and press the down-arrow key or select Append Row from the Edit menu.

Append a column: Click the rightmost element of the column index to select the right column, and press the right- arrow key or select Append Column from the Edit menu.

Insert a row or column:

1. Click the row or column header to select the row or column before which you wish to insert a new one.
2. Select Insert Rows (or Insert Columns) from the Edit menu, or press or Control+i.

Normally, the new row or column contains zeros. You can change this default with the system variable Sys_tableCellDefault. You can also set table-specific default values, using the TableCellDefault attribute.

Reordering items :Items in a list view can be reordered by selecting one or more items and dragging the selected region to a new position. There is also a Reorder command on the right-mouse context menu. After selecting Reorder, move the mouse or use the arrow keys to move the selected cells to a newposition in the list.

Delete a row or column:

1. Click the row or column header to select the row or column you wish to delete.
2. Choose Delete Rows or Delete Columns from the Edit menu, or press Control+k.
Tip
When you try to add an item to an index or delete an item from an index that is also used by another edit table, it warns you that “Changing the size of this index will affect table definitions of other variables.” and gives the option of whether to continue. Adding an item will add a new slice containing zeros, just as it does for the one you are editing. Similarly, deleting an item will delete a slice from these other edit table.
Tip
If you intend your model to be used by end users with the Power Player editions (which is fixed in browse mode), or with the Free Edition (which is fixed is browse mode when your model has more than 101 user objects), or if you intend to save your model as browse-only (if you have the Enterprise Edition), you can decide whether you want to allow your end users to be able to edit indexes as described above. Create an input node for each index that you want to let them change. Or don’t to prevent them from changing an index.

Add an index: To add an index, use one of these two methods:

• Draw an arrow from the index to the node containing the table. When it asks if you want to add the index as a new dimension of the table, answer Yes.
• Click in the edit table to open the Indexes dialog. Double-click the index you want to add, and click OK.

When adding a new dimension to an edit table, it copies the values of the table to each new sub-array over the new index. Thus, the expanded table has the same values for every element of the new index. This has no effect on other edit tables.

Remove an index: To remove an index, use one of these two methods:

• Draw an arrow from the index to the node containing the table. When it asks if you want to remove the index as a dimension of the table, answer Yes.
• Or, click in the edit table to open the Indexes dialog. Double-click the index you want to remove, and click OK.
Tip
When removing a dimension from an edit table, it replaces the entire table by its subarray for the first value of the index you are removing. It deletes all the rest. Be careful, because you will lose all the data in the rest of the table! This has no effect on other edit tables.