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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Table Header 2

Status
Not open for further replies.

Polly66

Programmer
Nov 3, 2001
42
AU
Hi all,

Does anyone know what is required to change table headers so that VFP9 tables can be opened with MS Access or Excel.

Bill shepherd
 

Bill,

Why would you want to do that? It would be safer and easier to find a way of exporting the data.

For example, you could:

- Copy the data to a CSV file, which Excel can then open natively.

- Ditto with a Fox2x type table.

- Use VFP's EXPORT command (or Export Wizard) to export the data to Excel.

- Open the VFP table in Access via ODBC (File /Get External Data / Import / ODBC).

- Use Automation to transfer the data to Access or Excel (there are many examples of the required code floating around here).

All these are better than hacking the file structure.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
USE thetable
COPY TO SomeName TYPE FOX2X

This will create a copy that Access and Excel can use.

It would be better, though, to have Access and Excel read the table using the vfp oledb provider.
 
Thanks guys,

I only ever wanted to supply a subset of information that maybe users could easilly manipulate in say excell for graphing purposes. I know I could copy to type fox2 etc, but, just thought this may be easier and copy is a bit messy.

Thanks in particular Mike, as after thinking about this, ODBC is probably the way to go.

Regards
Bill
 
Bill,

if you want to supply a subset to users to be able to use in MS Excell i would advise you to create in FoxPro a cursor with meaningfull headings and export that cursor to a [COLOR=blue ]yourfile.xls type xl5 [/color] this is by my opionion the most user friendly approach.

Jockey
 
Jockey,

Thank you for what is another excellent suggestion. I really appreciate your time in reading and responding to my problem.

Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top