Microsoft KB Archive/103023: Difference between revisions
(importing KB archive) |
m (Text replacement - """ to """) |
||
Line 22: | Line 22: | ||
== SYMPTOMS == | == SYMPTOMS == | ||
The versions of Microsoft Excel listed above may incorrectly parse text files that contain curly quotation marks ( | The versions of Microsoft Excel listed above may incorrectly parse text files that contain curly quotation marks ("smart quotes"). | ||
<br /> | <br /> | ||
Line 38: | Line 38: | ||
# Click OK. | # Click OK. | ||
NOTE: This procedure must be done accurately; otherwise, you will receive a | NOTE: This procedure must be done accurately; otherwise, you will receive a "Parse line error" message.<br /> | ||
<br /> | <br /> | ||
Or, before you import the text file in Microsoft Excel, open the file in any text editor that has a replace feature and replace the smart quotes with normal quotation marks. | Or, before you import the text file in Microsoft Excel, open the file in any text editor that has a replace feature and replace the smart quotes with normal quotation marks. | ||
Line 47: | Line 47: | ||
== MORE INFORMATION == | == MORE INFORMATION == | ||
In most word processors, when you create a comma-delimited file, text strings can be kept together by enclosing the string in | In most word processors, when you create a comma-delimited file, text strings can be kept together by enclosing the string in "smart" quotes or in normal quotation marks, as in the following example:<br /> | ||
<br /> | <br /> | ||
<pre class="FIXEDTEXT"> | <pre class="FIXEDTEXT"> "123 Main Street, NE",123 South Street, WA </pre> | ||
<br /> | <br /> | ||
<br /> | <br /> | ||
When you parse the above text string in Microsoft Excel, | When you parse the above text string in Microsoft Excel, "NE" correctly remains part of the text string "123 Main Street, NE," and the text strings "123 South Street" and "WA" are correctly considered two separate text strings and parsed into separate columns.<br /> | ||
<br /> | <br /> | ||
However, if the text string above contains | However, if the text string above contains "smart" quotes instead of normal quotation marks, the text may not be parsed as expected. If the text file is imported with the delimiter set as a comma, the text string will be parsed as if the quotation marks were not there. That is, in the example above, the text "123 Main Street" is entered in one cell and "NE" in another. | ||
<br /> | <br /> | ||
Line 63: | Line 63: | ||
== REFERENCES == | == REFERENCES == | ||
"User's Guide 2," version 4.0, pages 150-151<br /> | |||
"User's Guide," version 3.0, page 340 | |||
Additional query words: 4.00a XL4 XL3 curly curled | Additional query words: 4.00a XL4 XL3 curly curled |
Latest revision as of 09:24, 20 July 2020
XL: CSV Text File with Smart Quotes Not Parsed As Expected |
The information in this article applies to:
- Microsoft Excel for Windows, versions 2.x, 3.0, 4.0, 4.0a
- Microsoft Excel for OS/2, versions 2.2, 3.0
- Microsoft Excel for the Macintosh, versions 2.2, 3.0, 4.0
SYMPTOMS
The versions of Microsoft Excel listed above may incorrectly parse text files that contain curly quotation marks ("smart quotes").
WORKAROUND
For Microsoft Excel to correctly parse the data, you must manually set the points at which the text string should be parsed. The steps below describe how to do this:
- Select the data in the worksheet that you want to parse.
- On the Data menu, click Parse.
- In the Parse line, use brackets to enclose the text that you want to remain together.
- Click OK.
NOTE: This procedure must be done accurately; otherwise, you will receive a "Parse line error" message.
Or, before you import the text file in Microsoft Excel, open the file in any text editor that has a replace feature and replace the smart quotes with normal quotation marks.
MORE INFORMATION
In most word processors, when you create a comma-delimited file, text strings can be kept together by enclosing the string in "smart" quotes or in normal quotation marks, as in the following example:
"123 Main Street, NE",123 South Street, WA
When you parse the above text string in Microsoft Excel, "NE" correctly remains part of the text string "123 Main Street, NE," and the text strings "123 South Street" and "WA" are correctly considered two separate text strings and parsed into separate columns.
However, if the text string above contains "smart" quotes instead of normal quotation marks, the text may not be parsed as expected. If the text file is imported with the delimiter set as a comma, the text string will be parsed as if the quotation marks were not there. That is, in the example above, the text "123 Main Street" is entered in one cell and "NE" in another.
REFERENCES
"User's Guide 2," version 4.0, pages 150-151
"User's Guide," version 3.0, page 340
Additional query words: 4.00a XL4 XL3 curly curled
Keywords :
Version : WINDOWS:2.0,3.0,4.0,4.0a; OS/2:2.2,3.0; MACINTOSH:2.2,3.0,4.0
Platform : MACINTOSH OS/2 WINDOWS
Issue type :
Technology :
Last Reviewed: December 23, 1999 |