http://www.zorba-xquery.com/modules/excel/information

Description

Before using any of the functions below please remember to import the module namespace:

import module namespace excel-information = "http://www.zorba-xquery.com/modules/excel/information";

This is a library module offering the same set of functions defined by Microsoft Excel, under Information Functions.

See also

Excel Documentation: Information Functions

Author

Sorin Nasoi

XQuery version and encoding

xquery version "3.0" encoding "utf-8";

Namespaces

excel-errhttp://www.zorba-xquery.com/modules/excel/errors
excel-informationhttp://www.zorba-xquery.com/modules/excel/information
excel-mathhttp://www.zorba-xquery.com/modules/excel/math
verhttp://www.zorba-xquery.com/options/versioning

Function Summary

is-blank($value as xs:anyAtomicType?) as xs:boolean

Test if the passed argument is empty of not.

is-even($value as xs:anyAtomicType?) as xs:boolean

Test is a number is even.

is-odd($value as xs:anyAtomicType?) as xs:boolean

Test is a number is odd.

islogical($value as xs:anyAtomicType?) as xs:boolean

Tests if the passed $value is a logical value.

isnumber($value as xs:anyAtomicType?) as xs:boolean

Tests if the passed $value is a number.

istext($value as xs:anyAtomicType?) as xs:boolean

Tests if the passed $value is a string.

n($value as xs:anyAtomicType?) as xs:anyAtomicType

Converts a $value to a number.

na() as xs:anyAtomicType

Raises the error value #N/A.

Functions

is-blank#1

declare function excel-information:is-blank(
    $value as xs:anyAtomicType?
) as xs:boolean

Test if the passed argument is empty of not.

Parameters

  • $value as xs:anyAtomicType
    the value.

Returns

  • xs:boolean

    If the value of $arg is the empty sequence, the function returns true, otherwise the function returns false.

See also

http://www.w3.org/TR/xquery-operators/#func-empty

is-even#1

declare function excel-information:is-even(
    $value as xs:anyAtomicType?
) as xs:boolean

Test is a number is even.

Parameters

  • $value as xs:anyAtomicType
    the value.

Returns

  • xs:boolean

    TRUE if number is even, FALSE if number is odd.

Errors

  • excel-err:Value if provided value is not a number.

See also

http://office.microsoft.com/en-us/excel/HP052091481033.aspx

is-odd#1

declare function excel-information:is-odd(
    $value as xs:anyAtomicType?
) as xs:boolean

Test is a number is odd.

Parameters

  • $value as xs:anyAtomicType
    the value.

Returns

  • xs:boolean

    TRUE if number is odd, FALSE if number is even.

Errors

  • excel-err:Value if provided value is not a number.

See also

http://office.microsoft.com/en-us/excel/HP052091491033.aspx

islogical#1

declare function excel-information:islogical(
    $value as xs:anyAtomicType?
) as xs:boolean

Tests if the passed $value is a logical value.

Parameters

  • $value as xs:anyAtomicType
    the value.

Returns

  • xs:boolean

    TRUE if $value refers to a logical value.

See also

http://office.microsoft.com/en-us/excel/HP052091471033.aspx

isnumber#1

declare function excel-information:isnumber(
    $value as xs:anyAtomicType?
) as xs:boolean

Tests if the passed $value is a number.

Parameters

  • $value as xs:anyAtomicType
    the value.

Returns

  • xs:boolean

    TRUE if $value refers to a number.

See also

http://office.microsoft.com/en-us/excel/HP052091471033.aspx

istext#1

declare function excel-information:istext(
    $value as xs:anyAtomicType?
) as xs:boolean

Tests if the passed $value is a string.

Parameters

  • $value as xs:anyAtomicType
    the value.

Returns

  • xs:boolean

    TRUE if $value refers to text.

See also

http://office.microsoft.com/en-us/excel/HP052091471033.aspx

n#1

declare function excel-information:n(
    $value as xs:anyAtomicType?
) as xs:anyAtomicType

Converts a $value to a number.

Parameters

  • $value as xs:anyAtomicType
    the value.

Returns

  • xs:anyAtomicType

    A $value converted to a number.

See also

http://office.microsoft.com/en-us/excel/HP052091871033.aspx

na#0

declare function excel-information:na() as xs:anyAtomicType

Raises the error value #N/A.

Returns

  • xs:anyAtomicType

    The error value #N/A. #N/A is the error value that means "no value is available."

Errors

  • excel-err:NA the purpose of this function is to raise this error

See also

http://office.microsoft.com/en-us/excel/HP052091881033.aspx

blog comments powered by Disqus