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
--
Visitez http://christianwtd.free.fr/ pour débuter avec Calc, d'OpenOffice.org
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]