Allowing Cells to Overflow
Overview
You can specify that the contents of a cell can overflow into an adjacent cell if that cell is empty. If you allow cell overflow,
- Left-aligned text in a cell overflows to the adjacent right cell.
- Right-aligned text in a cell overflows to the adjacent left cell.
- When text is centered in a cell, text overflows to both the left and right adjacent cells.
Note: Cell overflow is not performed if you span or merge cells. |
In the following figure, the text in cell C1 is left-aligned and overflows. The first character of the cell text is aligned with the left border of C1. The text in cell C3 is right-aligned and overflows. The last character of the cell text is aligned with the right border of C3. The text in cell C5 is centered and overflows. The middle character of the cell text is centered in the cell that contains the original text.
If you want the text to overflow into a specific block of cells, you must look at how the text is aligned in the cell (set with the TypeHAlign property) and the cell in which the original text resides. For example, assume you want the example text shown in the previous figure to be displayed across columns A, B, and C. If the text is left-aligned, the cell text should originate in cell A1. If the text is right-aligned, the cell text should originate in cell C3. If the text is centered, the cell text should originate in cell B5.