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

Import title of column from EXCEL

Status
Not open for further replies.

Mistral2

Technical User
Nov 12, 2002
21
TN
When I import from EXCEL to foxpro:

IMPORT FROM MyFile.XLS TYPE XL8 SHEET " SHEET1 "

I get MyFile.dbf where the fields are called (a,b,c etc....) instead of the name of the columns of my MyFile.XLS.

Thank you

 
Mistral2,

In that case, one possibility would be to import the table as usual, then use ALTER TABLE to rename the fields according the contents of the first record, then delete the first record.

Another idea would be to do the whole thing through Automation, but that would involve a bit more code.

Mike

Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
another thought. if your table format is known, use the append from.

Attitude is Everything
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top