How to convert Excel file into foxpro .DBF file?

help me.. i got foxpro file, and i wanna convert it into foxpro dbf. how can i do that?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

going by your subject, I presume you want to convert xls to dbf. Open the XLS in excel and 'save as' DBF.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
To do this from within VFP you could use the import wizard.  It imports excel pretty well, I do it every week.
or just save it from Excel as a CSV, and append it into a table with the structure you need, csv.
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

y-leeAuthor Commented:
yeah u are rite, but i need to change in programmatically in vfp code, but that ok. thanx anyway
Hey, y-lee.

You would have got a better answer if you said that you want to change "programmatically".  You did not need to select answer so quickly.

#Sample Code
<------------ Sample Test Code #1 Begins ------------->
create cursor imported_data ( ;
  a C(40), b C(40), c C(40), d C(40), e C(40), ;
  f C(40), g C(40), h C(40), i C(40), j C(60) ;
select imported_data
append FROM (cFileName) TYPE XL8
<------------ Sample Test Code #1 Ends ------------->

<------------ Sample Test Code #2 Begins ------------->
import from (cFileName) type xl8
<------------ Sample Test Code #2 Ends ------------->

Bye. -e2
.. or do this if you don't know the number of columns involved and the conversion to be done by excel..this should work in most version of excel.

#DEFINE xlDB4 11
xlObject = CREATEOBJECT("", "Excel.Application")
xlObject.ActiveWorkbook.SaveAs(xlsname, xlDB4)

Another excellent suggestion by komandur.  -e2
.... and have been awarded 'C' for this <g>
I am glad that we can't get F's.  If those could be given I am sure they would be!!!  Since a C is double the points, I would guess a D would be single points and an F would give the questioner that number of points.  That sounds like a good idea.  I post a 300 point question, you give an excellent answer, I give an F and get point along with the excellent answer.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.