945 questions
0
votes
0
answers
30
views
automatic numbering of grouped rows
I have an libreoffice-calc file that looks like this:
I'm manually grouping rows in the first column based on the second column and that's fine, no problem with that approach. But for numbering, I'm ...
0
votes
1
answer
57
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
72
views
Cell relative to current row in an array formula
I've got a spreadsheet listing items with a possible child-parent relation (no grand children, children never come before their parent, but children of different parents can be mixed), and I'd like to ...
0
votes
1
answer
101
views
How to fill a ComboBox (in Libre Office Calc) with a python script?
I work on a Calc file, with several tabs. Some are used to store datas (like SQL tables).
With a python macro, I want to fill a ComboBox "Classes" using the datas in one of these tables.
My ...
2
votes
1
answer
51
views
Avoid PicklingError using multiprocessing in Python 3.8 libreoffice macro
I'm trying to use multiprocessing in a LibreOffice Macro in Python 3.8. When I create a Macro it is part of the 'ooo_script_framework' module. So, when the process is pickled it is in fact part of an ...
0
votes
0
answers
17
views
Import calc spreadsheet to MySQL - again
Yes, I did see the warning and looked at some of the other answers, but I'm struggling a bit all the same. It is a simple enough question, but with a complication:
Some of the columns contain line ...
0
votes
0
answers
40
views
How to filter column 1 using column 2?
I have a libreoffice document filled with multiple columns, including one named customerid. These customer ID appear multiple times each, as this is a raw data log.
I isolated around 50 customer id of ...
0
votes
1
answer
137
views
Libreoffice excel to pdf conversion problem
When I am trying to run this code on an excel document:
import subprocess
subprocess.run(['libreoffice', '--headless', '--convert-to', 'pdf',
'test_docs/doc.xls', '--outdir', '...
0
votes
2
answers
101
views
convert a table of name/value pairs in a spreadsheet into name( value1, value2, ...) strings
I have table of contestants and events:
Row
Contestant (Col B)
Event (Col C)
4
Harold
1500M
5
Alice
1500M
6
Eve
400M
7
Alice
400M
8
Alice
100M
9
Eve
100M
10
David
100M
11
Flynn
100M
12
Greg
1500M
13
...
0
votes
1
answer
165
views
Applying array formula with different parameters throughout column
I have a Libreoffice Calc document with two sheets. In the first sheet, I have a table of data, with a key column (I) and a value column (C). In the second sheet, I am calculating some statistics on ...
2
votes
3
answers
176
views
How can import package-numpy for libreoffice's macro to call python?
"numpy" is installed in for libreoffice24.8:
ls /opt/libreoffice24.8/program | grep numpy
numpy
numpy-2.2.2.dist-info
numpy.libs
Edit a test python script for macro in libreoffice24.8 to ...
0
votes
0
answers
60
views
LibreOffice Calc: return currentRegion for range
I would like to apply a filter to a region through a VBA macro and I don't want to hardcode the region.
In Excel VBA, I can use the myrange.currentRegion method that returns the region to which ...
-1
votes
1
answer
189
views
How to call a bash script from a basic function (macro)
i am trying to find the way to call a simple bash script from a macro of my calc document.
i 've hard with this instruction:
session.RunApplication("Shell", "/usr/local/bin/essai-macro-...
0
votes
0
answers
68
views
How to export search results using Find and Replace in LibreOffice Calc
We have an ODS file with two spreadsheets. (Picture 1)
We are able to use ‘Find All’ to locate cells containing the string ‘Steve’. (Picture 2)
However, we are unable to copy them. Because they are on ...
1
vote
1
answer
145
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
1
answer
184
views
Libreoffice basic: how to pass CellRange variables to python scripts
I'm working on my first python script for Libre office calc.
Following various guides I installed APSO and successfully created a Basic wrapper that calls the python script.
This is its signature:
...
0
votes
1
answer
34
views
Incrementing row reference after 3 iterations
I'm having trouble trying to solve how to run this function =IF($Page1.C3<>"",G2+1,"") the function is working but for a easy replicate I need for the C row to increment by ...
0
votes
1
answer
207
views
How to create array in LO basic with support VBA 1
i have a code
Const maxPump As Byte = 3
Public ArrPump(1 to maxPump) As TPump
it work until i write
Option VbaSupport 1
after i got error like this
basic error '9' index out of defined range
i use ...
2
votes
1
answer
149
views
How to convert solution from MS Excel (VBA) to Libreoffice-Calc
How to do it in Libreoffice-Calc?
OnTime for less than 1 second without becoming Unresponsive
This is the solution:
Declare PtrSafe Function SetTimer Lib "user32" (ByVal hWnd As LongPtr, _
...
-4
votes
3
answers
126
views
Aggregate sum up to a certain column - total cost until today [closed]
Suppose you have a list of costs per month, per type.
You can have multiple rows with the same type.
How can you get the "total aggregate cost for each category from January until month X"?
...
-1
votes
1
answer
60
views
Sympy CAS functions in libreoffice calc cells
Is there a way to use sympy from libreoffice calc cells?
I want to use sympy's CAS functions. Say I want to integrate formulas in cells.
0
votes
1
answer
56
views
Is there a way to load a System.Data.DataTable into a LibreOffice Calc sheet without going cell by cell?
With Excel, and using C#, you can load the entire System.Data.Datatable into the sheet by calling
mySheet.Cells("A1").LoadFromDataTable(myDataTable, True)
where mySheet is an OfficeOpenXml....
0
votes
1
answer
228
views
In libre office calc, I want a function that takes two parameters row, Col, and returns a reference to the cell. Does it exist?
Basically, it's all in the question.
I want to be able to enter a formula like this: =some_func(3,1) and the result will be the value referenced in cell A3 (or C1, don't care if the order is row/col ...
1
vote
1
answer
402
views
Add arbitrary number of years (or months or days) to date time cell value in libreoffice/openoffice calc
I have a column of cells containing a date/time (eg: "05/15/24 10:28 PM") and I want to take those values and add 5 years (eg: "05/15/29 10:28 PM") to populate another column. So ...
1
vote
2
answers
120
views
Copy values and formats with a BASIC-Script
I want to copy the values, the formats and all conditional formats from an LibreOffice-Calc worksheet-range (A1:H100) to another (new/empty) worksheet of the same workbook.
This is, what I do actually:...