Within the Foxpro development environment you have a COMMAND window. That is where you type your commands for user inter-active work during development. Eventually you will most likely write a program (PRG) file that will contain your commands and from which you will execute.
But for now to open the DBF table into your Foxpro environment, you can use the command
Code:
USE <dbf name>
With the older Foxpro versions you will need to use the older 8.3 filename format. If your file name and/or the directory path names are longer than that format, you will need to use the abbreviated name similar to how they will show in the DOS command windows.
Now you can do what jrbbldr advised you - to open a table through FoxPro (with USE <dbf name> command) and to export it to Excel (with COPY TO <ExcelFile> TYPE XLS or COPY TO <ExcelFile> TYPE XL5)
All above solutions are OK when you need to export bare data into Excel, but what if you want to have ready-to-view Excel "reports" with cell formatting, page headers etc? Up to now my solution was to make a sample of the desired Excel form, save it as .XML spreadsheet, then place its content into TEXT/ENDTEXT, substitute necessary header fields through << >> with SET TEXTMERGE ON, and replicate the "details" line in a SCAN loop. Resulting .XML reports would be successfully opened by Excel as native. Of course, it eventually becomes hell of the rework when the shape of the report needs more than few minor changes. Maybe there's a more elegant way to do it?
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.