📌 Run Python Script in LibreOffice 📌
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
🎅 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
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 :)
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.
Very useful, thanks for sharing.
ultra nice :)
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!
You are absolutely right! I would like to find a solution to make a call from a buttom in the sheet.
@@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?
AWESOMEEEEEE !!!!!
Thank you Tillmann
Very well done: thanks a lot for your tutorial on Python - Calc
Thank you Sílvio ^.^
Amazing effects ;)
Thank youuu :)
Does that mean we can not automate actions with python without human intervention (mouse clicks)?
keep it up brother
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
Hello Sibithen, how are you? They are already integrated in libreoffice!
@@AllTechPageI'm fine Thank you and Thank you so much for your fast answer !
thank you very much!!! 👍👌
you're welcome 😄
Can we trigger a libreoffice basic macro using python uno?
how do you set up IDE? How do you set up autocompletions?
Exellent very useful, tnx
thank youuuuu 😊🙌
omg your really good i search alot in internet how to Run Python Script in LibreOffice
Thank you Ahmad :)
Good work
Thank you again Elarapy :)
Thank you for the teaching, I think your teaching is very good,but in my opinion,the sound of background is too noisy.
how i can load it to my libre calc?
'
Thanks. Why LibreOffice does not provide a simpler solution that works at the first place?
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!!!
@@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.
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 :)
but your videos are the best
gracias, a lot time find this info , is powerfull execute python code in libreoffice
What is wrong with the effects. Maybe not use them to make the video better.
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 :)
@@AllTechPage Yeah that's true. Other than that awesome content and very helpful! Keep it up :)
@@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 !
Thank you very much Kazooie ^.^
Sibithen uhmmn yes I see!!! Thank you for your big help!!! :)
How many glasses have you broke making this vid ? 😅
Better make those files in Python and only use Libre to look at them when finished :)
Well at least it is an attempt...maybe in the future the guys develop a properly working tool :)
How to assign the python file execution to a button?
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
@@chikaBurton thanks!
@@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
@@chikaBurton good to know too!
How to code user defined function?
I also need that. Any feedback?
@@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.
Bruh the sounds
Duvida em 6:03
PS.: Uma anotação
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...
sir please server seed hash256 converter in serverseed give me answer
I can't understand what you're trying to say :/
Next challenge : use paint to run a C++ code
You are hilarious XD
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.
:)
;)