[Solved] Intgrtng Calc/Base:Base recrds on Calc cell contnts

Discuss the spreadsheet application
Post Reply
fabio.prado
Posts: 6
Joined: Tue Apr 01, 2008 4:18 pm

[Solved] Intgrtng Calc/Base:Base recrds on Calc cell contnts

Post by fabio.prado »

What is your question or comment?

I want my Calc spreadsheet to load records from a registered Base document, selected to match a Calc's cell content.

Let's say I have a Customer DB, registered on Base. I want to have a cell in a Calc spreadsheet working like a dropdown box, filled with a "SELECT name FROM customers;" (first question: how to do that?). Then, upon selecting somebody from that drop-down (and eventually clicking a "Update" button on that spreadsheet), the Calc spreadsheet will recover a list of records, like "SELECT * FROM orders WHERE customer_name = <spreadsheet selected value>". I might either want to have a plain dump (filling cells with the SELECT's result set) or to have it number-crunched by an OO Basic macro.

I know it would make more sense not to have record operations outside Base, but the company I work with is not interested in dropping its spreadsheet based management anytime soon. On the other hand, I am not willing to give up on automating jobs and gaining productiveness, despite my company effort to stay sluggish... ;-)

I have made a search for this issue on fora around the 'net, but I was not competent enough to find some concrete clue. So, if anybody can point me out in the right direction, I would be very thankful. I apologise if I am reposting an old and closed topic.

Which version of OpenOffice.org are you using? OpenOffice.org (EN) 2.4
What Operating System (version) are you using? Windows XP Pro

Best regards, Fábio, from Brazil.
Last edited by fabio.prado on Wed Apr 02, 2008 7:05 pm, edited 1 time in total.
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Integrating Calc/Base: Base records on Calc cell contents

Post by Villeroy »

The general concept is:
Register a database (Tools>Options...Base>Databases) so it appears in the datasource window and other office tools.
Hit F4 and drag a table or query into a Writer or Calc document.
In Calc you get a linked import range (see Data>Define...) with several extra features [More Options...]
Parameter substitution from cells is still not implemented, but I can offer a workaround:
http://user.services.openoffice.org/en/ ... php?id=248
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
fabio.prado
Posts: 6
Joined: Tue Apr 01, 2008 4:18 pm

Re: Integrating Calc/Base: Base records on Calc cell contents

Post by fabio.prado »

More slow review of Base forum pointed to a possible solution of my need (I have missed it at first because it works in reverse). I want to move my post to that thread. Must I delete my original post here, and repost there? Or should I mark it as moved? The thread is "Link a spreadsheet to a database file" (http://user.services.openoffice.org/en/ ... f=40&t=247). Sorry for the dust-busting...
fabio.prado
Posts: 6
Joined: Tue Apr 01, 2008 4:18 pm

Re: Integrating Calc/Base: Base records on Calc cell contents

Post by fabio.prado »

Thank you, Villeroy. I have to review it with more attention, but it seems to be what I am looking for. I will come back on this as soon as I can, so I can close the topic if it is the case.
Villeroy wrote:The general concept is:
Register a database (Tools>Options...Base>Databases) so it appears in the datasource window and other office tools.
Hit F4 and drag a table or query into a Writer or Calc document.
In Calc you get a linked import range (see Data>Define...) with several extra features [More Options...]
Parameter substitution from cells is still not implemented, but I can offer a workaround:
http://user.services.openoffice.org/en/ ... php?id=248
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Integrating Calc/Base: Base records on Calc cell contents

Post by Villeroy »

Forgot to mention chapter 5 of my [Tutorial] External Links 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
Post Reply