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


Bonjour,

Je souhaite intégrer une variable dans une commande faisant appel à la méthode DrawPage.

PysGraph = oSheet1.DrawPage("photo1")

Remplacer "photo1" par une variable issue d'une liste déroulante sur autre feuille

voilà la totalité du code:

oDoc = thisComponent
PysFrame   = oDoc.CurrentController.Frame
oSheet1 = oDoc.sheets.getByName("base")
PysGraph = oSheet1.DrawPage("photo1") -> appeler si possible, au lieu de "photo1" une variable correspondant à la valeur de la cellule C3 de oSheet2 contenant une liste de nom de photo
oSheet2 = oDoc.sheets.getByName("appel")
PysCell = oSheet2.getCellRangeByName("F7")PysCell = oSheet2.getCellRangeByName("F7")
oDoc.currentcontroller.select(PysGraph)
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dispatcher.executeDispatch(PysFrame, ".uno:Copy", "", 0, Array())
oDoc.currentController.select(PysCell)
dispatcher.executeDispatch(PysFrame, ".uno:Paste", "", 0, Array()

Merci de votre aide

Michel Blanchard


--
Envoyez un mail à users+unsubscribe@fr.libreoffice.org pour vous désinscrire
Les archives de la liste sont disponibles à https://listarchives.libreoffice.org/fr/users/
Privacy Policy: https://www.documentfoundation.org/privacy

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.