PRB:Can't Export Data w/Extended Characters to Microsoft Excel

Last reviewed: May 16, 1996
Article ID: Q139160
The information in this article applies to:
  • Microsoft FoxPro for Macintosh, version 2.6a

SYMPTOMS

Some Macintosh extended characters do not transfer correctly to Microsoft Excel with the COPY TO...TYPE XLS command. Using a tab-delimited or SYLK file type does hold this formatting correctly.

Extended characters are created by holding the option key and then pressing another key. When converting some extended characters (such as the bullet created with the key sequence "Option-8" or smart quotes created with "Option-[", "Option-]", "Shift-Option-[", and "Shift-Option-]"), the COPY TO <file> TYPE XLS doesn't bring these characters over correctly. This behavior might be related to the fonts used but appears to be more than that in this case.

RESOLUTION

To export extended characters, export the file as tab-delimited text. This requires you to verify the format of the fields. In particular, Microsoft Excel treats date fields as a General format, and places a number with the format yyyymmdd.

Another possibility is to copy the data with a SYLK format:

  1. In FoxPro, type:

    COPY TO <FILENAME> TYPE DELIMITED WITH TAB

    -or-

    COPY TO <FILENAME> TYPE SYLK

  2. Use the following steps in Microsoft Excel:

    a. On the File menu, click Open, and click Readable Files.

    b. Choose the file you created from FoxPro. The characters should

          display correctly when you open a file. You may have to define the
          type of the field if Microsoft Excel does not select the correct type
          by default.
    

STATUS

Microsoft is researching this behavior and will post more information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Behavior

* The following code creates a table and adds some extended characters. * It then converts the data into Microsoft Excel format. The characters * from the FoxPro table are not reproduced correctly in Microsoft Excel. *

   CREATE TABLE XLTEST (CHAR C(10),DATEFLD D(10))
   INSERT INTO XLTEST VALUES (CHR(165),{01/01/95})
   INSERT INTO XLTEST VALUES (CHR(210)+CHR(211),{01/01/95})
   BROWSE NOWAIT
   COPY TO XLTEST.XLS TYPE XLS


Additional reference words: 2.60a FoxMac
KBCategory: kbinterop kbprb
KBSubcategory: FxinteropExcel


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 16, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.