How to insert checkbox in cells?

I am trying to insert clickable checkboxes in Calc cells but have not been able to figure out how to do it.

edit retag close merge delete

Is the question about how to insert form controls, or how to get the checkboxes to work? If the latter, then what do you want to happen when a checkbox is clicked?

( 2017-11-26 12:11:12 +0200 )edit

I am wanting to create a spreadsheet with checkboxes that can be checked to indicate the item(s) in that row have been completed. So I am looking for an interactive something that might be a bit more visually appealing than just creating a drop list of 'yes' and 'no' or something like that.

( 2017-11-29 20:10:27 +0200 )edit

Sort by » oldest newest most voted

It is possible to insert hyperlinks in cells which can be formatted to look like buttons. This is done by =HYPERLINK()as in https://ask.libreoffice.org/en/questi....

However, this will not work for checkboxes. For that, enable the Form Controls toolbar by going to View -> Toolbars -> Form Controls.

EDIT:

Here is an example: checkboxes.ods

To check or uncheck the boxes, be sure that Edit -> Design Mode is turned off and click on a box.

In this example, I right-clicked on the checkboxes in Design Mode and selected Control. Under the Data tab, I assigned C2 to Linked Cell (and C3 and so on for the other checkboxes). However, the cell links did not save in LO 5.4.0.3, which may be a bug with this version, because it works in AOO 4.1.3.

more

Thank you for your response, it does not seem like this would be an interactive solution, so I am not sure that this is what I am looking for...but thank you nevertheless.

( 2017-11-29 20:12:41 +0200 )edit

( 2017-11-29 23:42:49 +0200 )edit

( 2017-11-30 00:13:31 +0200 )edit

You only can anchor a Form Control to a cell (like any shape). you cannot make it the content of the cell (or part of this content).
To change the anchor type use the context (rightclick) menu in design mode.

Editing:
The type of anchoring is only of meaning concerning the behaviour of a control if columns/rows are inserted/deleted or changed in size. The control as an object always belongs to the DrawPage of the sheet. This does again not mean much. To get a functionallity a Checkbox in a spreadsheet is commonly used by assigning a 'Linked Cell' where a value will be generated depending on the state of the CheckBox. In addition you may also define a Sub to be called on different events. If there are more questions, please try to ask specifically.

When I wrote the above answer and amendment, I had not yet learned that there was a bug concerning the linked cells: tdf#113584. Due to this bug there may have occured misunderstandings. The example by @Jim K will do what was asked for if opened with a proper version.

What do you want the CheckBox to do for you?

more

Would changing the anchor type allow it to be an interactive type of anchor so that I could click to check it or uncheck it?

( 2017-11-29 20:14:06 +0200 )edit

I do not understand what you expect of the anchor. The interaction with the program a user takes part in shall cause an action on the part of the program, I think. This way form controls (including check boxes) work, and this way can also work a hyperlinks present in cells either due to creation by the user who designed and filled the sheet or due to the result a call to HYPERLINK() returns.
The details can be very different, however.

( 2017-11-29 21:34:02 +0200 )edit

Perhaps I am not correctly identifying what it is that I would like... As the spreadsheet creator I would like to insert something into a cell that the user would then be able to interact with. For example, a star system if I am asking the use if they like or dislike something, they would have the ability to select one to say five stars based upon their preference, or say I am asking them if they have these items, and they could check the boxes in the columns that would indicate they have them.

( 2017-11-29 23:35:49 +0200 )edit

I hope that better explains what it is that I am getting at. So far I have not found out how to insert anything like the above in the cells so that it looks a bit like that overpriced other program that M Soft sells, lol.

( 2017-11-29 23:37:25 +0200 )edit
1

Yes. I think I understood your request in this sense, and I think @Jim K understood it in the same way.
The example he attached does, however, not work in some recent versions of LibO Calc due to the bug tdf#113584 . Use a version of the 5.3. series to see the example work.
In the V6.0.0 to come the bug seems to be absent as I just tested with the Dev Beta1.

( 2017-11-30 00:11:05 +0200 )edit

Thank you all very much for your input, I really appreciate your patience and the time you took to share this info with me.

( 2017-11-30 01:07:30 +0200 )edit