Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


Bonjour


claude-2 wrote
J'aimerais vérifier avec la macro l'affichage des formule et même mieux le
forcer.

Ci-dessous un exemple qui commence par tester et afficher la valeur 
courante de l'option puis qui force en affichage Excel L1C1.

Nota : l'interface ne propose pas toutes les valeurs listées sur la doc
IDL...

Cordialement
Pierre-Yves


option explicit

sub TesterConf

dim oFormulaSyntax as object

globalScope.basicLibraries.loadLibrary("Tools")

oFormulaSyntax =
getRegistryKeyContent("org.openoffice.Office.Calc/Formula/Syntax", true)

if oFormulaSyntax.hasByName("Grammar") then
        select case oFormulaSyntax.grammar
                case com.sun.star.sheet.AddressConvention.UNSPECIFIED
                        msgbox "Non spécifié...", 64, "Syntaxe des formules"
                case com.sun.star.sheet.AddressConvention.OOO
                        msgbox "Calc A1", 64, "Syntaxe des formules"
                case com.sun.star.sheet.AddressConvention.XL_A1
                        msgbox "Excel A1", 64, "Syntaxe des formules"
                case com.sun.star.sheet.AddressConvention.XL_R1C1
                        msgbox "Excel L1C1", 64, "Syntaxe des formules"
                case com.sun.star.sheet.AddressConvention.XL_OOX
                        msgbox "Excel OOX", 64, "Syntaxe des formules"
                case com.sun.star.sheet.AddressConvention.LOTUS_A1
                        msgbox "LOTUS_A1", 64, "Syntaxe des formules"
                case else
                        msgbox "Configuration non prévue...", 16, "Syntaxe des formules"
        end select
else
        msgbox "Configuration non prévue...", 16, "Syntaxe des formules"
end if

oFormulaSyntax.setPropertyValue("Grammar",
com.sun.star.sheet.AddressConvention.XL_R1C1)
oFormulaSyntax.commitChanges

end sub





--
View this message in context: 
http://nabble.documentfoundation.org/Re-Fwd-fr-users-Re-calc-macro-propriete-formulalocal-tp4127497p4127567.html
Sent from the Users mailing list archive at Nabble.com.

-- 
Envoyez un mail à users+unsubscribe@fr.libreoffice.org pour savoir comment vous désinscrire
Les archives de la liste sont disponibles à http://listarchives.libreoffice.org/fr/users/
Tous les messages envoyés sur cette liste seront archivés publiquement et ne pourront pas être 
supprimés

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.