BUG: Excel May Stop Responding When You Open an HTML File Streamed From a Web Site (318184)



The information in this article applies to:

  • Microsoft Excel 2000
  • Microsoft Excel 2002

This article was previously published under Q318184

SYMPTOMS

When you set the Multipurpose Internet Mail Extensions (MIME) content type of a Hypertext Markup Language (HTML) or Active Server Pages (ASP) file to stream data back to Excel inside Microsoft Internet Explorer, and the file contains <IMG> (image) tags with relative URL paths, Excel may encounter an access violation when you attempt to download the associated image file.

If you are using Excel 2000, you may receive the following error message:
The instruction at '0x3009992b' referenced memory '0x000002b8'. The memory could not be 'read'.
If you are using Excel 2002, you may receive the following error message:
Microsoft Excel has encountered a problem and needs to close. We are sorry for the inconvenience.

Please tell Microsoft about this problem.

We have created an error report that you can send to help us improve Microsoft Excel. We will treat this report as confidential and anonymous.

To see what data this error report contains, click here.
When you click to see the data in the error report, the report states that the error is with Excel.exe, at offset 000fdfdb.

CAUSE

When you load an HTML file, images are downloaded asynchronously during idle-time processing. If the paths to the images use relative URLs, Excel must resolve the full path of the open sheet first. However, if the sheet has not completely loaded, or is in the process of unloading because of a quick close at the time at which the asynchronous download is attempted, Excel may encounter a null pointer value and stop responding unexpectedly.

This problem may also occur if the <IMG> tag source location points to a file that does not exist.

RESOLUTION

To resolve this problem, use full Uniform Resource Locators (URLs) for <IMG> tag source locations. For example, change the sample in the "Steps to Reproduce the Behavior" section to use the following URL:
<TD><IMG SRC="http://myserver/myfolder/money.gif" border="0"></TD>
				

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

This problem does not occur consistently, and sometimes does not occur at all. The problem is related to timing, and factors such as the speed of the computer, the number of processors, and the size of the HTML file contribute to whether or not you encounter this problem.

Steps to Reproduce the Behavior

  1. On a Web server that is running Internet Information Services (IIS), create a new ASP page, and then paste the following code in the page:
    <% 
     Response.ContentType = "application/vnd.ms-excel" 
    %> 
    <HTML><BODY>
    <TABLE>
      <TR><TD COLSPAN="3">Sales Data</TD></TR>
      <% for i = 1 to 50 %>
       <TR>
       <TD><IMG SRC="../money.gif" border="0"></TD>
         <TD>Total Sales</TD>
         <TD>$3,787,845.14</TD> 
       </TR>
      <% next %>
    </TABLE>
    </BODY></HTML> 
    					
  2. In the virtual directory where the .asp file resides, add a graphic file named Money.gif. If the file does not exist, copy an image and rename it Money.gif.
  3. On a computer with Internet Explorer and Excel 2000 or Excel 2002 installed, browse to the .asp file.

    NOTE: Excel may stop responding while you attempt to load the file or shortly after you close Internet Explorer. Because the problem is related to timing and all computers have different configurations, it can take several attempts to reproduce the error, or the error may not occur at all.
  4. Change the ASP page to use a full URL path for the <IMG> source location, and then test the page again.

REFERENCES

For additional information about streaming content from ASP to Microsoft Office, click the article numbers below to view the articles in the Microsoft Knowledge Base:

300108 HOW TO: Send a Dynamic Text Document to the Client by Using Active Server Pages

264143 FIX: ASP Session Variables Empty When Office 2000 MIME Types Are Streamed with Internet Explorer

296717 PRB: Internet Explorer Prompts User to Open/Save Office File Streamed from ASP


Modification Type:MajorLast Reviewed:12/12/2003
Keywords:kbASPObj kbbug kbpending KB318184