Ayuda de LibreOffice 24.8
Les funciones personalizaes puen utilizase en LibreOffice Calc de les siguientes maneres:
Por aciu la IDE de Basic puen definise funciones propies, entá ensin tener conocencies avanzaes de programación.
Les funciones puen programase como add-ins. Esti métodu esixe conocencies avanzaes de programación.
Choose
.You will now see the Basic IDE.
In the Object Catalog window, double-click on the module where you want to store your macro.
Enter the function code. In this example, we define a VOL(a; b; c) function that calculates the volume of a rectangular solid with side lengths a, b and c:
Function VOL(a, b, c)
VOL = a*b*c
End Function
Zarra la ventana de la IDE de Basic.
Your function is automatically saved in the selected module and is now available. If you apply the function in a Calc document that is to be used on another computer, you can copy the function to the Calc document as described in the next section.
Nel pasu 2 de "Definir una función con LibreOffice Basic", nel diálogu Macro , fixo clic en Editar. De mou predetermináu, nel campu Macro dende atópase escoyíu'l módulu Los mios macros - Estándar - Módulu1. La biblioteca Estándar atopar nel direutoriu del usuariu de mou llocal.
Si deseya copiar la función definida pol usuariu nun documentu de Calc:
Choose
.Nel campu Macro dende, escueya Los mios macros - Estándar - Módulu1 y faiga clic en Editar.
Na IDE de Basic, escueya l'orixe de la función definida pol usuariu y cópielo nel cartafueyu.
Zarra la IDE de Basic.
Choose
.Nel campu Macro dende, escueya (Nome de documentu de Calc) - Estándar - Módulu1. Faiga clic en Editar.
Pege el conteníu del cartafueyu nel Basic-IDE del documentu.
Once you have defined the function VOL(a; b; c) in the Basic-IDE, you can apply it the same way as the built-in functions of LibreOffice Calc.
Open a Calc document and enter numbers for the function parameters a, b and c in cells A1, B1, and C1.
Coloque'l cursor n'otra caxella ya introduza lo siguiente:
=VOL(A1;B1;C1)
La función evalúase y la resultancia reparar na caxella escoyida.