

![]() | 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: |
5 messages in org.openoffice.fr.progRe: [prog] getProgrammaticFuntionName| From | Sent On | Attachments |
|---|---|---|
| Olivier Villatte | Apr 24, 2006 6:58 am | |
| Jacques Lenglet | Apr 24, 2006 2:40 pm | |
| Olivier Villatte | Apr 25, 2006 12:05 pm | |
| Francois Gatto | Apr 25, 2006 10:33 pm | |
| Olivier Villatte | Apr 27, 2006 12:16 pm |

![]() | 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] getProgrammaticFuntionName | Actions... |
|---|---|---|
| From: | Francois Gatto (oo...@volcar.org) | |
| Date: | Apr 25, 2006 10:33:28 pm | |
| List: | org.openoffice.fr.prog | |
Bonjour Olivier,
Je n'ai jamais utilisé mais je te propose ce genre de solution :
Sub ListeEnglishFunctionName()
oSheet = ThisComponent.getSheets().getByIndex(0) oCell = oSheet.getCellByPosition(1, 7)
myfunc = CreateUnoService("com.sun.star.sheet.FunctionDescriptions") localfunction() = myfunc.getElementNames()
For i = 0 to UBound(localfunction())
'on affecte à une cellule la fonction localisée 'avec des paramètres fictifs pour éviter le rejet localName = localfunction(i) oCell.FormulaLocal = chr(61) & localName & "(E3;E7)"
'puis à partir de la cellule "source" on récupère la formule en anglais oCell2 = oSheet.getCellByPosition(2, i) 'affiche résultats en Ci oCell2.String = oCell.Formula
Next i
End Sub
Olivier Villatte a écrit :
bonjour Jacques, tous
On obtient effectivement la liste des fonctions, mais en "français". ex: "MAINTENANT"
ce que je cherche à faire avec getProgrammaticFuntionName, c'est récupérer le nom "interne" de la fonction. ex : "NOW". D'autres methodes de com.sun.star.sheet.AddIn doivent également permettre de récuperer la liste des paramètres à passer aux fonctions.
Olivier
Jacques Lenglet a écrit :
Bonjour Olivier
j'ai testé ton code avec la modif suivante
for i=0 to UBound(localfunction) tempvar = localfunction(i) MsgBox("fonction " & i & " : " & tempvar) ' pour controle next i
on obtient la liste des fonctions (366 chez moi)
Cordialement
JackL
Olivier Villatte a écrit :
Bonjour,
j'essaie de récupérer la liste exhaustive des fonctions calc, c'est a dire le nom localisé et le nom utilisable par CreateUnoService("com.sun.star.sheet.FunctionAccess").callfunction
j'ai testé le code suivant et je récupère bien la liste compléte des fonctions "localisées" mais tempvar est toujours vide....
myfunc = CreateUnoService("com.sun.star.sheet.FunctionDescriptions") AddinService = CreateUnoService("com.sun.star.sheet.AddIn") localfunction = myfunc.getElementNames() For i = 0 to UBound(localfunction) tempvar = AddinService.getProgrammaticFuntionName(localfunction(i)) Next i
quelqu'un a une idée ?
Olivier
-- Francois GATTO







