Link to home
Start Free TrialLog in
Avatar of Naresh Patel
Naresh PatelFlag for India

asked on

How to convert.xlsx file to .dbf formate

Hi Experts,

i need suggestion to convert .xlsx or .csv file in to .dbf format , in my machine i had installed Visual FoxPro - Access - Excel. please help me out .

Thanks
Avatar of als315
als315
Flag of Russian Federation image

I have no Visual FoxPro, but it should be able to convert csv to dbf.
Look this solution:
https://www.experts-exchange.com/questions/28486269/Import-csv-file-data-into-VFP-table.html
There is also free tool for conversion:
http://www.dbf2002.com/csv-converter/convert-csv-to-dbf.html
Have you tried to open your xlsx file with access, then save file to dbf format ?

Another solution is to use online converters... but I think they are limited.
Avatar of Naresh Patel

ASKER

@als315
Link 1 - i dont understand how to use it  that solution.

Link 2 - Wont allow more than 50 rows in free version.

 @Benjamin MOREAU
i tried Open in Access and save to .DBF but leads to error  "Fields will not fit in records. online solution is limited.

Thanks
Try this online convert :http://www.files-conversion.com/spreadsheet-converter.php

I don't see any limitation.
If you can post the excel file I'm sure someone can help you doing this import
Link to the spreadsheet or csv file.  Link to the FoxPro file.  Create an append query that selects from the first table and appends to the second.  make sure that the FoxPro table has a unique index with whatever passes for an autonumber in FoxPro.  Or create the unique field in Access by importing to a temp table first and then appending from the temp table.
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of GEOFS
GEOFS

You could create a VFP table with fields that match the columns of your CSV, then just add the records from the CSV using APPEND FROM command.
To import CSV by APPEND FROM is not accurate or impossible sometimes. In such case you have to write your own code for this purpose. Good example is e.g. here:  http://fox.wikis.com/wc.dll?Wiki~AppendCSV
I agree that there may be some difficulties with APPEND FROM, but it's a simple thing to try.
Thanks
I removed the Access tag from the question since you didn't actually want an Access answer.
Access Data engine is necessary to read XLSXes via ODBC.
There is no "Access" data engine.  There is Jet (.mdb) and there is ACE (.accdb).  Neither is "Access".  Both data engines are available for download (free) and DO NOT require the installation of Microsoft Access the RAD tool.
Hmm why should we believe you that "There is no "Access" data engine." if Microsoft says

"Microsoft Access Database Engine 2010 Redistributable"

https://www.microsoft.com/en-us/download/details.aspx?id=13255

Of course, RAD tools is something different.
You don't have to believe anything I say but I am a former MS Access MVP.  I'm sure that MS calls the download that to make it easier for people who don't know about the actual architecture to find the tool they need.   The point is that when people say they are using Microsoft Access, they are referring to the product named Microsoft Access which is part of Office and which is NOT free and does NOT need to be installed to use the database engine.  MS Access is dependent on one of the two database engines but only to store its own objects.  Data can be stored in any ODBC complient RDBMS such as Oracle, DB2, SQL Server, etc.  I am surprised though that that database engine is required to get Excel data when you are using Non-Office products.

When Access was first released in the early 90's the Jet database engine did not even shipped with the product because Jet was actually installed as part of Windows.  It wasn't until version 2.0 that Jet shipped "in the box" with Access.
OK, we may agree this is just wording... and I agree everything you wrote in previous post.

OTOH, legal ways how to obtain free MS Access still exist (e.g. BizSpark).

The engine necessity for non-office products is optional but who would process all these XML structures inside the XLSX file tag by tag when much easier way exists?

And this question is about DBF - file format deprecated for Microsoft but still widely used so FoxPro is the right tool to process DBFs. And FoxPro run-time is free and it supports compile command so FoxPro run-time without any paid VFP IDE can be used to handle some simple tasks over DBFs.

FoxPro also has another way of XLSX files processing - OLE Automation but it requires paid Excel installation.
Microsoft has restored the .dbf format for import/export

There is no legal way to obtain a free copy of MS Access.  There are reduced prices for educational and non-profit organizations.  As I said, the database engines (Jet and ACE) are free but not MS Access.  The runtime version of MS Access is free if that is what you are talking about but the runtime engine cannot create or modify applications.  It can only run applications created with the full version of MS Access.
Are you telling you really don't know the BizSpark?

And what do you mean by "Microsoft has restored the .dbf format for import/export"?  As I know the Visual FoxPro DBFs were never possible to import/export to Office products. Just dBase compatible DBFs and this was always a big disadvantage.  Microsoft is not able to support its own DBF format...

Office 2010 included 64 bit driver for dBase DBFs, Office 2013 removed DBF support completely.

Does Office 2016 offer DBF support again? And are you talking about Visual FoxPro DBFs?
I don't work with startups so I've never run into BizSpark but sounds like a good idea if you qualify.

I used A2010 to import/export Visual Foxpro tables.  The feature went away with A2013 and A2016 but seems to be back recently since .dbf is an import/export option again in A2016 although I haven't tried it.