use infro from calc in writer?

Is it possible to set up a template system so a writer template can take info from a calc document to avoid me inserting the indfo into two document types?
[169 byte] By [pspeakman] at [2007-11-25 23:09:43]
# 1

There are a lot of potential answers to this question depending on what you are trying to accomplish. Could you be more specific?

Also please indicate whether you are using functions in your spreadsheet or just storing information there like names and addresses.

Do you know how to register a data source and, in connection with this, what version of SO are you using?

JohnV at 2007-7-5 18:00:14 > top of Java-index,StarOffice,StarSuite...
# 2

ou asked what version of SO im using i wanted to ask about Open Office am i in the wrong place, if not, more details follow.

Open office org 2.0

I am storing a list of house details, price, number of rooms etc in a spreadsheet, no functions, nothing clever (this information is for our reference) and i also need a writer document so I can present the information in a more pleasant way for customers. The writer document also includes one picture

pspeakman at 2007-7-5 18:00:14 > top of Java-index,StarOffice,StarSuite...
# 3

Well, in theory you are in the wrong place for OOo but since its the same code base as SO your close. An excellent forum for OOo is www.oooforum.org.

OK, no functions in your spreadsheet. Good, this simplfies things but functions or not your spreadsheet needs to be set up correctly. The first row should contain field names in each column something like this:

Owner, Address, Price, Rooms,Baths, etc.

The info for each house goes in the rows below this. Each of these rows is call a Record in database lingo which consists of the separate pieces of information called Fields.

I highly recommend that you open your spreadsheet and do a Save As to dBase format as this will allow you to edit it directly from any Writer document as I will point out later.

First you must register the file as a data source. Do File > New > Database and choose CONNECT to existing database. Type is dBase then browse to the dBase file's directory. You won't see the file name because, in the case of dBase files, you just register the directory and any dBase file you store there will be a separate data source.

You have completed the important part of this wizard so just go through the next couple of steps and close the file. You have just set up a Base file which will have a .odb extension and you don't want to inadvertantly delete it.

Now open a Writer document and press F4. This will open the data source viewer. Clicking the + by the items on the left open your database and below that the Tables item. Click the name of your table or sheet. The field names and record data will appear on the right.

Now say you want your information sheet to look something like:

Location: x

Price: x

Rooms: x

etc.

Just type in this stuff and where the x is drag and drop the corresponding field name. When happy with this form save it as a template so you can use it for any house. Close the file and then open the template but don't use the recent file list to do this.

You should have UntitledX. Do the F4 thing again. There is a gray button to the left of each record. Click the one next to the house you want a data sheet for. Above the field names there is a Data to Fields icon (4th from right). Click this and the data will flow into your document. (If you still just see field names make sure View > Field Names is not checked [Ctrl+F9 will toggles this])

As promised you can now edit the dBase file. Say you get a new listing tomorrow. Just open your template (or any Writer doc), do the F4 thing and enter the data for your new house in the first empty row. If you find that you need more fields in the dBase file then open it (will open in Calc), add new field names and save back to dBase format.

I haven't covered inserting the picture. I assume it's of the house and that you know how to do this.

JohnV at 2007-7-5 18:00:14 > top of Java-index,StarOffice,StarSuite...
# 4
Thanks for the reply that is very helpful, one small extra question, does the info have to be horizontal, as what we currently have set up is a spreadsheet, with the info more simply set out but still vertical, for ease of reading.Phil
pspeakman at 2007-7-5 18:00:14 > top of Java-index,StarOffice,StarSuite...