Cell format dialog


4.6  •  5.0  •  5.1  •  5.2  •  5.3  •  5.4  •  6.0  •  6.1  •  6.2  •  6.3  •  6.4  •  6.5

The Cell format dialog lets you set formats and styles for cells in a Table view. It includes tabs for Fill, Alignment, Entry, Fonts, and Borders, described below, and Number format explained on its own page.


To open the Cell Format dialog

  1. Show a result table or edit table.
  2. Select the cell, row, column, or region whose format you want to modify:
      • To select the entire table, click the top left cell, above row headers and to left of column headers, or press ctrl+A (for select All)
      • To select an entire row or column, click on its header cell.
      • To select a rectangular range, press on a cell and drag to the opposite corner cell
  1. Then do one of these:
      • Select Cell format.. from the Result menu
      • Right-click on and select Cell format.. from the right-click menu
      • Press Ctrl+Alt+F, which opens the dialog on the last tab you used
      • Press Ctrl+B, which opens the dialog on the Number format tab

It is important to select the table region you want to format before you open the Cell format dialog because the Dialog is "modal" -- that means you can't modify the region unless you close the dialog, reselect the region, and reopen the dialog. (Yes, we know this is lame. We'll fix it in a future release.)


Apply changes to


When you have header cells selected when you bring up the dialog, the Apply changes to option appears at the bottom of the dialog, where you can specify whether the changes you make apply to the header cells, body cells or both. This panel does not appear when no header cells are selected, and in that case changes apply only to body cells.

One subtlety is that if you bring up the dialog from the right-mouse menu, the default is determined from where you clicked when you right-clicked for the menu. If you right-clicked over a header cell, then Headers only is initially selected. If you right-clicked over a body cell, then Headers and body is initially selected.

Edit vs. Result Tables

Changes you make from this dialog apply to both edit tables and result tables. So if you set a cell-level format while viewing an edit table, you will see the same format reflected when you view its result table, and vise versa.

Indexes and pivots

Multidimensional tables can be pivoted in countless ways, the particular indexes present can depend on which uncertainty view is being viewed, edit tables that contain expressions in the cells may have fewer indexes than their result table views, and changes within your model often alter the dimensionalities of results. This fluid treatment of dimensionality is a core feature of Analytica, and also impacts how cell formats are processed.

Changes you make to cell formats are associated with the indexes. For example, if you set the bottom border of a row, and then pivot so that the index that had been the vertical row index is now the horizontal column index, these borders will now appear as the right-side border of the corresponding cell. If you set the fill color of the 4th row, you've actually set the background color for cells corresponding to the 4th element of the row index. If you pivot so that a different index becomes the row index, the fourth row doesn't not stay filled -- instead if follows the element of that index. When that index is a slicer, and you select the 4th element, all cells in the table reflect that fill color. The basic rule is that the formats are associated with the indexes, and as indexes change or pivot, the formats follow the indexes rather than staying put at a fixed row and column position.

The Tabs


The number tab contains the number format dialog. Please see Number format for details.

On the menus, both Number format... and Cell format,,, are included on the menus, even though both bring up this same dialog. The difference is that the Number format... option always opens to the Number tab, and because it is used more frequently than other cell formats, both formats are provided. The Cell formats... dialog always opens to a tab other than the Number tab -- the previous non-Number tab if the dialog had been accessed from the table previously.

Fill format tab


Use the Fill tab to specify the background color for cells. Select the color from the grid of colors, or access the full spectrum of colors from the More colors... dialog.

The 16 colors at the bottom of the grid are your custom colors. These are stored for you on your computer, and are not saved with the model. If you have favorite colors, you can configure these for easy access. You define which colors are on your custom color palette from the More Colors... dialog. The steps for doing this are tricky, and are explained at custom colors.

The transparency slider makes it convenient to lighten colors. Many of the base colors are too deep and saturated for cell backgrounds, and would make it hard to see the text on top. The transparency slider makes it convenient to lighten these. Since for body cells the color appears over a white background, the resulting color is equivalent to some RGB color that you could theoretically select from the More colors... dialog. But when the fill applies to a header cell, it is not equivalent, since the selected color appears over a gray header background, so that with transparency, header cells appear a bit darker than body cells. With a full opaque selection, the color will appear the same in both header and body cells.

Alignment format tab


The options at the top of this dialog control the text alignment, which is sometimes also referred to as text justification.

The horizontal default for body cells right aligns numbers, dates and Null values, and left-aligns everything else. This default is determined by the system variable Sys CellAlignmentHybridDefault and can be changed. A Hybrid alignment uses both left and right alignment based on data type using your own selections regarding which types should be right aligned:


Word wrap causes long lines to word wrap and is the default. Deselect this checkbox to disable word wrap.

In the hybrid Right-aligned types box that appears when you have a horizontal Hybrid selection, the difference between "single-line" and "multi-line" text is unrelated to whether the text word wraps. Multi-line text contains at least one newline character (e.g., Chr(13)) in the text itself, whereas single-line text does not.

The vertical default top-aligns text and images but middle-aligns controls that appear in cells.

Indent applies to the side specified by the horizontal alignment. The unit of indent is roughly the width of a space character. For a nice example of indenting of index elements, please see the Cash Flow Statement in the Enterprise Model example (which is in the Financial statements module), where indent has been used to organize the line items into categories.

Entry format tab


You can specify how text typed into a table is parsed.

When Any expression is selected, the user can enter an Analytica expression into the cell, so you have to type surrounding quotes for literal text, and type Handle(ident) when you want a handle to an object (rather than its value).

When Numbers is selected, an entry that can be parsed as a number will be. When Text is selected, then an entry that doesn't qualify as one of the other selected items will be interpreted as a text literal, and surrounding quotes are not shown nor need to be typed. Null controls whether the text Null is interpreted as the special value Null rather than the 4 character text literal. When Identifiers is checked, then if you type the identifier of an object, it will be interpreted as a handle to that object.

Font format tab


You can change the font face, size, color, and style from the Font tab.

Border format tab


You can change the borders of selected cells from the Border tab. On the left of the dialog are three controls: Style, Width and Color. Selections you make here do not result in any change to the borders, but instead select the properties of the border that you want to change. After you've selected the desired properties, select which side border you want to change using the controls on the right-side of the pane. In the Border pane, click on the side that you wish to change. The Border control shows you what the current borders are, or the changes you've selected. Before you have change a border, the control shows you the borders that are there for the existing cells. When multiple cells are selected, and have borders that vary among the cells, a wide, hashed, gray border pattern appears to communicate the idea that there are currently multiple border styles among the selected cells. The Presets are for convenience and are equivalent to manually changing all the sides one-at-a-time in the Border control.

Interaction with computed cell formats

In addition to the capability to set the cell-level formats using this dialog, there is a capability to compute cell-level formats. Although not as commonly used, you might need to be aware that computed formats have precedence over the formats you set using this dialog. Therefore, if a Cell Format Expression exists, changes that you make might not be visible if the computed format also changes the same element.


See also


You are not allowed to post comments.