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?
y-leeAsked:
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.

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

kannan
0

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
slink9Commented:
To do this from within VFP you could use the import wizard.  It imports excel pretty well, I do it every week.
0
jfherringCommented:
or just save it from Excel as a CSV, and append it into a table with the structure you need, csv.
John
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

y-leeAuthor Commented:
yeah u are rite, but i need to change in programmatically in vfp code, but that ok. thanx anyway
0
q2eddieCommented:
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
0
komandurCommented:
.. 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.WorkBooks.Open(<XlsFile>)
xlObject.ActiveWorkbook.SaveAs(xlsname, xlDB4)
xlObject.Quit

kannan
0
q2eddieCommented:
Another excellent suggestion by komandur.  -e2
0
komandurCommented:
.... and have been awarded 'C' for this <g>
0
slink9Commented:
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.
0
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
FoxPro

From novice to tech pro — start learning today.