Question

To recreate this problem:

  1. Create an Excel workbook (.xlsx). I'm using Excel 2010, but I'm not sure that matters.

  2. Create a named range.

  3. Create a chart that refers to the named range for its data series values. The reference should look something like "workbook.xlsx!NamedRangeName".

  4. Use IE8 to download this file from a web server. Open in Excel (without saving first).

When you try to open the file, Excel complains about invalid references, because somehow "workbook.xlsx" has been replaced with "http://someUrl/filename.xlsx" in the reference to the named range.

The problem does not occur if you save the file first instead of opening it. It does not occur in IE9 or Firefox either.

I suspect this is related to how IE stores downloaded files.

I'm looking for a workaround, since I assume only Microsoft could actually fix it. I can only control the server side, not the PC, browser configuration, or user behavior. I can change the excel files to some extent, but I do need the charts to refer to named ranges.

Was it helpful?

Solution

The workaround I found was to add to the download page:

<!--[if lte IE 8 ]>
<meta name="DownloadOptions" content="noopen" />
<![endif]-->

This removes the option for the user to open the file without saving it first.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top