📌 Run Python Script in LibreOffice 📌

Sdílet
Vložit
  • čas přidán 5. 08. 2024
  • Support this channel, become a member:
    / @alltechpage
    🔥 Udemy Courses LOW COST Coupons/ Cupões Cursos Udemy BAIXO CUSTO 🔥:
    linktr.ee/AllTechProgramming
    With Udemy Courses you get/ Com Cursos da Udemy você terá:
    ♾️ Full lifetime access/ Acesso Vitalício Completo
    📱📺 Access on mobile and TV/ Acesso no celular e TV
    🏆 Certificate of completion/ Certificado de Conclusão
    Download source code at: drive.google.com/file/d/1pnDd...
    Useful links:
    PyUNO: wiki.openoffice.org/wiki/PyUN...
    APSO: extensions.libreoffice.org/ex...
    📚 Some useful books from Mike Driscoll 📚:
    Jupyter Notebook 101: gumroad.com/a/635769971/rozo
    Python 101: 2nd Edition: gumroad.com/a/635769971/ikdWt
    Python 201: Intermediate Python: gumroad.com/a/635769971/aMtdh
    Python 101 + Python 201: Intermediate Python: gumroad.com/a/635769971/KnQWc
    Python 101 Book + Screencast: gumroad.com/a/635769971/kaKNo
    wxPython Cookbook: gumroad.com/a/635769971/qdKKu
    Creating GUI Applications with wxPython: gumroad.com/a/635769971/Eogsr
    Pillow: Image Processing with Python: gumroad.com/a/635769971/LRAJQA
    ReportLab: PDF Processing in Python: gumroad.com/a/635769971/bgQJY
    💻 Other cool videos:
    Run Python Script from Excel VBA: • Run Python Script from...
    Run Python Script from Excel VBA - Part 2: • Run Python Script from...
    Run Python Script from Excel VBA - Part 3.1: • Run Python Script from...
    Run Python Script from Excel VBA - Part 3.2: • Run Python Script from...
    🧰
    Generate PDF with Python - Reportlab: • Generate PDF files wit...
    Generate PDF with Python - Reportlab - Create Table: • Generate PDF with Pyth...
    Generate PDF with Python - Reportlab - Create Table - Part 2: • Generate PDF with Pyth...
    Generate PDF with Python - Reportlab - Create Charts: • Generate PDF with Pyth...
    🧰
    Basic Python KeyLogger: • How to do a Basic Pyth...
    Convert .py into .exe: • How to convert .py int...
    Image to Text with Python - pytesseract: • Image to Text with Pyt...
    Speech to Text with Python: • Speech to Text with Py...
    Weather Forecast with Python: • Weather Forecast with ...
    Search Movie with Python - IMDbPY: • Python Connect with IM...
    Generate and Read QR Code with Python: • Generate and Read QR C...
    Run JavaScript from Python: • Run JavaScript from Py...
    Run Python in Browser - Brython: • 📌 Run Python in Browse...
    Hide Text in Image with Python - Stegano: • 📌 Hide Text in Image w...
    HTML to PDF with Python: • HTML to PDF with Pytho...
    Web Scraping with Python - BeautifulSoup: • Web Scraping with Pyth...
    Generate Excel with Python - OpenPyXL: • Python and Excel progr...
    Translate Text with Python - googletrans: • Translate using Python...
    Convert Python 2 to Python 3 Code - 2to3: • Convert Python 2 to Py...
    Face Detection with Python - OpenCV: • OpenCV Python Face Det...
    Generate Excel with Python - xlwings: • Generate Excel with Py...
    RESTful Web Service - Hello World - Java Spring: • RESTful Web Service - ...
    🧲 Playlists:
    Python Pandas: • Pandas
    Python and SQL Server: • Python and SQL Server
    Numpy Exercises: • Numpy Exercises
    ASP.NET Web API C#: • ASP.NET Web API
    📢 Social Media 📢
    Follow me on Facebook
    / alltech-1089946481026048
    Or Twitter
    / alltech34460651
    #LO #LibreOffice #Python #tutorial #AllTech #howto

