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!

Exporting/Print Table's Field Structure

Status
Not open for further replies.

rooship

IS-IT--Management
Jun 25, 2003
20
Hello,
Is there any better/efficient way to print the field structure of a .dbf table? I am currently using list stru command to print the structure, but all the information doesnt print on a single line, and is not easily readable. Any comments/ideas will be appreciated.

Thanks for your time.
 

Depends on how often you need it.

If you need a pretty printout once in a while, for documentation and reference purposes, my favorite method would be this.

First,
LIST STRUCTURE TO FILE MyFile.TXT

Then,
Open the file with Excel; it will recognize the file as fixed width (and would ask you to adjust the dividers if needed), and you can add some formatting touches, then print it out.
 
Thanks for your tip. Isnt there any other solution besides using ListStru?

Thanks
 

Well, you can try

COPY STRUCTURE EXTENDED TO MyFile1
USE MyFile IN 0
COPY TO MyFile2 TYPE XLS

or experiment with AFIELDS() and STRTOFILE() if you wish,
but I personally prefer LIST STRUCTURE.
 

There are several utilities floating around that will do this. I found one once that exported a neatly formatted table structure to Word via Automation. I can't remember where I found it or who wrote it, but maybe a Google search would turn it up.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top