I have a document with a large number of small 2x3 tables that I wish to convert to text. Is there a way to convert them all at one go instead of selecting one at a time?
Hello,
by macro - may be this can help
Sub ConvertTablesToText
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dim args1(0) as new com.sun.star.beans.PropertyValue
REM --- Delimiter is TAB ---
REM --- Change to CHR$(59), if you want a semicolon ";"
args1(0).Name = "Delimiter"
args1(0).Value = CHR$(9)
Doc = ThisComponent
Cntrl = ThisComponent.CurrentController
TextTables = Doc.getTextTables()
REM --- Loop all existing tables ---
For I = TextTables.count - 1 to 0 step -1
Table = TextTables(I)
Cntrl.select(Table)
dispatcher.executeDispatch(document, ".uno:ConvertTableToText", "", 0, args1())
Next
REM --- End Loop ---
End Sub
Recommendation Test using a copy of your document.
Reference Taken from Convert table to text - macro ? (View topic) • Apache OpenOffice Community Forum and
Tested using LibreOffice:
Version: 6.3.3.2, Build ID: a64200df03143b798afd1ec74a12ab50359878ed
CPU threads: 8; OS: Linux 4.12; UI render: default; VCL: kde5;
Locale: en-US (en_US.UTF-8); UI-Language: en-US, Calc: threaded
Highlight table
select table menu tab
Convert table to text
Does this really work for more than one table at a time? The question was