libreoffice - How can I find a text in a spreadsheet using OObasic? -
on openoffice documentation [1], found replace example. didn't find search example.
dim doc object dim sheet object dim replacedescriptor object dim integer doc = thiscomponent sheet = doc.sheets(0) replacedescriptor = sheet.createreplacedescriptor() replacedescriptor.searchstring = "is" replacedescriptor.replacestring = "was" = 0 doc.sheets.count - 1 sheet = doc.sheets(i) sheet.replaceall(replacedescriptor) next
and better: can find docs list range/cell possible methods?
[1] http://wiki.openoffice.org/wiki/documentation/basic_guide/editing_spreadsheet_documents
first of all: https://wiki.openoffice.org/wiki/extensions_development_basic starting point. in particular xray tool helpfully.
the following code shows search example:
dim odoc object dim osheet object dim osearchdescriptor object dim integer odoc = thiscomponent osheet = odoc.sheets(0) osearchdescriptor = osheet.createsearchdescriptor() osearchdescriptor.searchstring = "is" = 0 odoc.sheets.count - 1 osheet = odoc.sheets(i) oresults = osheet.findall(osearchdescriptor) 'xray oresults if not isnull(oresults) msgbox oresults.absolutename next
if have xray installed, can inspect every object , have access related api docs.
greetings
axel
Comments
Post a Comment