285 questions
0
votes
1
answer
44
views
Totals from specific parts of a large spreadsheet by row and column
Here is a large spreadsheet with several years' worth of data in a lot of categories.
Y = year, M = month, D = day
A B C D E
1| Y | M | D | 1 | 2 |... Initial dataset
2| 19 | 1 | 1 | ...
2
votes
1
answer
111
views
How to separate built-in object from user objects?
I'm trying to write a function TypeNameEx which will return a string which, using a call to VarType(), effectively identifies the type of a a (variant) variable, eg VarType 2 returns integer and ...
0
votes
1
answer
62
views
The "Sheet" function in Uno FunctionAccess always returns "2"
This function:
Function SheetIndex() As Long
Dim oFunctionAccess As Object
oFunctionAccess = CreateUnoService("com.sun.star.sheet.FunctionAccess")
SheetIndex = oFunctionAccess....
0
votes
1
answer
91
views
MyEval creates a circular reference, how is this possible?
When there are multiple cells using this UDF, they give results but they are recalculated endlessly and most of the time most of the cells give circular reference error (Err:522):
Option Explicit
...
1
vote
1
answer
63
views
LO Basic: ThisComponent.CurrentController does not exist when the spreadsheet is started
After the spreadsheet is fully started, then it works, but not on startup, resulting in some cells not calculated.
I'm talking about a User Defined Function (UDF):
Function Eval(Formula As Variant) As ...
1
vote
0
answers
63
views
When loading the library for the first time via GlobalScope.BasicLibraries.loadLibrary, an error occurs. Is that correct?
Environment: LibreOffice Calc
My program loads the ScriptForge library when a button is clicked:
Function ParseInequality(inequality As String) as Variant
GlobalScope.BasicLibraries.loadLibrary(&...
0
votes
2
answers
95
views
What is the equivalent syntax of this "$@" from the bash language?
Is there an equivalent of the bash language "$@" in the libreoffice Basic language to pass all the parameters passed to a function, to a variable?
As an example:
Function prova(a, b, c)
...
0
votes
0
answers
62
views
SQL Server does not accept polish specific characters when entering data from Libre Base
I'm using Libre Base to insert data into a SQL Server database. In the connection properties of Libre I have selected the ODBC driver with Middle Europe (Windows-1250/Latin 2) as the character-set. ...
0
votes
0
answers
106
views
BASIC runtime error, argument is not optional
I'm trying to write a basic function to check if the text in a cell is bolded, but I keep getting the mentioned runtime error on the second line. I've looked up various documentations and tried other ...
1
vote
1
answer
78
views
How to use userDefinedProperties to record persistent variables between 2 calls
i have hard to find solutions to record some variables i would like to be persistent during session (untill i close libreoffice-cal application).
First, i would like to know if i can record complex ...
0
votes
1
answer
58
views
Is there any method to get information of dll used when clalling a function from a VBScript macro?
When I run a VBScript that calls a function, is it possible to somehow get information about which .dll library the WScript engine used to implement the function?
I haven't tried anything yet due to I ...
0
votes
0
answers
113
views
How to speed up Rnd in LibreOffice Calc?
I am simulating the life of wolves and rabbits. Wolves should move to a random cell. When I run it, it works relatively slowly at first and then slows down even more; I suspect this is due to Rnd. How ...
0
votes
2
answers
82
views
Remove command from a toolbar with LibreOffice Basic
I want to remove a command from a toolbar / set the command to inactive. I can open the dialog, but I can't go any furter.
sub SetStatusOfCommand
dim document as object
dim dispatcher as object
...
1
vote
1
answer
152
views
Python User Defined Function for LibreOffice Calc
I'm trying to create a Python UDF that operates on a range of spreadsheet values and returns a single value.
From what I've gleaned, I need a Basic wrapper that calls my Python script. Here is what ...
1
vote
2
answers
70
views
Anagram check in Libreoffice Calc
How can I check in LibreOffice Calc whether two words have the same letters, i. e. are anagrams? Is this doable with the built-in functions?
Edit:
My idea is: convert the letters in both words to ...