[Solved] Best way to import info from dbf files

Discuss the spreadsheet application
Post Reply
fergus
Posts: 32
Joined: Wed Nov 26, 2008 3:34 am

[Solved] Best way to import info from dbf files

Post by fergus »

I am analysing and looking at data that is contained in 3 separate dbf files. I will be doing this a couple of times a week but each time I do this, I will be looking at a completely different set of 3 dbf files with different names.

Some (not all) of the data in the dbf files needs to go into a page on the spreadsheet where I can look at it in an order that suits me and suits the calculations I will be doing on it.

The only way I know how to do this is by copying and pasting (or importing) the 3 dbf files into three separate pages on the spreadsheet and from there I will be able to get the data I need into a fourth page, in the order I need.

I am happy enough to do this if I have to but am wondering if anyone knows of a better way to get the data into the spreadsheet and placed on a page in the order I want it to be.
Last edited by fergus on Sat Jul 04, 2009 2:56 am, edited 2 times in total.
OOo 3.3.0 on MS Windows Vista
Dave
Posts: 1011
Joined: Sun Dec 23, 2007 6:53 pm

Re: Best way to import info from dbf files

Post by Dave »

Having no idea of the type of data, or your ordering requirements, it's difficult. However, dbf files can be saved as csv files, and a program like CSVed will concatentate [append] them. You can then bring that file into the spreadsheet to order things as you want, or use the csv editor, or a plain text editor. It all depends on your [more] specific needs.

David.
fergus
Posts: 32
Joined: Wed Nov 26, 2008 3:34 am

Re: Best way to import info from dbf files

Post by fergus »

Thanks for your response. You have basically answered my question for me as it seems that whatever way I go about doing this is going to involve a few steps.

I will download and take a look at CSVed and see if it helps provide me with a better overall solution.
OOo 3.3.0 on MS Windows Vista
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] Best way to import info from dbf files

Post by Villeroy »

A dbf file contains a table of a dBase database. Many database tools can handle this database in a directory.
OOo's dBase driver supports fields with different field types and indices for fast lookups. Relations between tables are not supported.
If you edit DBF files in non-database programs you always are at risk to make the table inconsistant and lose important features.

Within this office suite OOo Base provides very convenient ways to use dBase files as what they are meant to be without taking the risk to damage the tables. The idea is to create a repository of database tables from where you can link or copy filtered and sorted rows into any office document.
Store all of your dBase files in a dedicated directory.
menu:File>New>Database...
[x] Connect to existing database
Type: dBase
Specify the directory
[x]Register the database
Store the database document, which at this point is just a configuration file how to access the dbf files in the database directory.
Each dbf file is shown as a database table. Additional queries allow simple access to subsets of your tables (filtered and sorted virtual tables).
Registered datasources from dBase directories are directly editable in the beamer window.
Although relations between dBase tables are not supported, you can use forms to mimic those relations (show all records in table A with a corresponding entry in B).

You can use several drag&drop techniques to import row sets and multiple selections of rows into office documents. [Tutorial] Using registered datasources in Calc
This way you get also automatically resizing import ranges which is far more convenient than dBase tables opened directly in Calc.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
mriosv
Volunteer
Posts: 651
Joined: Mon Mar 09, 2009 1:12 am
Location: Galiza (España)

Re: [Solved] Best way to import info from dbf files

Post by mriosv »

Another way is use Insert/sheet selecting Link.
LibreOffice 3.5.4 AOo-3.4 on Win 7 Ultimate
fergus
Posts: 32
Joined: Wed Nov 26, 2008 3:34 am

Re: [Solved] Best way to import info from dbf files

Post by fergus »

Villeroy, I read what you had to say about using Base and created a dedicated directory as suggested. I also had a look at the tutorial you provided the link for.

This is a good solution for what I am doing.

Thanks.
OOo 3.3.0 on MS Windows Vista
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] Best way to import info from dbf files

Post by Villeroy »

fergus wrote:Villeroy, I read what you had to say about using Base and created a dedicated directory as suggested. I also had a look at the tutorial you provided the link for.

This is a good solution for what I am doing.

Thanks.
Well, you asked for the best way.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply