XL97: Number Formats Lost Error Opening HTML File

ID: Q171279

The information in this article applies to:

SYMPTOMS

When you open a Hypertext Markup Language (HTML) document in Microsoft Excel 97, you may receive the following error message:

   File error. Some number formats may have been lost.

You receive this error message even if you saved the HTML document from Microsoft Excel 97 by clicking Save As HTML on the File menu.

CAUSE

This problem occurs if the HTML document contains any styles that use "[dquote]" or "[squote]," as in the following example:

   STYLE="vnd.ms-excel.numberformat:_($* #,##0_)[semicolon]_($* (#,##0)
   [semicolon]_($* [dquote]-[dquote]_)[semicolon]_(@_)"

RESOLUTION

To correct this problem, install Microsoft Excel 97 Service Release 1 (SR-1) and open the file.

To work around this problem, replace the strings in the HTML file with the appropriate character as in the following table.

   Replace         With This Character
   -----------------------------------

   [dquote]                  "
   [squote]                  '

STATUS

Microsoft has confirmed this to be a problem in Microsoft Excel 97. This problem was corrected in Microsoft Excel 97 SR-1.

MORE INFORMATION

When you create an HTML file that may be opened in Microsoft Excel 97, you can force Microsoft Excel 97 to apply specific number formats to values in the HTML file by using a STYLE tag. The following is an example of a STYLE tag:

   STYLE="vnd.ms-excel.numberformat:$#.0000[semicolon]($#.0000)"

In this case, the number format that Microsoft Excel applies to the value is the following:

   $#.0000;($#.0000)

When you open an HTML file that contains such a tag, Microsoft Excel 97 automatically applies the format to the value to which the tag is attached.

If the number format in Microsoft Excel contains quotation marks (") or apostrophes ('), and if you export a worksheet to an HTML file by clicking Save As HTML on the File menu, the tag in the HTML file contains [dquote] or [squote] instead of the quotation mark or apostrophe characters.

Additional query words: XL97 htm sr1

Keywords          : kberrmsg kbweb xlformat 
Version           : WINDOWS:97
Platform          : WINDOWS
Issue type        : kbbug
Solution Type     : kbfix

Last Reviewed: November 5, 1998