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

converting excel tables to foxpro tables

Status
Not open for further replies.

ejhemler

Programmer
Aug 30, 2002
68
US
i have a table in excel format and need to convert it to a foxpro table. i know that there is a command to convert foxpro tables to excel tables, but is it possible to do it the other way around. if so, then could you help? thanks,
Erik
 
ejhemler

You can save the Excel sheet as a DBF format. Or you can use the import (File->Import) and save as a table. Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Erik,
You can also use automation to "read" the values from the spreadsheet, and load up the table yourself in code. (If you have dates in the Excel "table", you're going to have to convert these anyway.)
There are a number of threads on automating Excel here, just do a search.

Rick


 
You can use IMPORT. From MSDN:
IMPORT FROM FileName
[DATABASE DatabaseName [NAME LongTableName]]
[TYPE] FW2 | MOD | PDOX | RPD | WK1
| WK3 | WKS | WR1 | WRK | XLS
| XL5 [SHEET cSheetName]
| XL8 [SHEET cSheetName]
[AS nCodePage]
From my code:
IMPORT FROM M->DskPath + 'X.xls' XL5 SHEET control
Monika from Warszawa (Poland)
(monikai@yahoo.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top