Microsoft KB Archive/306656

= Insert Chart Causes Microsoft Excel to Fail When CSV File Contains Brackets =

Article ID: 306656

Article Last Modified on 1/30/2007

-

APPLIES TO


 * Microsoft Office Excel 2003
 * Microsoft Excel 2002 Standard Edition
 * Microsoft Excel 2000 Standard Edition
 * Microsoft Excel 97 Standard Edition

-



This article was previously published under Q306656



SYMPTOMS
If you open a CSV file in Microsoft Excel, and then insert a chart by using the Chart Wizard, Microsoft Excel may unexpectedly fail with an access violation if the CSV file that you opened contains brackets ([ ]) in the name. If you open the CSV file in Microsoft Internet Explorer, the brackets may be added by Internet Explorer when a duplicate item by the same name already exists in the local cache.

The exact error message depends on the version of Microsoft Excel that you are using, and how the chart is added. For example, in Microsoft Excel 2002 or later, a Microsoft Office Dr. Watson dialog box appears, prompting you to restart Microsoft Excel and attempt a recover. However, in Microsoft Excel 97 or 2000, the application fails and Microsoft Windows displays a standard error message for an access violation:

The instruction at &quot;0x3049acca&quot; referenced memory at &quot;0x000000a0&quot;. The memory could not be &quot;read&quot;.



CAUSE
When you build a chart by using the Microsoft Excel Chart Wizard, you specify a range of data to use for the chart and a chart location. These ranges are qualified with the sheet name. Because CSV files are simple text files (and do not support multiple sheets or unique names), Microsoft Excel uses the file name for the sheet name. However, if this sheet name contains a square bracket (which it does if the file name also has the bracket), Microsoft Excel mistakes the bracket for a range qualifier, which eventually causes Microsoft Excel to fail when it tries to resolve the linked range.



RESOLUTION
Do not use file names for your CSV files that contain square brackets in the name. If you plan to open CSV files in Microsoft Excel from Internet Explorer, consider returning them as attachments, and have the user save them to disk before opening them in Microsoft Excel. Internet Explorer removes the brackets that it uses for cache items when they are saved to disk.



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



Steps to Reproduce This Behavior
  Use Notepad (or another text editor) to create a file with the following content: name,phone,email john,999-555-1010,johng@something.net alice,999-555-1011,alice@something.net  Save the file to your local disk hard drive by using a name such as &quot;Test[1].csv.&quot; Double-click the file to open it in Microsoft Excel. (If another program has registered itself for the CSV extension, you can open the file by starting Microsoft Excel from the Start menu, and then browsing to the CSV file from the File menu's Open dialog box.) When the file is open, select the data that appears. Click Insert, and then click Chart to start the Chart Wizard. Click Finish. Excel fails before the chart is inserted.</li></ol>

Additional query words: csv square box 0x3049a3e5 ipf 0167:3038246a crashes XL97 XL2000 XL2002 XL2003

Keywords: kbbug kbpending KB306656

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.