Aufrufen von Calc-Funktionen in Makros

Inhalte
Index 🔎︎

# Calc-Funktionen aufrufen

Zusätzlich zu den nativen BASIC-Funktionen können Sie Calc-Funktionen in Ihren Makros und Skripten aufrufen.

## Aufrufen von internen Calc-Funktionen in Basic

Verwenden Sie die Funktion CreateUNOService, um auf den Dienst com.sun.star.sheet.FunctionAccess zuzugreifen.

### Beispiel:

        REM Der folgende Code funktioniert nicht für Add-In-Funktionen, die eine andere Aufrufprozedur haben.
        Function MyVlook(item, InRange As Object, FromCol As Integer)
            Dim oService As Object
            oService = createUnoService("com.sun.star.sheet.FunctionAccess")
            REM Verwenden Sie immer den englischen Namen der Funktion
            MyVlook = oService.callFunction("VLOOKUP",Array(item, InRange, FromCol, True))
        End Function

## Aufrufen von Add-In-Berechnungsfunktionen in BASIC

Die Calc-Add-In-Funktionen befinden sich im Dienst com.sun.star.sheet.addin.Analysis.

### Beispiel:

    REM Beispiel zum Aufrufen der Add-In-Funktion WURZELPI
    Function MeineWURZELPI(arg as double) as double
       Dim oService as Object
       oService = createUNOService("com.sun.star.sheet.addin.Analysis")
       MeineWURZELPI = oService.getSqrtPi(arg)
    End Function

