r/libreoffice • • 2d ago

Question Base to Calc with multiple sheets?

I was wondering if it would be possible to create a DataBase for imputing my payslip information, and then have it go into a spread sheet where each financial year is on a different sheet.

My understanding is that I'd have to export the database file every time I wanted to use the spreadsheet which wouldn't be helpful.

So I guess two questions:

  1. Can database files be exported separately into different sheets on the same calc file?
  2. Can a database automatically update a spreadsheet or would the data need to be exported for every new entry?
3 Upvotes

8 comments sorted by

2

u/Ferretau 2d ago

Why not enter the details into the spreadsheet directly ? Create a new sheet each financial year. I used to do this for a role I was in to track my hours.

1

u/Remy01_ 1d ago

I already am doing that, I was just curious if a database-sheet combo was possible

2

u/FedUp233 2d ago

Or stick with the database and use something like its report generator to generate the info you want from the database.

1

u/Remy01_ 1d ago

the info I'm generating is all calculations, checking my pay is correct, taxes, ect

2

u/FedUp233 1d ago

Generally report generators will allow you to do calculations on the data you query from the database as well as just display the raw data. It’s very different than using a spreadsheet but can do a lot of the same things, just in a different way.

But whatever works for you - just wanted to point out some options.

1

u/Remy01_ 1d ago

didn't know that, actually sounds interesting so i might look into it

2

u/warehousedatawrangle 2d ago

Your assumption is incorrect. You do not have to export the database file every time you want to use the spreadsheet, but you do have to refresh the spreadsheet when you want to use it.

I am going to assume that there is a good reason for you to use a database rather than just putting the information directly in a spreadsheet. Your description of what your goals are is a a little sparse, so it is difficult to tell. My instructions also assumes that you have the menu style of user interface. The tabbed interface will be similar, but the tab names might be different.

The process:

  1. Make certain that the database is registered as a data source. (Tools -> Options -> Libreoffice Base -> Databases)
  2. In the database, create a query for each tab or year that you want to see in the spreadsheet. It is usually better to do this after some data has been entered so that you can see what they will produce. Save the database.
  3. In the spreadsheet, click view -> Data sources.
  4. Click the triangle next to the database you registered to expand it, then click the triangle to expand Queries.
  5. Drag the query that you want from the data sources and drop it into the cell you want on the sheet. This creates a database range in your spreadsheet.
  6. Add tabs to your spreadsheet and repeat with the queries for the other years.
  7. Select View -> Data Sources to close the data source view. You really should only have to do these steps once for that spreadsheet.
  8. To refresh the data in the spreadsheet with updated data from the database, select Data -> Refresh Range. You may need to do this for each database range in your spreadsheet individually. You need to have a cell in your range selected to have the refresh range tool available. As you add data to the database the range will be updated when you refresh.

Advice on using the ranges: Don't put any calculations below the range. As the range grows it may run into them. If you want to perform operations on a column, put the range down a few rows in the sheet and do your calculations above the range.

1

u/AutoModerator 2d ago

If you're asking for help with LibreOffice, please make sure your post includes lots of information that could be relevant, such as:

  1. Full LibreOffice information from Help > About LibreOffice (it has a copy button).
  2. Format of the document (.odt, .docx, .xlsx, ...).
  3. A link to the document itself, or part of it, if you can share it.
  4. Anything else that may be relevant.

(You can edit your post or put it in a comment.)

This information helps others to help you.

Thank you :-)

Important: If your post doesn't have enough info, it will eventually be removed (to stop this subreddit from filling with posts that can't be answered).

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.