使用LibreOffice的基地基本上是一個長崩潰
你試過底座採用拆分數據庫設置,如MySQL的?運行嵌入式HSQLDB是not recommended。
反正這裏是一些Python代碼,你想要做什麼:
def calc_regex_to_column():
desktop = XSCRIPTCONTEXT.getDesktop()
model = desktop.getCurrentComponent()
sheet_src = model.getSheets().getByIndex(0)
sheet_dst = model.getSheets().getByIndex(1)
search = sheet_src.createSearchDescriptor()
search.SearchString = r".*@home|#projectname.*"
search.SearchCaseSensitive = True
search.SearchRegularExpression = True
selsFound = sheet_src.findAll(search)
sheet_dst_row = 0
for selIndex in range(0, selsFound.getCount()):
string_found = selsFound.getByIndex(selIndex).getString()
COLUMN_A = 0
cell = sheet_dst.getCellByPosition(COLUMN_A, sheet_dst_row)
cell.setString(string_found)
sheet_dst_row += 1
g_exportedScripts = calc_regex_to_column,
見here對在何處放置腳本。