Here’s the macro. Bind it to a key or toolbar.
Option Explicit
Sub ExportToTsv
Rem Based on https://www.briankoponen.com/libreoffice-export-sheets-csv/
Dim Document as Object
Dim FileDirectory as String
Dim Sheets as Object
Dim Index as Integer
Dim Filename as String
Dim FileURL as String
Document = ThisComponent
Sheets = ThisComponent.Sheets
Rem Use the global string tools library to generate a path to save each TSV
GlobalScope.BasicLibraries.loadLibrary("Tools")
FileDirectory = Tools.Strings.DirectoryNameoutofPath(document.getURL(), "/") & "/subdir/"
MsgBox "Saving files to" & FileDirectory
Rem Set up a propval object to store the filter properties
Dim Propval(1) as New com.sun.star.beans.PropertyValue
Propval(0).Name = "FilterName"
Propval(0).Value = "Text - txt - csv (StarCalc)"
Propval(1).Name = "FilterOptions"
Propval(1).Value ="9, 34, 0, 1, 1" Rem ASCII 9 = tab 59 = ; 34 = " 44 = ,
For Index = 0 to Sheets.Count - 1
Rem For each sheet assemble a filename and save using the filter
Rem Replace True with condition for sheet name(s), etc.
If True Then
Document.getCurrentController.setActiveSheet(Sheets(index))
Filename = FileDirectory + "/" + Sheets(index).Name + ".tsv"
FileURL = convertToURL(Filename)
Document.StoreToURL(FileURL, Propval())
End If
Next Index
End Sub