[Solved] Adding a Checkbox on a Stylesheet on Calc with Java
-
- Posts: 7
- Joined: Wed Oct 28, 2020 9:40 am
[Solved] Adding a Checkbox on a Stylesheet on Calc with Java
Hi guys,
I would like to add a checkbox on a Sheet on Calc program using Java code.
Now, I have all the code to connect to the file, but I don't know how add a checkbox on the sheet and using after that in my code.
I will be so happy if you could say how do it and where I could find a good reference of the API for Java.
Thanks.
I would like to add a checkbox on a Sheet on Calc program using Java code.
Now, I have all the code to connect to the file, but I don't know how add a checkbox on the sheet and using after that in my code.
I will be so happy if you could say how do it and where I could find a good reference of the API for Java.
Thanks.
Last edited by Hagar Delest on Fri Oct 30, 2020 12:33 pm, edited 1 time in total.
Reason: tagged solved
Reason: tagged solved
OpenOffice 4.1.17 on Windows 10
Java developer
Java developer
Re: Adding a Checkbox on a Stylesheet on Calc with Java
Put it onto the sheet manually, and control the visibility of it by your code.
The LO API is same for every programming languages. (maybe you can not control/handle some feature in one or the other IDE/language, but the API functions, procedures and objects are same.)
The LO API is same for every programming languages. (maybe you can not control/handle some feature in one or the other IDE/language, but the API functions, procedures and objects are same.)
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Adding a Checkbox on a Stylesheet on Calc with Java
There appear to be very few people using OO with Java and therefore relatively few resources available and few people to help you. You'll usually be able to find what you want to do in Basic and will have to translate.
https://wiki.openoffice.org/wiki/Docume ... and_Shapes
https://wiki.openoffice.org/wiki/Docume ... and_Shapes
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
-
- Posts: 7
- Joined: Wed Oct 28, 2020 9:40 am
Re: Adding a Checkbox on a Stylesheet on Calc with Java
How can I control the visibility of it by code? Sorry, but I'm learning this API.Zizi64 wrote:Put it onto the sheet manually, and control the visibility of it by your code.
The LO API is same for every programming languages. (maybe you can not control/handle some feature in one or the other IDE/language, but the API functions, procedures and objects are same.)
Thanks for your help.
OpenOffice 4.1.17 on Windows 10
Java developer
Java developer
-
- Posts: 7
- Joined: Wed Oct 28, 2020 9:40 am
Re: Adding a Checkbox on a Stylesheet on Calc with Java
This link is wonderfull for my needs. Thank you so much.JeJe wrote:There appear to be very few people using OO with Java and therefore relatively few resources available and few people to help you. You'll usually be able to find what you want to do in Basic and will have to translate.
https://wiki.openoffice.org/wiki/Docume ... and_Shapes
OpenOffice 4.1.17 on Windows 10
Java developer
Java developer
Re: Adding a Checkbox on a Stylesheet on Calc with Java
Setting the visibility is an example of what I was saying about finding it in Basic and translating. The API is the same for all languages
viewtopic.php?f=20&t=27081
.setvisible(false) or .setvisible(true)
viewtopic.php?f=20&t=27081
.setvisible(false) or .setvisible(true)
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: Adding a Checkbox on a Stylesheet on Calc with Java
You might find MRI helps. You can inspect an object and easily see all its properties and methods such as setvisible.
https://extensions.openoffice.org/en/pr ... ction-tool
It can help you write your code, for example
viewtopic.php?t=55835#p245258
https://extensions.openoffice.org/en/pr ... ction-tool
It can help you write your code, for example
viewtopic.php?t=55835#p245258
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: Adding a Checkbox on a Stylesheet on Calc with Java
Generating complex form documents by code is a misconception. Simply use templates. Templates provide the core functionality of any office suite.
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
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
- Posts: 7
- Joined: Wed Oct 28, 2020 9:40 am
Re: Adding a Checkbox on a Stylesheet on Calc with Java
Very useful. I will try it.JeJe wrote:You might find MRI helps. You can inspect an object and easily see all its properties and methods such as setvisible.
https://extensions.openoffice.org/en/pr ... ction-tool
It can help you write your code, for example
viewtopic.php?t=55835#p245258
OpenOffice 4.1.17 on Windows 10
Java developer
Java developer
-
- Posts: 7
- Joined: Wed Oct 28, 2020 9:40 am
Re: Adding a Checkbox on a Stylesheet on Calc with Java
I will study this option. Thanks.Villeroy wrote:Generating complex form documents by code is a misconception. Simply use templates. Templates provide the core functionality of any office suite.
OpenOffice 4.1.17 on Windows 10
Java developer
Java developer
Re: Adding a Checkbox on a Stylesheet on Calc with Java
A template is an almost normal office document with all the layout, formatting, form controls and contents except for content that needs to be added by a user. A template opens as a new document with a document title like "Untitled 1". When the user saves it, he will be prompted for the path name of a new document. You open a letter template for a new letter and type in the letter text. You open a productivity template for a new profit calculation with all layout, formatting, input cells and formulas predefined. SInce more than 30 years, this is the core of office software and it does not require any kind of programming skills.
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
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
- Volunteer
- Posts: 1547
- Joined: Wed Jun 24, 2015 12:56 am
- Location: Colorado, USA
Re: Adding a Checkbox on a Stylesheet on Calc with Java
Look at this link for using the LO/OO API in JAVA
http://fivedots.coe.psu.ac.th/~ad/jlop/#contents
I believe chapter 40 discusses checkboxes
http://fivedots.coe.psu.ac.th/~ad/jlop/#contents
I believe chapter 40 discusses checkboxes
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
-
- Posts: 7
- Joined: Wed Oct 28, 2020 9:40 am
Re: Adding a Checkbox on a Stylesheet on Calc with Java
Wow you're awsome! Thanks a lot for your help. Now I have how start my study.
OpenOffice 4.1.17 on Windows 10
Java developer
Java developer