4 messages in org.openoffice.fr.progFormulaLocal et nom de fonction
FromSent OnAttachments
christianwtdSep 24, 2006 8:02 am 
christianwtdSep 24, 2006 8:05 am 
Manuel NAUDINSep 24, 2006 9:34 am 
christianwtdSep 24, 2006 11:48 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:FormulaLocal et nom de fonctionActions...
From:christianwtd (chri@free.fr)
Date:Sep 24, 2006 8:02:08 am
List:org.openoffice.fr.prog

Bonjour à tous,

Je viens de voir un truc qui me semble curieux avec FormulaLocal. Regardez les 2 listings suivants, ils font la même chose mais FormulaLocal est écrit différemment.

Listing 1 :

Sub FormulaTests Dim oDocument As Object, oSheet As Object, oCell As Object ' oDocument = ThisComponent oSheet=oDocument.Sheets.getByName("Feuille1") For i =1 to 10 oCell = oSheet.getCellByPosition(0, i) oCell.Value = i Next i oSheet.getCellByPosition(0,i).FormulaLocal = "=SOMME(A2:A11)" End Sub

et Listing 2 :

Sub FormulaTests Dim oDocument As Object, oSheet As Object, oCell As Object ' oDocument = ThisComponent oSheet=oDocument.Sheets.getByName("Feuille1") For i =1 to 10 oCell = oSheet.getCellByPosition(0, i) oCell.Value = i Next i oCell = oSheet.getCellByPosition(0, i) oCell.Formula = "=SUM(A2:A11)" End Sub

Vous avez vu la différence ? Dans un cas on utilise la fonction française (SOMME) et dans l'autre anglaise (SUM). Si vous inversez ça marche plus, enfin chez moi c'est comme ça. (OOo 2.0.3 et Win XP)

Est-ce normal ?

D'avance merci, Bon surf, Christian