Calc Function name | UNO service name
AUFGELZINS | com.sun.star.sheet.addin.Analysis.getAccrint
AUFGELZINSF | com.sun.star.sheet.addin.Analysis.getAccrintm
AMORDEGRK | com.sun.star.sheet.addin.Analysis.getAmordegrc
AMORLINEARK | com.sun.star.sheet.addin.Analysis.getAmorlinc
BESSELI | com.sun.star.sheet.addin.Analysis.getBesseli
BESSELJ | com.sun.star.sheet.addin.Analysis.getBesselj
BESSELK | com.sun.star.sheet.addin.Analysis.getBesselk
BESSELY | com.sun.star.sheet.addin.Analysis.getBessely
BININDEZ | com.sun.star.sheet.addin.Analysis.getBin2Dec
BININHEX | com.sun.star.sheet.addin.Analysis.getBin2Hex
BININOKT | com.sun.star.sheet.addin.Analysis.getBin2Oct
KOMPLEXE | com.sun.star.sheet.addin.Analysis.getComplex
UMRECHNEN | com.sun.star.sheet.addin.Analysis.getConvert
ZINSTERMTAGVA | com.sun.star.sheet.addin.Analysis.getCoupdaybs
ZINSTERMTAGE | com.sun.star.sheet.addin.Analysis.getCoupdays
ZINSTERMTAGNZ | com.sun.star.sheet.addin.Analysis.getCoupdaysnc
ZINSTERMNZ | com.sun.star.sheet.addin.Analysis.getCoupncd
ZINSTERMZAHL | com.sun.star.sheet.addin.Analysis.getCoupnum
ZINSTERMVZ | com.sun.star.sheet.addin.Analysis.getCouppcd
KUMZINSZ | com.sun.star.sheet.addin.Analysis.getCumipmt
KUMKAPITAL | com.sun.star.sheet.addin.Analysis.getCumprinc
DEZINBIN | com.sun.star.sheet.addin.Analysis.getDec2Bin
DEZINHEX | com.sun.star.sheet.addin.Analysis.getDec2Hex
DEZINOKT | com.sun.star.sheet.addin.Analysis.getDec2Oct
DELTA | com.sun.star.sheet.addin.Analysis.getDelta
DISAGIO | com.sun.star.sheet.addin.Analysis.getDisc
NOTIERUNGDEZ | com.sun.star.sheet.addin.Analysis.getDollarde
NOTIERUNGBRU | com.sun.star.sheet.addin.Analysis.getDollarfr
LAUFZEIT | com.sun.star.sheet.addin.Analysis.getDuration
EDATUM | com.sun.star.sheet.addin.Analysis.getEdate
EFFEKTIV | com.sun.star.sheet.addin.Analysis.getEffect
MONATSENDE | com.sun.star.sheet.addin.Analysis.getEomonth
GAUSSFEHLER | com.sun.star.sheet.addin.Analysis.getErf
GAUSSFKOMPL | com.sun.star.sheet.addin.Analysis.getErfc
ZWEIFAKULTÄT | com.sun.star.sheet.addin.Analysis.getFactdouble
ZW2 | com.sun.star.sheet.addin.Analysis.getFvschedule
GGT | com.sun.star.sheet.addin.Analysis.getGcd
GGANZZAHL | com.sun.star.sheet.addin.Analysis.getGestep
HEXINBIN | com.sun.star.sheet.addin.Analysis.getHex2Bin
HEXINDEZ | com.sun.star.sheet.addin.Analysis.getHex2Dec
HEXINOKT | com.sun.star.sheet.addin.Analysis.getHex2Oct
IMABS | com.sun.star.sheet.addin.Analysis.getImabs
IMAGINÄRTEIL | com.sun.star.sheet.addin.Analysis.getImaginary
IMARGUMENT | com.sun.star.sheet.addin.Analysis.getImargument
IMKONJUGIERT | com.sun.star.sheet.addin.Analysis.getImconjugate
IMCOS | com.sun.star.sheet.addin.Analysis.getImcos
IMCOSHYP | com.sun.star.sheet.addin.Analysis.getImcosh
IMCOT | com.sun.star.sheet.addin.Analysis.getImcot
IMCOSEC | com.sun.star.sheet.addin.Analysis.getImcsc
IMCOSECHYP | com.sun.star.sheet.addin.Analysis.getImcsch
IMDIV | com.sun.star.sheet.addin.Analysis.getImdiv
IMEXP | com.sun.star.sheet.addin.Analysis.getImexp
IMLN | com.sun.star.sheet.addin.Analysis.getImln
IMLOG10 | com.sun.star.sheet.addin.Analysis.getImlog10
IMLOG2 | com.sun.star.sheet.addin.Analysis.getImlog2
IMPOTENZ | com.sun.star.sheet.addin.Analysis.getImpower
IMPRODUKT | com.sun.star.sheet.addin.Analysis.getImproduct
IMREALTEIL | com.sun.star.sheet.addin.Analysis.getImreal
IMSEC | com.sun.star.sheet.addin.Analysis.getImsec
IMSECHYP | com.sun.star.sheet.addin.Analysis.getImsech
IMSIN | com.sun.star.sheet.addin.Analysis.getImsin
IMSINHYP | com.sun.star.sheet.addin.Analysis.getImsinh
IMWURZEL | com.sun.star.sheet.addin.Analysis.getImsqrt
IMSUB | com.sun.star.sheet.addin.Analysis.getImsub
IMSUMME | com.sun.star.sheet.addin.Analysis.getImsum
IMTAN | com.sun.star.sheet.addin.Analysis.getImtan
ZINSSATZ | com.sun.star.sheet.addin.Analysis.getIntrate
ISTGERADE | com.sun.star.sheet.addin.Analysis.getIseven
ISTUNGERADE | com.sun.star.sheet.addin.Analysis.getIsodd
KGV | com.sun.star.sheet.addin.Analysis.getLcm
MLAUFZEIT | com.sun.star.sheet.addin.Analysis.getMduration
VRUNDEN | com.sun.star.sheet.addin.Analysis.getMround
POLYNOMIAL | com.sun.star.sheet.addin.Analysis.getMultinomial
NETTOARBEITSTAGE | com.sun.star.sheet.addin.Analysis.getNetworkdays
NOMINAL | com.sun.star.sheet.addin.Analysis.getNominal
OKTINBIN | com.sun.star.sheet.addin.Analysis.getOct2Bin
OKTINDEZ | com.sun.star.sheet.addin.Analysis.getOct2Dec
OKTINHEX | com.sun.star.sheet.addin.Analysis.getOct2Hex
UNREGERKURS | com.sun.star.sheet.addin.Analysis.getOddfprice
UNREGERREND | com.sun.star.sheet.addin.Analysis.getOddfyield
UNREGLEKURS | com.sun.star.sheet.addin.Analysis.getOddlprice
UNREGLEREND | com.sun.star.sheet.addin.Analysis.getOddlyield
KURS | com.sun.star.sheet.addin.Analysis.getPrice
KURSDISAGIO | com.sun.star.sheet.addin.Analysis.getPricedisc
KURSFÄLLIG | com.sun.star.sheet.addin.Analysis.getPricemat
QUOTIENT | com.sun.star.sheet.addin.Analysis.getQuotient
ZUFALLSBEREICH | com.sun.star.sheet.addin.Analysis.getRandbetween
AUSZAHLUNG | com.sun.star.sheet.addin.Analysis.getReceived
POTENZREIHE | com.sun.star.sheet.addin.Analysis.getSeriessum
WURZELPI | com.sun.star.sheet.addin.Analysis.getSqrtpi
TBILLÄQUIV | com.sun.star.sheet.addin.Analysis.getTbilleq
TBILLKURS | com.sun.star.sheet.addin.Analysis.getTbillprice
TBILLRENDITE | com.sun.star.sheet.addin.Analysis.getTbillyield
KALENDERWOCHE | com.sun.star.sheet.addin.Analysis.getWeeknum
ARBEITSTAG | com.sun.star.sheet.addin.Analysis.getWorkday
XINTZINSFUSS | com.sun.star.sheet.addin.Analysis.getXirr
XKAPITALWERT | com.sun.star.sheet.addin.Analysis.getXnpv
BRTEILJAHRE | com.sun.star.sheet.addin.Analysis.getYearfrac
RENDITE | com.sun.star.sheet.addin.Analysis.getYield
RENDITEDIS | com.sun.star.sheet.addin.Analysis.getYielddisc
RENDITEFÄLL | com.sun.star.sheet.addin.Analysis.getYieldmat

Verwandte Themen

Funktion CreateUnoService