While there are a couple "solutions" to this for VFP, there really isn't anything available for FPD. The best you can do is put out a report into a .TXT file for Excel to import, or to write it to a .DBF - Excel can import these too.
If you can put the data into a table where each record's field contents would represent the Excel row cell contents, then you can use the:
SELECT ExcelDBF
COPY TO <ExcelFile.xls> XLS
You can also use the FIELDS option of the above to only output certain desired fields (see Foxpro Help for COPY TO command).
And you can use the GETFILE() or GETDIR() to allow the user to specify where the Excel File will "live".
This approach is simplistic and it is not as "pretty" as might be acheived with a VFP solution, but it is functional.
Good Luck,
JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
Note on JRB's answer: If you use the XLS format, note that the file format will be for version 2.0, and all current versions will ask you to convert this to a newer version of Excel spreadsheet if the user changes anything.
As I said above, the COPY TO <ExcelFile.xls> XLS approach is simplistic. It does indeed include this irritation, but many users find it maybe not ideal, but acceptable.
You could also look into entering data into the Excel file using DDE, but it is a pretty cumbersome approach.
Good Luck,
JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
A VERY long time ago I did a FPW 2.6 to Word application using DDE to create graphical report documents which could then be modem transmitted or FAX'd into a central office. But it has been so long I don't remember most of what I did. Admittedly when I need to do the same type of work today I use VFP and OLE.
But there are a lot of other folks on this forum and, hopefully, one of them is more current on FP & DDE.
However I did a Google search on "Foxpro DDE" and found the following:
File Library At Channel 1: Database
fpw2xl.zip - DDE sample prgs linking FoxPro with Excel
One more Note: DDE is strictly a Windows "thing" - FP DOS knows nothing of Windows, it's API calls, .FLLs or DDEs. JRBs link only applies to FoxPro for Windows.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.