badvox.blogg.se

Filter openoffice calc
Filter openoffice calc










GetSheet = (vSheet -1)įunction getSheetCell(byVal vSheet,byVal lRowIndex&,byVal iColIndex%)Įlseif (lRowIndex > )OR(lRowIndex )OR(iColIndex < 1) then REM =CELL_LINE(SHEET(),1,1,2) -> second line of A1 in this sheet REM Split by line breaks, missing or zero line number returns whole string. S = thisComponent.StyleFamilies("CellStyles").getByName(v.CellStyle).DisplayNameįunction CELL_LINE(vSheet,lRowIndex&,iColIndex%,optional n) If not isMissing(bLocalized) then bLocal=cBool(bLocalized) REM return name of cell-style, optionally localized REM returns URL of Nth text-hyperlink from a cell, default N=1)ĬELL_URL = v.getTextfields.getByIndex(n -1).URLįunction CELL_FORMULA(vSheet,lRowIndex&,iColIndex%)įunction CELL_STYLE(vSheet,lRowIndex&,iColIndex%,optional bLocalized) V = getSheetCell(vSheet,lRowIndex&,iColIndex%)ĬELL_NOTE = v.įunction CELL_URL(vSheet,lRowIndex&,iColIndex%,optional n%) REM # RETURNING STRING #įunction CELL_NOTE(vSheet,lRowIndex&,iColIndex%) Here's the code from the linked posting (tribute to user villeroy of the OOo forum who wrote the macro code) REM ***** BASIC *****

filter openoffice calc

Here's a visual example, displaying the numerical color values of column A's cells in column B (note that i'm using, as argument separator in the formula because of a non-US localisation): Note that in my example, the column vaule is static the row is addressed dynamically.

filter openoffice calc

To do some filtering based on the background, just nest the formula into your filter criteria. This will return the numerical value of the background color of the current sheet / current row's cell in the first column. You can use it as follows: =CELL_BACKCOLOR(SHEET() ROW() 1) But in this OOo forum thread, you'll find a macro that creates some user-defined functions, among them CELL_BACKCOLOR. AFAIK, currently, there's no built-in function that allows for selecting cells based on their format.












Filter openoffice calc