

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
12 messages in org.openoffice.fr.progRe: [prog] Re: Feuille courante dans...| From | Sent On | Attachments |
|---|---|---|
| Aladdin | Apr 26, 2007 10:07 am | |
| Francois Gatto | Apr 26, 2007 11:03 am | |
| Aladdin | Apr 27, 2007 1:28 am | |
| Philippe Allart | Apr 27, 2007 3:26 am | |
| Aladdin | May 9, 2007 6:38 am | |
| Aladdin | May 10, 2007 7:03 am | |
| Francois Gatto | May 10, 2007 10:08 am | |
| Aladdin | May 11, 2007 3:01 am | |
| steve | May 11, 2007 3:10 am | |
| Aladdin | May 11, 2007 5:54 am | |
| steve | May 11, 2007 6:08 am | |
| Aladdin | May 14, 2007 5:59 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: [prog] Re: Feuille courante dans une fonction ? | Actions... |
|---|---|---|
| From: | steve (hube...@wanadoo.fr) | |
| Date: | May 11, 2007 3:10:44 am | |
| List: | org.openoffice.fr.prog | |
Aladdin a écrit :
J'ai testé avec =MYFUNC("parametre1","parametre2",CELLULE("Sheet")) mais cela ne fonctionne pas, on dirait qu'il ne connait pas thisComponent au chargement du fichier.
Function myfunc(param As String, param2 As String, index As Integer) ... thisComponent.Sheets.getByIndex(index - 1) ... End Function
Même résultat en passant par StarDesktop.CurrentComponent.
Comment faire une fonction personnalisée qui fait référence à la feuille où la fonction est appelée ?
!!! Je ne comprends pas très bien. Si c'est à partir de la feuille active, quelle référence veux-tu appeler ?
Sinon, quelque chose comme ci-dessous doit fonctionner avec une saisie de la forme : =MAFONCTION(32;45;"Feuille2")
function MaFonction( dPar1 as double, sPar2 as string, sName as string ) dim oSheet as object oSheet = thisComponent.getSheets().getByName( sName ) with oSheet .getCellByPosition( 5, 10 ).value = dPar1 .getCellByPosition( 5, 11 ).string = sPar2 end with end function
Le problème survient au chargement du document lorsque je fais appel à ma fonction personnalisée dans les différentes feuilles.
Function myfunc(param As String, param2 As String, index As Integer) ... thisComponent.Sheets.getByIndex(index - 1) ... End Function
Il ne connait pas thisComponent, j'ai regardé avec xray StarDesktop mais tout les objets sont nuls.
Comment fait on pour accéder à la feuille où la fonction personnalisée est appelée lors du chargement du document ? Etant donnée que thisComponent est NULL.
Merci à vous.
J'avais déjà essayé de modifier une autre cellule par l'intermédiaire d'une fonction dans une cellule de calc. On m'avait dit sur la liste que cela n'était pas possible, je me demandais si ton problème était en lien avec le mien j'ai donc vérifié si pour une fonction thiscomponent était null, ce n'était pas le cas pour moi.dans la vérification. Peut être devrais tu attribuer la ligne à une variable? mes 5cts ç la résolution... Steve
--------------------------------------------------------------------- To unsubscribe, e-mail: prog...@fr.openoffice.org For additional commands, e-mail: prog...@fr.openoffice.org
--------------------------------------------------------------------------------------- Orange vous informe que cet e-mail a ete controle par l'anti-virus mail. Aucun virus connu a ce jour par nos services n'a ete detecte.







