3 messages in org.openoffice.fr.progRe: [prog] RE : [prog] [calc] format ...
FromSent OnAttachments
Vincent MorlotJun 10, 2004 2:16 pm 
michel tanguyJun 11, 2004 11:27 am 
Vincent MorlotJun 12, 2004 12: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:Re: [prog] RE : [prog] [calc] format de celluleActions...
From:Vincent Morlot (vinc@free.fr)
Date:Jun 12, 2004 12:48:10 am
List:org.openoffice.fr.prog

Bonjour, Ca marche Pourtant je croyais avoir essayé cela Merçi

michel tanguy a écrit :

Bonsoir Vincent

Est-ce que la macro ci-dessous peut repondre à ta demande ?

Option Explicit Sub FormatDansPlageCellule Dim oSheet As Object,oPlage As Object oSheet=ThisComponent.Sheets.getByName("Feuille1") oPlage=oSheet.getCellRangeByPosition(0,0,3,3)

oPlage.NumberFormat = 11'pourcentage

End Sub

Bonne soiree michel

-----Message d'origine----- De : Vincent Morlot [mailto:vinc@free.fr] Envoyé : jeudi 10 juin 2004 23:16 À : pr@fr.openoffice.org Objet : [prog] [calc] format de cellule

Bonsoir, Je cherche le moyen d'imposer à une cellule ou à un ensemble de cellules

un format d'affichage particulier ( %) à partir d'une macro. J'ai trouvé des exemples comme ceci mais qui n'apporte pas de modifications

dim oFormats as Object oFormats = xDoc.NumberFormats dim aLocale as new com.sun.star.lang.Locale ...... Selection = Feuille.getCellRangeByPosition (2 + (cpt * 2), 3,3 + (cpt * 2), 3) Selection.NumberFormat = oFormats.getStandardFormat( com.sun.star.util.NumberFormat.PERCENT, aLocale)

Merçi