1*cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?> 2*cdf0e10cSrcweir<helpdocument version="1.0"> 3*cdf0e10cSrcweir 4*cdf0e10cSrcweir<!-- 5*cdf0e10cSrcweir*********************************************************************** 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 12*cdf0e10cSrcweir * 13*cdf0e10cSrcweir * This file is part of OpenOffice.org. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 16*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 17*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 18*cdf0e10cSrcweir * 19*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 20*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 21*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 23*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 24*cdf0e10cSrcweir * 25*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 26*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 27*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 28*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 29*cdf0e10cSrcweir * 30*cdf0e10cSrcweir ************************************************************************ 31*cdf0e10cSrcweir --> 32*cdf0e10cSrcweir 33*cdf0e10cSrcweir 34*cdf0e10cSrcweir<meta> 35*cdf0e10cSrcweir<topic id="textscalc0104060111xml" indexer="include"> 36*cdf0e10cSrcweir<title id="tit" xml-lang="en-US">Add-in Functions</title> 37*cdf0e10cSrcweir<filename>/text/scalc/01/04060111.xhp</filename> 38*cdf0e10cSrcweir</topic> 39*cdf0e10cSrcweir</meta> 40*cdf0e10cSrcweir<body> 41*cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="index" id="bm_id3150870"><bookmark_value>add-ins; functions</bookmark_value> 42*cdf0e10cSrcweir<bookmark_value>functions; add-in functions</bookmark_value> 43*cdf0e10cSrcweir<bookmark_value>Function Wizard; add-ins</bookmark_value> 44*cdf0e10cSrcweir</bookmark> 45*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3150870" xml-lang="en-US" level="1" l10n="U" oldref="1">Add-in Functions</paragraph> 46*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3147427" xml-lang="en-US" l10n="CHG" oldref="2"><variable id="addintext">The following describes and lists some of the available add-in functions. 47*cdf0e10cSrcweir</variable></paragraph> 48*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3163713" xml-lang="en-US" l10n="U" oldref="75"><link href="text/scalc/01/04060112.xhp#addinconcept">Add-in concept</link></paragraph> 49*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3146120" xml-lang="en-US" l10n="U" oldref="5">You will also find a <link href="text/scalc/01/04060112.xhp">description of the $[officename] Calc add-in interface</link> in the Help. In addition, important functions and their parameters are described in the Help for the <switchinline select="sys"><caseinline select="UNIX">Shared Library 50*cdf0e10cSrcweir</caseinline><defaultinline>$[officename] Calc add-in DLL</defaultinline></switchinline>.</paragraph> 51*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3151075" xml-lang="en-US" level="2" l10n="U" oldref="7">Add-ins supplied</paragraph> 52*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3156285" xml-lang="en-US" l10n="CHG" oldref="8">$[officename] contains examples for the add-in interface of $[officename] Calc.</paragraph> 53*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3159267" xml-lang="en-US" l10n="U" oldref="76"><link href="text/scalc/01/04060115.xhp">Analysis Functions Part One</link></paragraph> 54*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3154703" xml-lang="en-US" l10n="U" oldref="77"><link href="text/scalc/01/04060116.xhp">Analysis Functions Part Two</link></paragraph> 55*cdf0e10cSrcweir<sort order="asc"> 56*cdf0e10cSrcweir<section id="isleapyear"> 57*cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="index" id="bm_id3149566"><bookmark_value>ISLEAPYEAR function</bookmark_value> 58*cdf0e10cSrcweir<bookmark_value>leap year determination</bookmark_value> 59*cdf0e10cSrcweir</bookmark><comment>mw added one entry</comment> 60*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3149566" xml-lang="en-US" level="2" l10n="U" oldref="14">ISLEAPYEAR</paragraph> 61*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3150297" xml-lang="en-US" l10n="U" oldref="15"><ahelp hid=".">Determines whether a year is a leap year.</ahelp> If yes, the function will return the value 1 (TRUE); if not, it will return 0 (FALSE).</paragraph> 62*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3148487" xml-lang="en-US" level="3" l10n="U" oldref="16">Syntax</paragraph> 63*cdf0e10cSrcweir<paragraph role="code" id="par_id3150205" xml-lang="en-US" l10n="U" oldref="17">ISLEAPYEAR("Date")</paragraph> 64*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3159239" xml-lang="en-US" l10n="U" oldref="18"> 65*cdf0e10cSrcweir<emph>Date</emph> specifies whether a given date falls within a leap year. The Date parameter must be a valid date according to the locale settings of %PRODUCTNAME.</paragraph> 66*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3149817" xml-lang="en-US" level="3" l10n="U" oldref="19">Example</paragraph> 67*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3150786" xml-lang="en-US" l10n="CHG" oldref="20">=ISLEAPYEAR(A1) returns 1, if A1 contains 1968-02-29, the valid date 29th of February 1968 in your locale setting.</paragraph> 68*cdf0e10cSrcweir<paragraph role="paragraph" id="par_idN107E7" xml-lang="en-US" l10n="CHG">You may also use =ISLEAPYEAR("1968-02-29") or =ISLEAPYEAR("2/29/68").</paragraph> 69*cdf0e10cSrcweir<paragraph role="paragraph" id="par_idN107EA" xml-lang="en-US" l10n="CHG">Never use =ISLEAPYEAR(2/29/68), because this would first evaluate 2 divided by 29 divided by 68, and then calculate the ISLEAPYEAR function from this small number as a serial date number.</paragraph> 70*cdf0e10cSrcweir</section> 71*cdf0e10cSrcweir<section id="years"> 72*cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="index" id="bm_id3154656"><bookmark_value>YEARS function</bookmark_value> 73*cdf0e10cSrcweir<bookmark_value>number of years between two dates</bookmark_value> 74*cdf0e10cSrcweir</bookmark><comment>mw added one entry</comment> 75*cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="hid/SC_HID_DAI_FUNC_DIFFYEARS" id="bm_id3150368" localize="false"/> 76*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3154656" xml-lang="en-US" level="2" l10n="U" oldref="21">YEARS</paragraph> 77*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3150886" xml-lang="en-US" l10n="U" oldref="22"><ahelp hid="HID_DAI_FUNC_DIFFYEARS">Calculates the difference in years between two dates.</ahelp></paragraph> 78*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3154370" xml-lang="en-US" level="3" l10n="U" oldref="23">Syntax</paragraph> 79*cdf0e10cSrcweir<paragraph role="code" id="par_id3146114" xml-lang="en-US" l10n="U" oldref="24">YEARS(StartDate; EndDate; Type)</paragraph> 80*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3145387" xml-lang="en-US" l10n="U" oldref="25"> 81*cdf0e10cSrcweir<emph>StartDate</emph> is the first date</paragraph> 82*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3156290" xml-lang="en-US" l10n="U" oldref="26"> 83*cdf0e10cSrcweir<emph>EndDate</emph> is the second date</paragraph> 84*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3152893" xml-lang="en-US" l10n="U" oldref="27"> 85*cdf0e10cSrcweir<emph>Type</emph> calculates the type of difference. Possible values are 0 (interval) and 1 (in calendar years).</paragraph> 86*cdf0e10cSrcweir</section> 87*cdf0e10cSrcweir<section id="months"> 88*cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="index" id="bm_id3152898"><bookmark_value>MONTHS function</bookmark_value> 89*cdf0e10cSrcweir<bookmark_value>number of months between two dates</bookmark_value> 90*cdf0e10cSrcweir</bookmark><comment>mw added one entry</comment> 91*cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="hid/SC_HID_DAI_FUNC_DIFFMONTHS" id="bm_id3148839" localize="false"/> 92*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3152898" xml-lang="en-US" level="2" l10n="U" oldref="28">MONTHS</paragraph> 93*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3153066" xml-lang="en-US" l10n="U" oldref="29"><ahelp hid="HID_DAI_FUNC_DIFFMONTHS">Calculates the difference in months between two dates.</ahelp></paragraph> 94*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3151240" xml-lang="en-US" level="3" l10n="U" oldref="30">Syntax</paragraph> 95*cdf0e10cSrcweir<paragraph role="code" id="par_id3146869" xml-lang="en-US" l10n="U" oldref="31">MONTHS(StartDate; EndDate; Type)</paragraph> 96*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3145075" xml-lang="en-US" l10n="U" oldref="32"> 97*cdf0e10cSrcweir<emph>StartDate</emph> is the first date</paragraph> 98*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3157981" xml-lang="en-US" l10n="U" oldref="33"> 99*cdf0e10cSrcweir<emph>EndDate</emph> is the second date</paragraph> 100*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3150111" xml-lang="en-US" l10n="U" oldref="34"> 101*cdf0e10cSrcweir<emph>Type</emph> calculates the type of difference. Possible values include 0 (interval) and 1 (in calendar months).</paragraph> 102*cdf0e10cSrcweir</section> 103*cdf0e10cSrcweir<section id="rot13"> 104*cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="index" id="bm_id3159094"><bookmark_value>ROT13 function</bookmark_value> 105*cdf0e10cSrcweir<bookmark_value>encrypting text</bookmark_value> 106*cdf0e10cSrcweir</bookmark><comment>mw added one entry</comment> 107*cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="hid/SC_HID_DAI_FUNC_ROT13" id="bm_id3153283" localize="false"/> 108*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3159094" xml-lang="en-US" level="2" l10n="U" oldref="35">ROT13</paragraph> 109*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3146781" xml-lang="en-US" l10n="U" oldref="36"><ahelp hid="HID_DAI_FUNC_ROT13">Encrypts a character string by moving the characters 13 positions in the alphabet.</ahelp> After the letter Z, the alphabet begins again (Rotation). By applying the encryption function again to the resulting code, you can decrypt the text.</paragraph> 110*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3150893" xml-lang="en-US" level="3" l10n="U" oldref="37">Syntax</paragraph> 111*cdf0e10cSrcweir<paragraph role="code" id="par_id3159205" xml-lang="en-US" l10n="U" oldref="38">ROT13(Text)</paragraph> 112*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3153249" xml-lang="en-US" l10n="U" oldref="39"> 113*cdf0e10cSrcweir<emph>Text</emph> is the character string to be encrypted. ROT13(ROT13(Text)) decrypts the code.</paragraph> 114*cdf0e10cSrcweir</section> 115*cdf0e10cSrcweir<section id="daysinyear"> 116*cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="index" id="bm_id3151300"><bookmark_value>DAYSINYEAR function</bookmark_value> 117*cdf0e10cSrcweir<bookmark_value>number of days; in a specific year</bookmark_value> 118*cdf0e10cSrcweir</bookmark><comment>mw added one entry</comment> 119*cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="hid/SC_HID_DAI_FUNC_DAYSINYEAR" id="bm_id3153972" localize="false"/> 120*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3151300" xml-lang="en-US" level="2" l10n="U" oldref="43">DAYSINYEAR</paragraph> 121*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3143220" xml-lang="en-US" l10n="CHG" oldref="44"><ahelp hid="HID_DAI_FUNC_DAYSINYEAR">Calculates the number of days of the year in which the date entered occurs.</ahelp></paragraph> 122*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3145358" xml-lang="en-US" level="3" l10n="U" oldref="45">Syntax</paragraph> 123*cdf0e10cSrcweir<paragraph role="code" id="par_id3154651" xml-lang="en-US" l10n="U" oldref="46">DAYSINYEAR(Date)</paragraph> 124*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3153803" xml-lang="en-US" l10n="CHG" oldref="47"> 125*cdf0e10cSrcweir<emph>Date</emph> is any date in the respective year. The Date parameter must be a valid date according to the locale settings of %PRODUCTNAME.</paragraph> 126*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3153487" xml-lang="en-US" level="3" l10n="U" oldref="48">Example</paragraph> 127*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3153811" xml-lang="en-US" l10n="CHG" oldref="49">=DAYSINYEAR(A1) returns 366 days if A1 contains 1968-02-29, a valid date for the year 1968.</paragraph> 128*cdf0e10cSrcweir</section> 129*cdf0e10cSrcweir<section id="daysinmonth"> 130*cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="index" id="bm_id3154737"><bookmark_value>DAYSINMONTH function</bookmark_value> 131*cdf0e10cSrcweir<bookmark_value>number of days;in a specific month of a year</bookmark_value> 132*cdf0e10cSrcweir</bookmark><comment>mw added one entry</comment> 133*cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="hid/SC_HID_DAI_FUNC_DAYSINMONTH" id="bm_id3155593" localize="false"/> 134*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3154737" xml-lang="en-US" level="2" l10n="U" oldref="50">DAYSINMONTH</paragraph> 135*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3149316" xml-lang="en-US" l10n="CHG" oldref="51"><ahelp hid="HID_DAI_FUNC_DAYSINMONTH">Calculates the number of days of the month in which the date entered occurs.</ahelp></paragraph> 136*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3145114" xml-lang="en-US" level="3" l10n="U" oldref="52">Syntax</paragraph> 137*cdf0e10cSrcweir<paragraph role="code" id="par_id3150955" xml-lang="en-US" l10n="U" oldref="53">DAYSINMONTH(Date)</paragraph> 138*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3147501" xml-lang="en-US" l10n="CHG" oldref="54"> 139*cdf0e10cSrcweir<emph>Date</emph> is any date in the respective month of the desired year. The Date parameter must be a valid date according to the locale settings of %PRODUCTNAME.</paragraph> 140*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3149871" xml-lang="en-US" level="3" l10n="U" oldref="55">Example</paragraph> 141*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3155742" xml-lang="en-US" l10n="CHG" oldref="56">=DAYSINMONTH(A1) returns 29 days if A1 contains 1968-02-17, a valid date for February 1968.</paragraph> 142*cdf0e10cSrcweir</section> 143*cdf0e10cSrcweir<section id="weeks"> 144*cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="index" id="bm_id3149048"><bookmark_value>WEEKS function</bookmark_value> 145*cdf0e10cSrcweir<bookmark_value>number of weeks;between two dates</bookmark_value> 146*cdf0e10cSrcweir</bookmark><comment>mw added one entry</comment> 147*cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="hid/SC_HID_DAI_FUNC_DIFFWEEKS" id="bm_id3150435" localize="false"/> 148*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3149048" xml-lang="en-US" level="2" l10n="U" oldref="57">WEEKS</paragraph> 149*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3153340" xml-lang="en-US" l10n="U" oldref="58"><ahelp hid="HID_DAI_FUNC_DIFFWEEKS">Calculates the difference in weeks between two dates.</ahelp></paragraph> 150*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3150393" xml-lang="en-US" level="3" l10n="U" oldref="59">Syntax</paragraph> 151*cdf0e10cSrcweir<paragraph role="code" id="par_id3147402" xml-lang="en-US" l10n="U" oldref="60">WEEKS(StartDate; EndDate; Type)</paragraph> 152*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3151387" xml-lang="en-US" l10n="U" oldref="61"> 153*cdf0e10cSrcweir<emph>StartDate</emph> is the first date</paragraph> 154*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3146324" xml-lang="en-US" l10n="U" oldref="62"> 155*cdf0e10cSrcweir<emph>EndDate</emph> is the second date</paragraph> 156*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3166467" xml-lang="en-US" l10n="U" oldref="63"> 157*cdf0e10cSrcweir<emph>Type</emph> calculates the type of difference. The possible values are 0 (interval) and 1 (in numbers of weeks).</paragraph> 158*cdf0e10cSrcweir</section> 159*cdf0e10cSrcweir<section id="weeksinyear"> 160*cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="index" id="bm_id3145237"><bookmark_value>WEEKSINYEAR function</bookmark_value> 161*cdf0e10cSrcweir<bookmark_value>number of weeks;in a specific year</bookmark_value> 162*cdf0e10cSrcweir</bookmark><comment>mw added one entry</comment> 163*cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="hid/SC_HID_DAI_FUNC_WEEKSINYEAR" id="bm_id3146883" localize="false"/> 164*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3145237" xml-lang="en-US" level="2" l10n="U" oldref="64">WEEKSINYEAR</paragraph> 165*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3147410" xml-lang="en-US" l10n="CHG" oldref="65"><ahelp hid="HID_DAI_FUNC_WEEKSINYEAR">Calculates the number of weeks of the year in which the date entered occurs.</ahelp> The number of weeks is defined as follows: a week that spans two years is added to the year in which most days of that week occur.</paragraph> 166*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3149719" xml-lang="en-US" level="3" l10n="U" oldref="66">Syntax</paragraph> 167*cdf0e10cSrcweir<paragraph role="code" id="par_id3145638" xml-lang="en-US" l10n="U" oldref="67">WEEKSINYEAR(Date)</paragraph> 168*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3149946" xml-lang="en-US" l10n="CHG" oldref="68"> 169*cdf0e10cSrcweir<emph>Date</emph> is any date in the respective year. The Date parameter must be a valid date according to the locale settings of %PRODUCTNAME.</paragraph> 170*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3150037" xml-lang="en-US" level="3" l10n="U" oldref="69">Example</paragraph> 171*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3147614" xml-lang="en-US" l10n="CHG" oldref="70">WEEKSINYEAR(A1) returns 53 if A1 contains 1970-02-17, a valid date for the year 1970.</paragraph> 172*cdf0e10cSrcweir</section> 173*cdf0e10cSrcweir</sort> 174*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3157901" xml-lang="en-US" level="2" l10n="U" oldref="72">Add-ins through %PRODUCTNAME API</paragraph> 175*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3149351" xml-lang="en-US" l10n="U" oldref="73">Add-ins can also be implemented through the %PRODUCTNAME <link href="http://api.openoffice.org/">API</link>.</paragraph> 176*cdf0e10cSrcweir<section id="relatedtopics"> 177*cdf0e10cSrcweir<embed href="text/scalc/01/04060100.xhp#drking"/> 178*cdf0e10cSrcweir</section> 179*cdf0e10cSrcweir</body> 180*cdf0e10cSrcweir</helpdocument> 181