LibreOffice Basic is a procedural, interpreted programming language from the Basic family that can be used to write macros for applications in the LibreOffice Suite.
Questions tagged [libreoffice-basic]
240 questions
0
votes
1 answer
How can I find a text in a spreadsheet using OObasic?
On OpenOffice documentation [1], I found a replace example. But I didn't find a search example.
Dim Doc As Object
Dim Sheet As Object
Dim ReplaceDescriptor As Object
Dim I As Integer
Doc = ThisComponent
Sheet = Doc.Sheets(0)
ReplaceDescriptor =…

Josir
- 1,282
- 22
- 35
0
votes
2 answers
PHP str_ireplace in libreoffice basic
Does anybody know how to make function in Libreoffice basic like str_ireplace in PHP?
I want to use in my cell function.
str_ireplace(search - range of cells, replace - range of cells, text)
or at least str_replace

StanleyD
- 2,308
- 22
- 20
0
votes
2 answers
merging column in libreoffice calc does not work when drag down
I'm merging columns in Libre Office using the CONCATENATE function.
I'm merging all text using:
CONCATENATE(A1," ",B1," ",C1," ",D1," ",E1," ",F1," ",G1)
According to this suggestion, I should be able to apply the function over the whole column by…

oczdref
- 534
- 1
- 6
- 15
0
votes
1 answer
OpenOffice.org/LibreOffice Calc macro: is a cell's content currently overflowing?
I have a bunch of cells whose font size I'd like to tweak if their content is overflowing, until it all fits. I'd like to write a macro to do this, unless there's a conditional formatting or other formulaic way of doing it. Is there a property…

Kev
- 15,899
- 15
- 79
- 112
-1
votes
1 answer
How to get target from LibreOffice WrappedTargetException?
This is about automation of LO Base using Python macros.
Please see this question in the LO forum posed by me yesterday.
As you can see, from the link in my second post, it is trivial to open a form on the OpenDocument event, i.e. when the file is…

mike rodent
- 14,126
- 11
- 103
- 157
-1
votes
1 answer
Can not install only one dictionary
I have a sample file of spell checker that I downloaded from here...
https://testme162.s3.amazonaws.com/tamil_spell_chek.oxt
when I try to install it, I get an error as shown in this…

shantanuo
- 31,689
- 78
- 245
- 403
-1
votes
1 answer
How would I set focus in a LibreOffice macro (for use in a Base form)? Or set up a "Position-To" field that DOESN'T filter?
In a LibreOffice Base form, I have a button set to call .uno:RecSearch, in order to bring up the record search dialog.
The problem with that is that if no field in the form has focus, the record search dialog comes up with the third of seven date…

hbquikcomjamesl
- 111
- 11
-1
votes
1 answer
LibreOffice basic command to open a folder path in Linux
I have a macro spreadsheet that I created in Windows which grabs the folder path that the spreadsheet is currently in, then opens a folder inside that directory.
I use the command shell ("C:\Windows\explorer.exe",1,FolderPath) where "FolderPath" is…

LordSandwich
- 3
- 1
-1
votes
2 answers
How to replace styles of an Excel sheet cell with no style and then add value to cell?
I have inherited an Excel sheet (from a previous employee) that uses background color to convey information, rather than placing values in the cells.
Update: I should have mentioned that, although the document is an Excel sheet, our office is using…

verbatim
- 219
- 2
- 7
-1
votes
1 answer
Matching a row where two cols have multiple, repetitive values
I'm trying to match two cells in an area that has two columns, each with multiple repetitive values, and simply return something that indicates there is a match row.
I'm doing this in LibreOffice Calc, but I'd like to be able to share it in an Excel…

RainMan Jim
- 1
- 3
-1
votes
1 answer
Convert VBA Simple Macro to LibreOffice Macro
I have the following macro, which takes a sparse set of data and copies the only entry from each row into the left-most column. Example of data
I am hoping someone could rewrite this macro into one that will work with the same data in…

Jon Friedman
- 64
- 1
- 10
-1
votes
1 answer
Reading HTML page using Libreoffice Basic
I'm new to LibreOffice Basic. I'm trying to write a macro in LibreOffice Calc that will read the name of a noble House of Westeros from a cell (e.g. Stark), and output the Words of that House by looking it up on the relevant page on A Wiki of Ice…

Lou
- 2,200
- 2
- 33
- 66
-1
votes
2 answers
CopyFiles using spreadsheet columns for source and destination
I have a spreadsheet with a column "D" that has a list of file paths, and there are about 2500 files in this column. In column "E", I have a list of equal size with the new destination file path. I want to copy all the files in column D to the…

Treckez
- 11
- 1
- 5
-1
votes
1 answer
In Libre Calc, how to convert the cell having "4 hours 15 minutes" to decimal values and place it in another cell?
In Libre Calc, how to convert the cell having "4 hours 15 minutes" to decimal values and place it in another cell?
Help is very much appreciated!
-2
votes
1 answer
Location of custom dict
I followed all instructions mentioned here:
https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=33297
The file "dict-en_US_private.zip" is working as expected.
But custom dict "en_US_private" does not show up anywhere in spelling options. Is…

shantanuo
- 31,689
- 78
- 245
- 403