Microsoft Knowledge Base Email Alertz

(306656) - 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...

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 306656 - Last Review: January 30, 2007 - Revision: 3.3

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

This article was previously published under Q306656

On This Page

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 "0x3049acca" referenced memory at "0x000000a0". The memory could not be "read".

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.

MORE INFORMATION

Steps to Reproduce This Behavior

  1. 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
    					
  2. Save the file to your local disk hard drive by using a name such as "Test[1].csv."
  3. 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.)
  4. When the file is open, select the data that appears. Click Insert, and then click Chart to start the Chart Wizard.
  5. Click Finish. Excel fails before the chart is inserted.

APPLIES TO
  • Microsoft Office Excel 2003
  • Microsoft Excel 2002 Standard Edition
  • Microsoft Excel 2000 Standard Edition
  • Microsoft Excel 97 Standard Edition
Keywords: 
kbbug kbpending KB306656
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate