Smart questions
Smart answers
Smart people
Join Tek-Tips Forums

Member Login

Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

ulnaoar (TechnicalUser) (OP)
8 Jun 05 16:13
Hi there, I don't know how to write codes, but is there a way to export a foxpro table to excel worksheet? Thanks.
mgagnon (Programmer)
8 Jun 05 16:18

Use a product called XFRX it can be found here.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.

TamarGranor (Programmer)
8 Jun 05 16:20
You can do this interactively using the Export Wizard (File | Export on the menu) or from the Command Window or a program with:

USE MyTable

tvign (Programmer)
8 Jun 05 16:22
You can use either COPY TO or EXPORT with the TYPE parameter.  I use TYPE XL5.

mtchary (Programmer)
13 Jun 05 7:23
You might want to use FRX2Any's Document Generater -
There is a sample of using in \Samples\Document generation\ folder.
You can programmatically create HTML, RTF, EXCEL, PDF, and IMAGE file/document.

ulnaoar (TechnicalUser) (OP)
13 Jun 05 21:48
Thanks everyone for the solutions!
fretboard (Programmer)
17 Jun 05 19:10
use mydbf in 0
export to c:\mydbf.xls type xls
ulnaoar (TechnicalUser) (OP)
18 Aug 05 16:55
hello, it's TYPE XL5 OR XLS? Thanks!
teresas (Programmer)
18 Aug 05 22:43
TYPE XLS creates Excel 2.0. TYPE XL5 creates Excel 5.0.
ulnaoar (TechnicalUser) (OP)
18 Aug 05 23:10
thanks for your response. but how do I know if I need Excel 2.0 or Excel 5.0, I only I am using MS Office 2000.
alvechurchdata (Programmer)
19 Aug 05 3:11


how do I know if I need Excel 2.0 or Excel 5.0, I only I am using MS Office 2000.

Use Excel 5. It can handle more rows than Excel 2.

Geoff Franklin

ulnaoar (TechnicalUser) (OP)
19 Aug 05 10:17
If I got more rows than it can handle, can I use condition when I use command "copy to", for example, "while date >=01-Jan-2000"? Thanks!
JimWWinter (Programmer)
19 Aug 05 10:48
Yes, and you can also use a FOR condition.

ulnaoar (TechnicalUser) (OP)
19 Aug 05 11:14
Could you please kindly give an example and show me how to write the command, sorry I am not familiar with Foxpro commands. Thanks Jim.
Stella740pl (Programmer)
19 Aug 05 11:22

COPY TO ... TYPE XL5 FOR date>={01/01/2000}
COPY TO ... TYPE XL5 FOR date>=DATE(2000,01,01)
COPY TO ... FOR date>=DATE(2000,01,01) TYPE XL5

In your case, with FOR clause you will be better off than with WHILE.
ulnaoar (TechnicalUser) (OP)
19 Aug 05 11:39
Thank you very much for your help!
furmious (TechnicalUser)
24 Aug 05 13:48
Hummmm... I just tried in FoxPro 6.0 to write out a table using the XL5 and got an extension wk1 spreadsheet. Does this only work with later versions of FoxPro?
alvechurchdata (Programmer)
24 Aug 05 13:58
[quote]Does this only work with later versions of FoxPro?[\quote]

COPY TO TEST TYPE XL5 produces test.xls file in my VFP6. Could you post the line of code which produced a WK1 extension?

Geoff Franklin

furmious (TechnicalUser)
24 Aug 05 13:58
Forget previous post. It would help if I had been looking in the folder I had written to. Now I don't know where I got the wk1 from... Oh well.
alvechurchdata (Programmer)
24 Aug 05 14:50


It would help if I had been looking in the folder I had written to.
Your first "senior moment"?

Geoff Franklin

Nifrabar (Programmer)
8 Sep 05 16:08
wk1-file is from Lotus123 spreadsheet though?

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close