Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FPD2.6 Reports to excel.

Status
Not open for further replies.

WildSwan

Programmer
Mar 2, 2002
15
0
0
PH
My client needs to have some of the reports to be directed to excel. Anybody have an idea how to accomplish this???
 
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.

Rick
 
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 &quot;live&quot;.

This approach is simplistic and it is not as &quot;pretty&quot; 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.

Rick
 
Rick Bean - Very true

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
 
Thank guys.

JRB:

How do you go about the DDE approach? What materials do I need? Is it available for FPD2.6?

Thanks.
 
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 &quot;Foxpro DDE&quot; and found the following:
File Library At Channel 1: Database
fpw2xl.zip - DDE sample prgs linking FoxPro with Excel

It might be worth doing your own Google search to see what else you might turn up.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
One more Note: DDE is strictly a Windows &quot;thing&quot; - FP DOS knows nothing of Windows, it's API calls, .FLLs or DDEs. JRBs link only applies to FoxPro for Windows.

Rick
 
Rick - you are again correct.

I neglected to notice: &quot;Is it available for FPD2.6&quot;

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top