{ "ns" : "http://zorba.io/modules/excel/lookup", "description" : " This module implements some Excel 2003 lookup functions.\n", "sees" : [ "Excel 2003 Documentation: Lookup Functions" ], "authors" : [ "Daniel Turcanu" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/modules/excel/lookup", "prefix" : "excel" }, { "uri" : "http://zorba.io/modules/excel/errors", "prefix" : "excel-err" }, { "uri" : "http://zorba.io/modules/excel/math", "prefix" : "excel-math" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" } ], "functions" : [ { "arity" : 2, "name" : "choose", "qname" : "excel:choose", "signature" : "($index_num as xs:integer, $values as xs:anyAtomicType*) as xs:anyAtomicType", "description" : " Uses index_num to return a value from the sequence of value arguments.\n", "summary" : "

Uses index_num to return a value from the sequence of value arguments.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "index_num", "type" : "xs:integer", "occurence" : null, "description" : "
The position in the sequence, 1 based.
" }, { "name" : "values", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
The sequence of values.
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The value at the index position." }, "errors" : [ "excel-err:Value if index is smaller than 1 or bigger than the size of sequence." ] }, { "arity" : 30, "name" : "choose", "qname" : "excel:choose", "signature" : "($index_num as xs:integer, $value_sequence1 as xs:anyAtomicType*, $value_sequence2 as xs:anyAtomicType*, $value_sequence3 as xs:anyAtomicType*, $value_sequence4 as xs:anyAtomicType*, $value_sequence5 as xs:anyAtomicType*, $value_sequence6 as xs:anyAtomicType*, $value_sequence7 as xs:anyAtomicType*, $value_sequence8 as xs:anyAtomicType*, $value_sequence9 as xs:anyAtomicType*, $value_sequence10 as xs:anyAtomicType*, $value_sequence11 as xs:anyAtomicType*, $value_sequence12 as xs:anyAtomicType*, $value_sequence13 as xs:anyAtomicType*, $value_sequence14 as xs:anyAtomicType*, $value_sequence15 as xs:anyAtomicType*, $value_sequence16 as xs:anyAtomicType*, $value_sequence17 as xs:anyAtomicType*, $value_sequence18 as xs:anyAtomicType*, $value_sequence19 as xs:anyAtomicType*, $value_sequence20 as xs:anyAtomicType*, $value_sequence21 as xs:anyAtomicType*, $value_sequence22 as xs:anyAtomicType*, $value_sequence23 as xs:anyAtomicType*, $value_sequence24 as xs:anyAtomicType*, $value_sequence25 as xs:anyAtomicType*, $value_sequence26 as xs:anyAtomicType*, $value_sequence27 as xs:anyAtomicType*, $value_sequence28 as xs:anyAtomicType*, $value_sequence29 as xs:anyAtomicType*) as xs:anyAtomicType*", "description" : " Uses index_num to return a sequence from the list of sequences.\n Use CHOOSE to select one of up to 29 sequences based on the index number.\n", "summary" : "

Uses index_num to return a sequence from the list of sequences.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "index_num", "type" : "xs:integer", "occurence" : null, "description" : "
the position in the sequence, 1 based
" }, { "name" : "value_sequence1", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence2", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence3", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence4", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence5", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence6", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence7", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence8", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence9", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence10", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence11", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence12", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence13", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence14", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence15", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence16", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence17", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence18", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence19", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence20", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence21", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence22", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence23", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence24", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence25", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence26", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence27", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence28", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" }, { "name" : "value_sequence29", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
a sequence of values. Specify the empty sequence () if you don't need it.
" } ], "returns" : { "type" : "xs:anyAtomicType*", "description" : "The value at the index position" }, "errors" : [ "excel-err:Value if index is smaller than 1 or bigger than 29" ] }, { "arity" : 5, "name" : "hlookup", "qname" : "excel:hlookup", "signature" : "($lookup_value as xs:anyAtomicType, $table_array as xs:anyAtomicType+, $table_width as xs:integer, $table_height as xs:integer, $row_index_num as xs:integer) as xs:anyAtomicType", "description" : " Same as above, only that range_lookup is defaulted to true.\n That is, this Hlookup looks for the approximate value\n and the first row must be ordered ascending.\n", "summary" : "

Same as above, only that range_lookup is defaulted to true.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "lookup_value", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
the value to be searched. Allowed types are numeric, string, boolean.

Boolean values are compared only with booleans. Numbers are compared only with numbers, if range_lookup is not zero. The other types are converted to string and compared to string value of all values.

" }, { "name" : "table_array", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
the sequence of values, row after row
" }, { "name" : "table_width", "type" : "xs:integer", "occurence" : null, "description" : "
the number of values in a row
" }, { "name" : "table_height", "type" : "xs:integer", "occurence" : null, "description" : "
the number of rows
" }, { "name" : "row_index_num", "type" : "xs:integer", "occurence" : null, "description" : "
the row index, 1 based
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The value found, with original type" }, "errors" : [ "excel-err:Value if the array contains less elements than specified by table_height and table_width", "excel-err:Value if row_index_num is outside the range 1 .. table_height", "excel-err:Value if range_lookup is true and the value searched is smaller than the first value in the header", "excel-err:Value if range_lookup=false and the value cannot be found" ] }, { "arity" : 6, "name" : "hlookup", "qname" : "excel:hlookup", "signature" : "($lookup_value as xs:anyAtomicType, $table_array as xs:anyAtomicType+, $table_width as xs:integer, $table_height as xs:integer, $row_index_num as xs:integer, $range_lookup as xs:boolean) as xs:anyAtomicType", "description" : " Searches for a value in the top row of an array of values,\n and then returns a value in the same column from a row you specify in the array.\n
Array is specified with 3 parameters:\n
table_array
is a sequence of elements, first row first, then second row and so on
\n
table_width
specifies the number of elements in a row
\n
table_height
specifies the number of rows
\n The number of elements in table_array must be equal or more than table_width * table_height.

\n For wildchar matching, the XQuery regex matcher is used.\n", "summary" : "

Searches for a value in the top row of an array of values,\n and then returns a value in the same column from a row you specify in the array.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "lookup_value", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
the value to be searched. Allowed types are numeric, string, boolean.

Boolean values are compared only with booleans. Numbers are compared only with numbers, if range_lookup is not zero. The other types are converted to string and compared to string value of all values.

" }, { "name" : "table_array", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
the sequence of values, row after row
" }, { "name" : "table_width", "type" : "xs:integer", "occurence" : null, "description" : "
the number of values in a row
" }, { "name" : "table_height", "type" : "xs:integer", "occurence" : null, "description" : "
the number of rows
" }, { "name" : "row_index_num", "type" : "xs:integer", "occurence" : null, "description" : "
the row index, 1 based
" }, { "name" : "range_lookup", "type" : "xs:boolean", "occurence" : null, "description" : "
specifies the algorithm to use:
true
find approximative match. First row of array must be sorted in ascending order.
false
find exact match, using xquery regex First row of array can be in any order.
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The value found, with original type" }, "errors" : [ "excel-err:Value if the array contains less elements than specified by table_height and table_width", "excel-err:Value if row_index_num is outside the range 1 .. table_height", "excel-err:Value if range_lookup is true and the value searched is smaller than the first value in the header", "excel-err:Value if range_lookup=false and the value cannot be found" ] }, { "arity" : 5, "name" : "index", "qname" : "excel:index", "signature" : "($array as xs:anyAtomicType+, $array_height as xs:integer, $array_width as xs:integer, $row_num as xs:integer, $column_num as xs:integer) as xs:anyAtomicType+", "description" : " Returns a value from within an array.

\n This is the Array form of the Excel Index function.

\n

Array is specified with 3 parameters:\n
array
is a sequence of elements, first row first, then second row and so on
\n
array_height
specifies the number of rows
\n
array_width
specifies the number of elements in a row
\n The number of elements in array must be equal or more than array_width * array_height.\n", "summary" : "

Returns a value from within an array.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
the sequence of values, row after row
" }, { "name" : "array_height", "type" : "xs:integer", "occurence" : null, "description" : "
the number of rows
" }, { "name" : "array_width", "type" : "xs:integer", "occurence" : null, "description" : "
the number of values in a row
" }, { "name" : "row_num", "type" : "xs:integer", "occurence" : null, "description" : "
the row position of the value, 1 based
" }, { "name" : "column_num", "type" : "xs:integer", "occurence" : null, "description" : "
the column position of the value, 1 based
" } ], "returns" : { "type" : "xs:anyAtomicType+", "description" : "The value from x-y in the array" }, "errors" : [ "excel-err:Value if the array contains less elements than specified by table_height and table_width", "excel-err:Ref if row_num is outside the range" ] }, { "arity" : 3, "name" : "lookup", "qname" : "excel:lookup", "signature" : "($lookup_value as xs:anyAtomicType, $lookup_vector as xs:anyAtomicType+, $result_vector as xs:anyAtomicType+) as xs:anyAtomicType", "description" : " The Vector form.

\n Looks in a sequence for a value\n and return a value from the same position in a second sequence.\n If the value is not found, then it matches the largest value in lookup_vector\n that is less than or equal to lookup_value.\n", "summary" : "

The Vector form.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "lookup_value", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
the value to be searched
" }, { "name" : "lookup_vector", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
the sequence to be searched, in ascending order.
" }, { "name" : "result_vector", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
the sequence containing the result values
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "a value from $result_vector" }, "errors" : [ "excel-err:NA if lookup value is smaller than the first value in lookup_vector", "excel-err:NA if position found is outside the result range" ] }, { "arity" : 4, "name" : "lookup", "qname" : "excel:lookup", "signature" : "($lookup_value as xs:anyAtomicType, $array as xs:anyAtomicType+, $array_width as xs:integer, $array_height as xs:integer) as xs:anyAtomicType", "description" : " The Array form.

\n It looks in the first row or column of an array for the specified value\n and returns a value from the same position in the last row or column of the array.

\n If array covers an area that is wider than it is tall (more columns than rows),\n LOOKUP searches for lookup_value in the first row.

\n If array is square or is taller than it is wide (more rows than columns),\n LOOKUP searches in the first column.

\n The values in the first row or first column must be in ascending order.\n", "summary" : "

The Array form.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "lookup_value", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
the value to be searched. If the value is not found, then it matches the largest value in lookup_vector that is less than or equal to lookup_value.
" }, { "name" : "array", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
the array sequence, row after row
" }, { "name" : "array_width", "type" : "xs:integer", "occurence" : null, "description" : "
the number of values in a row
" }, { "name" : "array_height", "type" : "xs:integer", "occurence" : null, "description" : "
the number of rows in the array
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The corresponding value in the last row or column" }, "errors" : [ "excel-err:Value if array contains less values than specified by array_width and array_height or array_width = 0 or array_height = 0", "excel-err:NA if the lookup_value is smaller than the first value in the row or column" ] }, { "arity" : 2, "name" : "match", "qname" : "excel:match", "signature" : "($lookup_value as xs:anyAtomicType, $sequence as xs:anyAtomicType+) as xs:anyAtomicType", "description" : " Same as above, but match_type is defaulted to 1.\n It finds the largest value that is less than or equal to lookup_value.\n", "summary" : "

Same as above, but match_type is defaulted to 1.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "lookup_value", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
value to be searched.
" }, { "name" : "sequence", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
the vector where to search the value
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The position of found value" }, "errors" : [ "excel-err:NA for match_type 1 or -1, the lookup_value is smaller or larger than the first value in sequence", "excel-err:Value if range_lookup=0 and the value cannot be found" ] }, { "arity" : 3, "name" : "match", "qname" : "excel:match", "signature" : "($lookup_value as xs:anyAtomicType, $sequence as xs:anyAtomicType+, $match_type as xs:integer) as xs:anyAtomicType", "description" : " Returns the relative position of an item in a sequence that\n matches a specified value in a specified order.\n Only for one dimensional vector.\n", "summary" : "

Returns the relative position of an item in a sequence that\n matches a specified value in a specified order.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "lookup_value", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
value to be searched.
" }, { "name" : "sequence", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
the vector where to search the value
" }, { "name" : "match_type", "type" : "xs:integer", "occurence" : null, "description" : "
specifies the algorithm used for searching. Possible values:
1
finds the largest value that is less than or equal to lookup_value. Sequence must be in ascending order.
0
finds the first value that is exactly equal to lookup_value.

Sequence can be in any order.

If lookup_value is boolean, then only booleans are compared.

For other types, they are casted to string and then compared using xquery regular expressions. Lookup_value can be a xquery regular expression.

-1
finds the smallest value that is greater than or equal to lookup_value.

Sequence must be in descending order.

" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The position of found value" }, "errors" : [ "excel-err:NA for match_type 1 or -1, the lookup_value is smaller or larger than the first value in sequence", "excel-err:Value if range_lookup=0 and the value cannot be found" ] }, { "arity" : 5, "name" : "offset", "qname" : "excel:offset", "signature" : "($reference as xs:anyAtomicType+, $reference_height as xs:integer, $reference_width as xs:integer, $rows as xs:integer, $cols as xs:integer) as xs:anyAtomicType*", "description" : " Same as above, only that the sub-array is specified only by rows and cols relative position.\n The sub-array height and width is computed to contain the remaining elements of the array.\n", "summary" : "

Same as above, only that the sub-array is specified only by rows and cols relative position.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "reference", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
the reference array
" }, { "name" : "reference_height", "type" : "xs:integer", "occurence" : null, "description" : "
the number of rows in the reference array
" }, { "name" : "reference_width", "type" : "xs:integer", "occurence" : null, "description" : "
the number of elements in the reference array row
" }, { "name" : "rows", "type" : "xs:integer", "occurence" : null, "description" : "
the relative row position where the sub-array starts. It must be a positive value, zero relative.
" }, { "name" : "cols", "type" : "xs:integer", "occurence" : null, "description" : "
the relative column position where the sub-array starts. It must be a positive value, zero relative.
" } ], "returns" : { "type" : "xs:anyAtomicType*", "description" : "The sequence specifying the sub-array, row after row" }, "errors" : [ "excel-err:NA rows or cols are negative", "excel-err:NA height or width are smaller than 1", "excel-err:Value reference array contains less elements than specified by reference_height and reference_width", "excel-err:NA the resulted sub-array is not completely contained inside reference array" ] }, { "arity" : 7, "name" : "offset", "qname" : "excel:offset", "signature" : "($reference as xs:anyAtomicType+, $reference_height as xs:integer, $reference_width as xs:integer, $rows as xs:integer, $cols as xs:integer, $height as xs:integer, $width as xs:integer) as xs:anyAtomicType*", "description" : " Returns a sub-array from an array.\n The inner array must be within the reference array\n", "summary" : "

Returns a sub-array from an array.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "reference", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
the reference array
" }, { "name" : "reference_height", "type" : "xs:integer", "occurence" : null, "description" : "
the number of rows in the reference array
" }, { "name" : "reference_width", "type" : "xs:integer", "occurence" : null, "description" : "
the number of elements in the reference array row
" }, { "name" : "rows", "type" : "xs:integer", "occurence" : null, "description" : "
the relative row position where the sub-array starts. It must be a positive value, zero relative.
" }, { "name" : "cols", "type" : "xs:integer", "occurence" : null, "description" : "
the relative column position where the sub-array starts. It must be a positive value, zero relative.
" }, { "name" : "height", "type" : "xs:integer", "occurence" : null, "description" : "
the desired height of sub-array. The sub-array must be inside the reference array.
" }, { "name" : "width", "type" : "xs:integer", "occurence" : null, "description" : "
the desired width of sub-array. The sub-array must be inside the reference array.
" } ], "returns" : { "type" : "xs:anyAtomicType*", "description" : "The sequence specifying the sub-array, row after row" }, "errors" : [ "excel-err:NA rows or cols are negative", "excel-err:NA height or width are smaller than 1", "excel-err:Value reference array contains less elements than specified by reference_height and reference_width", "excel-err:NA the resulted sub-array is not completely contained inside reference array" ] }, { "arity" : 3, "name" : "transpose", "qname" : "excel:transpose", "signature" : "($array as xs:anyAtomicType+, $array_width as xs:integer, $array_height as xs:integer) as xs:anyAtomicType+", "description" : " Transposes an array. The rows become columns and vice versa.\n", "summary" : "

Transposes an array.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "array", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
the sequence specifying the array, row after row
" }, { "name" : "array_width", "type" : "xs:integer", "occurence" : null, "description" : "
the number of elements in a row
" }, { "name" : "array_height", "type" : "xs:integer", "occurence" : null, "description" : "
the number of rows in the array
" } ], "returns" : { "type" : "xs:anyAtomicType+", "description" : "The transposed array. It will be a sequence specifying an array, row after row. The result width is the input height. The result height is the input width." }, "errors" : [ "excel-err:Value the array contains less elements than specified by array_width and array_height" ] }, { "arity" : 5, "name" : "vlookup", "qname" : "excel:vlookup", "signature" : "($lookup_value as xs:anyAtomicType, $table_array as xs:anyAtomicType+, $table_width as xs:integer, $table_height as xs:integer, $col_index_num as xs:integer) as xs:anyAtomicType", "description" : " Same as above, with range_lookup defaulted to true.\n It finds the largest value that is less than or equal to lookup_value.\n First column must be in ascending order.\n", "summary" : "

Same as above, with range_lookup defaulted to true.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "lookup_value", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
the value to be searched. Allowed types are numeric, string, boolean.

Boolean values are compared only with booleans. Numbers are compared only with numbers, if range_lookup is not zero. The other types are converted to string and compared to string value of all values.

" }, { "name" : "table_array", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
the sequence of values, row after row
" }, { "name" : "table_width", "type" : "xs:integer", "occurence" : null, "description" : "
the number of values in a row
" }, { "name" : "table_height", "type" : "xs:integer", "occurence" : null, "description" : "
the number of rows
" }, { "name" : "col_index_num", "type" : "xs:integer", "occurence" : null, "description" : "
the row index, 1 based
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The value found, with original type" }, "errors" : [ "excel-err:Value if the array contains less elements than specified by table_height and table_width", "excel-err:Value if col_index_num is outside the range 1 .. table_height", "excel-err:Value if range_lookup is true and the value searched is smaller than the first value in the first column", "excel-err:Value if range_lookup=false and the value cannot be found" ] }, { "arity" : 6, "name" : "vlookup", "qname" : "excel:vlookup", "signature" : "($lookup_value as xs:anyAtomicType, $table_array as xs:anyAtomicType+, $table_width as xs:integer, $table_height as xs:integer, $col_index_num as xs:integer, $range_lookup as xs:boolean) as xs:anyAtomicType", "description" : " Searches for a value in the first column of a table array\n and returns a value in the same row from another column in the table array.\n
Array is specified with 3 parameters:\n
table_array
is a sequence of elements, first row first, then second row and so on
\n
table_width
specifies the number of elements in a row
\n
table_height
specifies the number of rows
\n For wildchar matching, the XQuery regex matcher is used.\n", "summary" : "

Searches for a value in the first column of a table array\n and returns a value in the same row from another column in the table array.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "lookup_value", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
the value to be searched. Allowed types are numeric, string, boolean.

Boolean values are compared only with booleans. Numbers are compared only with numbers, if range_lookup is not zero. The other types are converted to string and compared to string value of all values.

" }, { "name" : "table_array", "type" : "xs:anyAtomicType", "occurence" : null, "description" : "
the sequence of values, row after row
" }, { "name" : "table_width", "type" : "xs:integer", "occurence" : null, "description" : "
the number of values in a row
" }, { "name" : "table_height", "type" : "xs:integer", "occurence" : null, "description" : "
the number of rows
" }, { "name" : "col_index_num", "type" : "xs:integer", "occurence" : null, "description" : "
the row index, 1 based
" }, { "name" : "range_lookup", "type" : "xs:boolean", "occurence" : null, "description" : "
specified the algorithm to use:
true
find approximative match. First column of array must be sorted in ascending order.
false
find exact match, using xquery regex. First column of array can be in any order.
" } ], "returns" : { "type" : "xs:anyAtomicType", "description" : "The value found, with original type" }, "errors" : [ "excel-err:Value if the array contains less elements than specified by table_height and table_width", "excel-err:Value if col_index_num is outside the range 1 .. table_height", "excel-err:Value if range_lookup is true and the value searched is smaller than the first value in the first column", "excel-err:Value if range_lookup=false and the value cannot be found" ] } ], "variables" : [ ] }