XL2000: Text Spanning Multiple Cells Truncated When Saved as HTML

ID: Q235087


The information in this article applies to:
  • Microsoft Excel 2000


SYMPTOMS

If you publish a worksheet as a Web page, and the worksheet contains text that spans multiple cells, the text does not appear properly when you open the Web page in your browser. For example, if you type the following text in cell A1

The quick brown fox jumps over the lazy dog.
and then publish the worksheet, the text in your browser appears truncated or is wrapped within cell A1.

This does not affect how the text looks when you open the file in Microsoft Excel.


CAUSE

Unlike Excel, Hypertext Markup Language (HTML) does not allow text to spill across multiple cells in a table. When you publish an HTML file that contains text that spills across multiple cells, Excel attempts to merge all of the cells in which the text spills together, so that they display correctly in the browser. However, Excel can only do this if the following conditions are true:

  • The text that spills across multiple cells is left-aligned in the source cell.

    -and-


  • The cells into which the text spills are empty.

    -and-


  • The cells into which the text spills contain formatting identical to the source cell.


If Excel is unable to merge cells together when saving the HTML file, the spilled text may not appear correctly in a browser. Some browsers interpret HTML differently, so that you may see different results depending on which browser you use to view the workbook. The following table shows how the text may appear in different browsers:

   If you have this browser          You may see this behavior
   -----------------------------------------------------------------------

   Microsoft Internet Explorer 5     Text is cropped
   Microsoft Internet Explorer 4     Text is either cropped or wrapped 
                                     to a new line.
   Netscape Navigator 4              Text may be cropped, wrapped to a 
                                     new line, or is not displayed.
   Microsoft Internet Explorer 3     Text is wrapped to a new line.
   Netscape Navigator 3              Text is wrapped to a new line. Row and 
                                     column heights and widths may not be 
                                     maintained. 
Note that in Excel, if you open an HTML workbook containing spilled text, the spilled text is displayed correctly.


RESOLUTION

To work around this problem, use either of the following methods.

Method 1: Merge the Cells into Which the Text Spills

  1. In Excel, select all the cells into which the text spills (including the source cell for the text).


  2. On the Format menu, click Cells.


  3. Click the Alignment tab.


  4. Under Text control, click Merge cells.


  5. Click OK.


Method 2: AutoFit the Column Containing the Spilled Text

  1. In Excel, select the column containing the source cell for the text.


  2. On the Format menu, point to Column, and then click AutoFit Selection.


Additional query words: XL2000 not there truncating truncate clipped clip clipping clips crop cropped cropping crops lost lose loose missing gone disappeared disappearing disappears

Keywords : kbconversion xlformat
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: September 17, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.