This problem does not occur when you use monospace fonts (fonts with fixed widths), such as Courier New. The discrepancy in font metrics is a function of how Microsoft Windows reports the font information to Microsoft Excel.
Method 1: Use a monospace font
- Select the cells that contain the data. On the Format menu, click Cells.
- In the Format Cells dialog box, click the Font tab and select a monospace font, such as Courier New.
Method 2: Manually resize the column
- Drag the boundary on the right side of the column heading until the column is the width you want.
Select the column you want to resize, point to Column on the
Format menu and click Width. Type a smaller number and click OK.
- On the File menu, click Print Preview to preview the page.
- Repeat steps 1 and 2 as necessary until the column appears correctly.
Method 3: Change the font of the Normal styleChange the font of the Normal style to match the font used in the worksheet:
- Press CTRL+A to select all columns and rows in the workbook.
- On the Format menu, click Style.
- In the Style name list, click Normal. Then, click Modify.
- On the Font tab, select the correct font (whatever font you are using in the workbook).
- Click OK twice.
For example, a font may report 9.1 pixels, but because a display driver is unable to work with fractional amounts, it rounds the amount to the nearest whole pixel value. In this example, 9.1 pixels is rounded down to 9.0 pixels. When a higher resolution printer renders the view in print preview or is used when you print the worksheet, the characters may be printed at a resolution of 9.1 pixels. Because the column width is calculated based on the rounded whole number value, the printed output of the column width is different from the displayed column width. This discrepancy is particularly apparent when you use the AutoFit command to resize columns that contain long text strings.
ID d'article : 214394 - Dernière mise à jour : 23 janv. 2007 - Révision : 1