Microsoft KB Archive/109844

{| = Field Names in First Record Exported to Spreadsheet =
 * width="100%"|

ID: Q109844

The information in this article applies to:


 * Microsoft FoxPro for Windows, versions 2.5, 2.5a, and 2.5b
 * Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a, and 2.5b

SUMMARY
When the COPY TO or EXPORT command is used to export a database to a spreadsheet file type, the first record (row) in the spreadsheet contains the field names of the source database.

MORE INFORMATION
This information applies to the following file types:

DIF, MOD, SYLK, WK1, WKS, WR1, WRK, XLS

Steps to Reproduce Behavior
1. Start FoxPro.

2. Create and run a program with the following code to create Microsoft

Excel spreadsheets using the COPY TO and EXPORT commands:

CREATE TABLE test (charfld C(20), numfld N(10)) INSERT INTO test (charfld, numfld) VALUES ('Chris Tester', 1234) COPY TO copytest.xls TYPE XLS EXPORT TO exp-test.xls TYPE XLS 3. Start Microsoft Excel and load COPYTEST.XLS, then EXP-TEST.XLS. In each spreadsheet, note that the first row contains the field names "charfld" and "numfld." The second row contains the data, "Chris Tester" and "1234."

NOTE: The field names created by FoxPro for Windows are lowercase. The field names created by FoxPro for MS-DOS are uppercase.

Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a 2.50b column 1st KBCategory: kbprg KBSubcategory: FxinteropSpread
 * }