A most simple draft for an SQL GROUP_CONCAT function as found in many database engines (e.g. HSQLDB 2.x and MySQL).
Select a range of cells so the main category is found in the first column and the subcategories to be concatenated are found in the last column of the selection.
Run the macro.
The 2-column output will be dumped 2 rows below the selection.
Download and save the Writer document to a trusted directory. It contains a Basic installer for the Python script.
[Python,Calc] Group_Concat for the spreadsheet
Forum rules
For sharing working examples of macros / scripts. These can be in any script language supported by OpenOffice.org [Basic, Python, Netbean] or as source code files in Java or C# even - but requires the actual source code listing. This section is not for asking questions about writing your own macros.
For sharing working examples of macros / scripts. These can be in any script language supported by OpenOffice.org [Basic, Python, Netbean] or as source code files in Java or C# even - but requires the actual source code listing. This section is not for asking questions about writing your own macros.
[Python,Calc] Group_Concat for the spreadsheet
- Attachments
-
- Group_Concat.py.odt
- (25.26 KiB) Downloaded 232 times
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