In the case the hits
are all in the same column
you can do the task by:
`> Data > Filter > Standardfilter (…)
- Options:
[x]regular Expression
[x]Filteroutput to: “other Sheet.…”`
EDIṬ̣:
If your hits
spread widely over several columns, you can try your search up to find all
and run then:
from uno import createUnoStruct as create_struct
def copyrows():
source_address = create_struct("com.sun.star.table.CellRangeAddress")
target_address = create_struct("com.sun.star.table.CellAddress")
doc = XSCRIPTCONTEXT.getDocument()
sheet = doc.CurrentController.ActiveSheet
descriptions = doc.CurrentSelection.RowDescriptions
rows = { entry.split()[1] for entry in descriptions }
rows = sorted(map(int,rows))
for i, row in enumerate(rows):
source_address.StartRow = source_address.EndRow = row-1
source_address.EndColumn = 1023
target_address.Sheet = 1
target_address.Row = i
sheet.copyRange(target_address, source_address)
its python, you have to copy this SourceCode into:
$(your_User_Configfolder)/Scripts/python/<some-file-name>.py
Keep care to have an empty sheet behind the sheet youre working on.