Komentáře • 64

  • @AllTechPage
    @AllTechPage  Před rokem

    🎅 Christmas Udemy Cupons 🎅 Ends in 1 day! 89% OFF!
    🎁 Python Docx from Beginner to Winner 🎅 www.udemy.com/course/python-docx-from-beginner-to-winner/?couponCode=DECEMBER_19_22
    🎁 Python PDF Handling from Beginner to Winner 2023 🎅 www.udemy.com/course/python-pdf-handling-from-beginner-to-winner/?couponCode=DECEMBER_19_22
    🎁 Python TkInter from Beginner to Winner 2023 🎅 www.udemy.com/course/python-tkinter-from-beginner-to-winner/?couponCode=DECEMBER_19_22
    🎁 Python ReportLab from Beginner to Winner 2023 🎅 www.udemy.com/course/python-reportlab-from-beginner-to-winner/?couponCode=DECEMBER_19_22
    🎅 Cupons de Natal 🎅 Termina em 1 dia! 89% de desconto!
    🎁 Python Docx de Iniciante a Vencedor 🎅 www.udemy.com/course/python-docx-de-iniciante-a-vencedor/?couponCode=DECEMBER_19_22
    🎁 Python Manipulação de PDF de Iniciante a Vencedor 2023 🎅 www.udemy.com/course/python-manipulacao-de-pdf-de-iniciante-a-vencedor/?couponCode=DECEMBER_19_22
    🎁 Python TkInter de Iniciante a Vencedor 2023 🎅 www.udemy.com/course/python-tkinter-de-iniciante-a-vencedor/?couponCode=DECEMBER_19_22
    🎁 Gerando Arquivos PDF com Python e ReportLab 2023 🎅 www.udemy.com/course/gerando-arquivos-pdf-com-python-e-reportlab/?couponCode=DECEMBER_19_22
    🎁 Python ReportLab de Iniciante a Vencedor 2023 🎅 www.udemy.com/course/python-reportlab-de-iniciante-a-vencedor/?couponCode=DECEMBER_19_22

  • @ruben7346
    @ruben7346 Před 2 lety +1

    Thank you very much, this is a very niche topic and you're the only youtube channel i've found that covers it really really well. Wish you a happy new year and lots of health :)

  • @denijane89
    @denijane89 Před 10 měsíci

    Thanks for creating this video and for the files to download. With your help and chatGPT I managed to run my python scripts on LibreOffice.

  • @risc2010
    @risc2010 Před 4 lety +1

    Very useful, thanks for sharing.

  • @moonmoon-eb9ij
    @moonmoon-eb9ij Před rokem +1

    ultra nice :)

  • @lelandreardon7844
    @lelandreardon7844 Před 3 lety +3

    THE CAKE IS NOT A LIE !
    You are VERY CLOSE to getting it to work seamlessly.
    Just wrap all the code you wrote in a function of 0 arguments with the desired name!

    • @aplnx
      @aplnx Před 2 lety

      You are absolutely right! I would like to find a solution to make a call from a buttom in the sheet.

    • @kychemclass5850
      @kychemclass5850 Před 2 lety

      @@aplnx I made a document that describes how to do this. if you give me an e-mail address (even a temp one) I can send it to you. It is v.rough and perhaps a bit childish but it'll do what you want it to do. Let me know ya?

  • @tillmannbaumeister7585
    @tillmannbaumeister7585 Před 3 lety +2

    AWESOMEEEEEE !!!!!

  • @silviogrosso7780
    @silviogrosso7780 Před 4 lety +4

    Very well done: thanks a lot for your tutorial on Python - Calc

  • @e1nste1in
    @e1nste1in Před 4 lety +11

    Amazing effects ;)

  • @Azam_Pakistan
    @Azam_Pakistan Před 6 měsíci

    Does that mean we can not automate actions with python without human intervention (mouse clicks)?

  • @ahmadcreators8906
    @ahmadcreators8906 Před 4 lety

    keep it up brother

  • @MrLitote35
    @MrLitote35 Před 4 lety +1

    Thanks for the video but I have question. Those instructions, where does the class and methods come from ? Do i need to import a module or, is this the python interpreter in Libreffice that can use it directly ?
    desktop = XSCRIPTCONTEXT.getDesktop()
    model = desktop.getCurrentComponent()
    sheet = model.CurrentController.ActiveSheet

    • @AllTechPage
      @AllTechPage  Před 4 lety

      Hello Sibithen, how are you? They are already integrated in libreoffice!

    • @MrLitote35
      @MrLitote35 Před 4 lety +1

      @@AllTechPageI'm fine Thank you and Thank you so much for your fast answer !

  • @sarahpes32
    @sarahpes32 Před 3 lety +1

    thank you very much!!! 👍👌

  • @keerthang5557
    @keerthang5557 Před rokem

    Can we trigger a libreoffice basic macro using python uno?

  • @danielkrajnik3817
    @danielkrajnik3817 Před rokem

    how do you set up IDE? How do you set up autocompletions?

  • @camzilla8733
    @camzilla8733 Před 3 lety +1

    Exellent very useful, tnx

  • @ahmadcreators8906
    @ahmadcreators8906 Před 4 lety +3

    omg your really good i search alot in internet how to Run Python Script in LibreOffice

  • @elarapy1390
    @elarapy1390 Před 4 lety +1

    Good work

  • @user-fy8te7ls6h
    @user-fy8te7ls6h Před 10 měsíci

    Thank you for the teaching, I think your teaching is very good,but in my opinion,the sound of background is too noisy.

  • @mohammedkabashi8779
    @mohammedkabashi8779 Před 3 lety

    how i can load it to my libre calc?
    '

  • @jorgesampaio5635
    @jorgesampaio5635 Před 3 lety +2

    Thanks. Why LibreOffice does not provide a simpler solution that works at the first place?

    • @AllTechPage
      @AllTechPage  Před 3 lety +1

      You're welcome Jorge! About your question, I don't know...but it is usually a common problem in open source software...maybe too many people contributing in a disorganized way, since there is no one doing the job of a "police"...everything goes wild!!!

    • @jorgesampaio5635
      @jorgesampaio5635 Před 3 lety +1

      @@AllTechPage I agree. But the same seems to happen to Python in MS Excel. Some of my students submit Excel spreadsheets with Python code instead of VBA. However they require to put data in the cells, close and save the file, run a python code that reads the date from the cells, does the required calculation, and inserts the results in the appropriate cells, Then one opens the spreadsheet to see the results. This is absolutely inefficient and cumbersome. Therefore, MS Excel does not provide a useful solution, although being a proprietary product.

    • @AllTechPage
      @AllTechPage  Před 3 lety

      Hello Jorge, well Microsoft did not implemented any integration of python into MS Excel...What happens is, there are some python modules that can read and write into excel files. Since xslx files are xml files, there are some people writing this modules, but they are not made from microsoft. About the requirements of your students...Since an Excel File gets locked for writes from other processes, the majority of these modules don't have success working with Excel when it is open, an example is the module openpyxl. Other modules have more success but they are not perfect, an example is xlwings.
      If you want you can take a look into this videos I made:
      python - openpyxl - intro and hello world: czcams.com/video/NQgBiAT11Po/video.html
      Generate Excel with Python - OpenPyXL: czcams.com/video/KNdqnIpl2UE/video.html
      Generate Excel with Python - xlwings: czcams.com/video/sGvMLmLOH5g/video.html
      And the playlist, Excel VBA Python:
      czcams.com/play/PLOGAj7tCqHx-QbL2HxkLC6gdBFCaTAuFU.html
      Tell me what you think :)

  • @ahmadcreators8906
    @ahmadcreators8906 Před 4 lety +1

    but your videos are the best

  • @tecnuevaera9
    @tecnuevaera9 Před 9 měsíci

    gracias, a lot time find this info , is powerfull execute python code in libreoffice

  • @Kazooie
    @Kazooie Před 4 lety +3

    What is wrong with the effects. Maybe not use them to make the video better.

    • @AllTechPage
      @AllTechPage  Před 4 lety

      that's good to know what works and what not... It will help me doing better...Even knowing that it's impossible that everyone likes it :)

    • @Kazooie
      @Kazooie Před 4 lety +1

      @@AllTechPage Yeah that's true. Other than that awesome content and very helpful! Keep it up :)

    • @MrLitote35
      @MrLitote35 Před 4 lety +1

      @@AllTechPage I love the video, bu i shall agree, the effet may be to numerous, it would be better with effect on special moment, and not everytime you do something. But thanks for every thing !

    • @AllTechPage
      @AllTechPage  Před 4 lety

      Thank you very much Kazooie ^.^

    • @AllTechPage
      @AllTechPage  Před 4 lety

      Sibithen uhmmn yes I see!!! Thank you for your big help!!! :)

  • @exploringtechworld
    @exploringtechworld Před 4 měsíci

    How many glasses have you broke making this vid ? 😅

  • @RagHelen
    @RagHelen Před 4 lety +1

    Better make those files in Python and only use Libre to look at them when finished :)

    • @AllTechPage
      @AllTechPage  Před 4 lety +2

      Well at least it is an attempt...maybe in the future the guys develop a properly working tool :)

  • @homejonny9326
    @homejonny9326 Před 4 lety +1

    How to assign the python file execution to a button?

    • @chikaBurton
      @chikaBurton Před 2 lety +1

      first, wrap the code in a function, and make sure that function takes 1 positional parameter (so just any parameter). You can ignore that parameter inside that function, but it is required because button action that calls the function sends 1 parameter. The rest is the same as calling LibreOffice Basic function, you go to button properties and assign your macro to desired action

    • @homejonny9326
      @homejonny9326 Před 2 lety

      @@chikaBurton thanks!

    • @chikaBurton
      @chikaBurton Před 2 lety +1

      @@homejonny9326 no problem, I just started figuring this out. Also, when you edit your code, if it doesn't reflect changes, you'll need to save, close and reopen the document, looks like LO doesn't refresh and update changes to python macros automatically

    • @homejonny9326
      @homejonny9326 Před 2 lety

      @@chikaBurton good to know too!

  • @Canyoucanthecan
    @Canyoucanthecan Před 3 lety +1

    How to code user defined function?

    • @jorgesampaio5635
      @jorgesampaio5635 Před 3 lety

      I also need that. Any feedback?

    • @kychemclass5850
      @kychemclass5850 Před 2 lety

      @@jorgesampaio5635
      from __future__ import unicode_literals
      from scriptforge import CreateScriptService
      def MyPersonalFunction(*args):
      doc = CreateScriptService("Calc")
      if doc.IsCalc:
      FruitList=["orange", "pear", "apple"]
      for counter in range(len(l1)):
      target_cell = doc.Offset("A1", counter,1)
      doc.setValue(target_cell, FruitList[counter])
      else:
      return
      doc.setValue("A6", ("All done!"))
      Drag a Form Control 'push button' onto the spreadsheet. In Control, Events, Execute, click "..." Then macro. Select the macro "MyPersonalFunction" so when button is pressed, code will run.

  • @ZEMRALEX
    @ZEMRALEX Před rokem +1

    Bruh the sounds

  • @XiboquinhaMilGrau
    @XiboquinhaMilGrau Před 3 lety +1

    Duvida em 6:03
    PS.: Uma anotação

  • @mwangijameswamae6169
    @mwangijameswamae6169 Před 3 lety

    A polite request... please consider refraining from the jerky effect as happens at 1:04. It literally makes me feel unwell. (Like physically ill). I don't know why that is...

  • @thiruppathi.9876
    @thiruppathi.9876 Před 4 lety

    sir please server seed hash256 converter in serverseed give me answer

    • @AllTechPage
      @AllTechPage  Před 4 lety

      I can't understand what you're trying to say :/

  • @MattiaConti
    @MattiaConti Před 4 lety +5

    Next challenge : use paint to run a C++ code

  • @stellamn
    @stellamn Před 2 lety

    You are hilarious XD

  • @kychemclass5850
    @kychemclass5850 Před 3 lety

    Thank you so much. I
    (Ed): Am I correct in thinking it is NOT possible to AUTOMATICALLY run the script from, say, a Form Control created button? - i.e. the script can only be run manually as demonstrated in the video?
    If so then an idea is perhaps to 1) make a backup of an existing .py script, e.g. HelloWorkdScript.py, the ones you find in the normal Tools, Macros, Organize Macros, Python window and then 2) Using a text editor dump your own code over the code in that file and save. Try and see if it can be run by a Form control button in LO Calc. If yes, then 3) Rename the modified HelloWorld.py script with a more meaningful name.
    Sadly you'll only be able to get about 6 or 7 user created scripts this way.
    P.S. When I tried to install apso, I got this error:
    "Add Extension(s): C:\Users\__ME__\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\uno_packages\lu989625azs.tmp_\apso.oxt does not exist." so I created the lu989625azs.tmp_ folder at the relevant place and pasted the downloaded apso.oxt file in there. Then I could install the extension as described in the video.

  • @ahmadcreators8906
    @ahmadcreators8906 Před 4 lety

    :)

  • @ahmadcreators8906
    @ahmadcreators8906 Před 4 lety

    ;)