Ask Your Question

Is it possible to add a form/table/query from database to a sheet in calc.

asked 2018-11-03 17:31:39 +0200

R den Hartigh gravatar image

updated 2018-11-03 18:05:00 +0200

Ratslinger gravatar image

Not just the text but being able to update the info, if so how?

I created a table, query and form in base; Now, I like to update and display that in my sheets in calc. Is this possible?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2018-11-03 18:04:11 +0200

Ratslinger gravatar image

updated 2018-11-05 18:35:28 +0200


Data from a database is available to all modules if the database is registered. This data is then accessible using View->Data Sources or Ctrl+Shift+F4. With this the table data and query output is available.

You cannot just bring a form from Base into Calc. You would have to create a Form in Calc itself.

As for updating the data from Calc back to Base would require specific macro coding. There is no simple solution for this.

It appears you are trying to replace Base as the front end to the database with Calc. Maybe a description of why you want to do this may provide further insight.

Edit 2018-11-05:

A few notes first. Please understand this forum is designed to ask a question and get an answer. Subsequent questions should be asked as new questions. This helps others searching for similar answers find what they need and not needing to dig through each answer for detains not posted in the question. Also, understand there is a lot to comprehend regarding Base and databases. Many new items come into play just as in Calc or Writer or other modules. It is a learning curve not accomplished overnight.

With that said, have put together a rough sample based upon your stated need. Instead of using many buttons, the form starts with a list box. The list box contains the a time period to work with. Make a selection and press the button to view/modify/enter events. There are two different versions of this - using individual fields and using a table control. Wanted to show different ways of accomplishing same thing. There are other ways and many variations.

The selection process is done using table filtering. For more information on this see this post -> Filter/Search with Forms (leveraging SubForms).

Also helpful, if you have not discovered already, is the LO Base documentation found here -> LibreOffice Base Handbook

There is no macro coding present. In most cases macros are not necessary.

Sample ------ TaskCalendar.odb

edit flag offensive delete link more


@R den Hartigh Unfortunately watching tutorials will probably be of little help especially concerning macros. LO macros take some time to learn. In your case knowledge of both Calc and Base/database specific coding. To give you a sense of it, refer to Open Office Macros Explained by Andrew Pitonyak. PDF here ->OOME

Ratslinger gravatar imageRatslinger ( 2018-11-03 19:00:30 +0200 )edit

Also, it is still not clear as to why you need Calc. Seems you should be able to do all that is wanted in Base and not worry about data transfer & macros.

Ratslinger gravatar imageRatslinger ( 2018-11-03 19:03:07 +0200 )edit

answered 2018-11-03 18:27:41 +0200

R den Hartigh gravatar image

updated 2018-11-03 18:42:20 +0200

Thanks for the response. You are right. I am trying to use calc as front end. I am creating a orchard management system. Monthly Task Calenders, Invoicing, Employees, Financial, Stock, Pricing and so on... I have everything in calc over different sheets. Life would be so much easier if I have access to a database and that the information can be accessed over multiple sheets.

I did find the registered databases and I can easily copy it into the sheet but it doesn't update if I change that. I understand that I probably need to use specific macro coding. Not that I have any clue how to but I will watch some more tutorials. Maybe you can give me a few hints or examples?

Currently I am creating a task calendar. Dropdown box with the months and every month has 31 dynamic text boxes where I can write the tasks.

edit flag offensive delete link more


@R den Hartigh Please do not use answers unless it is to actually answer the original question. Instead use comment(s) or edit your original question to add additional information & note that information as edited.

Ratslinger gravatar imageRatslinger ( 2018-11-03 18:54:09 +0200 )edit

@Ratslinger Not a problem, will do! Thanks for the explanation, I have decided to continue my project in base. I am still struggling with the task calendar: I have created a standalone form. On the top 12 push buttons- January to December. Under that I created a textbox. I would like to have the text in the textbox changed when I push the related button. I have not created any tables or queries as yet because I don't know how to set this up.

R den Hartigh gravatar imageR den Hartigh ( 2018-11-05 11:47:53 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-11-03 17:31:39 +0200

Seen: 88 times

Last updated: Nov 05 '18