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

ID: Q139160

2.60a MACINTOSH kbinterop kbprb

The information in this article applies to:

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
Keywords          : FxinteropExcel 
Version           : 2.60a
Platform          : MACINTOSH

Last Reviewed: May 17, 1996