3 messages in org.openoffice.fr.prog[prog] recherche dans des cellules
FromSent OnAttachments
Gerard KohlerDec 18, 2005 4:17 am 
Bernard MarcellyDec 18, 2005 9:22 am 
Gerard KohlerDec 18, 2005 11:06 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:[prog] recherche dans des cellulesActions...
From:Gerard Kohler (koh@oceanetpro.net)
Date:Dec 18, 2005 4:17:26 am
List:org.openoffice.fr.prog

bonjour,

j'aimerai rechercher des cellules dans une feuille selon un motif donné, et faire subir à chaque cellule trouvée un traitement adpté.

je bloque car je ne trouve que la première cellule de chaque zone, et je n'arrive pas à trouver toutes les cellule de la zone.

ce doit être trivial, mais je seche.

merci de votre aide

Gérad

voici mon programme :

REM ***** BASIC *****

Sub Main change_cel() End Sub

sub change_cel rem ---------------------------------------------------------------------- rem define variables dim document as object dim maFeuille as object dim maCellule as object dim jeCherche as object dim trouv as variant dim x as long rem ---------------------------------------------------------------------- rem get access to the document document = ThisComponent maFeuille = document.Sheets.getByName("Feuille1") jeCherche = maFeuille.createSearchDescriptor with jeCherche .SearchString = "xyz" .SearchWords = false end with trouv = maFeuille.findAll(jeCherche) for x = 0 to trouv.count - 1 maCellule = trouv(x).getCellByPosition(0,0) ' comment trouver les coordonnées de toutes les cellules de la zone ? macellule.String = fonction_test() next end sub

sub fonction_test

end sub