Skip to main content

Python wrapper for the VBA Object library

Project description

Matita - Full Microsoft Office automation in Python ✏️

Matita is a Python wrapper for the VBA Object library. You get the full power of VBA with the convenience of Python. See the documentation for more details.

<iframe width="560" height="315" src="https://www.youtube.com/embed/l5CBSrZSH-g?si=mrPU2qZWQlwfYbCF" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

Hello world with matita

Excel 📊

from matita.office import excel as xl

def hello_world():
    xl_app = xl.Application()
    xl_app.visible = True

    wkb = xl_app.workbooks.add()
    wks = wkb.worksheets(1)
    c = wks.cells(1,1)
    c.value = "Hello world!"

PowerPoint 🖼️

from matita.office import powerpoint as pp

def hello_world():
    pp_app = pp.Application()
    pp_app.visible = True
    prs = pp_app.presentations.add()
    sld = prs.slides.add(1, pp.ppLayoutText)
    shp = sld.shapes.addshape(pp.msoShapeRectangle, 100, 100, 200, 100)
    shp.text_frame.text_range.text = "Hello world!"

Word 📄

from matita.office import word as wd

def hello_world():
    wd_app = wd.Application()
    wd_app.visible = True
    doc = wd_app.documents.add()
    par = doc.content.paragraphs.add()
    par.range.text = "Hello world!"

Outlook 📧

from matita.office import outlook as ol

def hello_world():
    ol_app = ol.Application()
    mail = ol.MailItem(ol_app.create_item(ol.olMailItem))
    mail.body = "Hello world!"
    mail.display()

Installation

python -m pip install matita

License

Copyright 2026 Luca Franceschini (lucaf.eu)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

This program is based on the Office VBA Reference by Microsoft Corporation, licensed under Creative Commons Attribution 4.0 International.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

matita-1.0.1.post1.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

matita-1.0.1.post1-py3-none-any.whl (852.5 kB view details)

Uploaded Python 3

File details

Details for the file matita-1.0.1.post1.tar.gz.

File metadata

  • Download URL: matita-1.0.1.post1.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for matita-1.0.1.post1.tar.gz
Algorithm Hash digest
SHA256 42a2bde3762c790d87653d281e8f3109ced623e20a1313517a0284e34da2ebb6
MD5 c0f319eb1a2709e89d30511813470c92
BLAKE2b-256 edd903b703b7837a6797796d3e71cfe5313673b65375cbf8eb3d985aeb5ae6e2

See more details on using hashes here.

File details

Details for the file matita-1.0.1.post1-py3-none-any.whl.

File metadata

  • Download URL: matita-1.0.1.post1-py3-none-any.whl
  • Upload date:
  • Size: 852.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for matita-1.0.1.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 4e5403368891086fdc811b717655f7c62ae099a534caf80214c02e0258dad096
MD5 985dd24e4fbd9af97b1916a5a4820122
BLAKE2b-256 02d09ae58e9391de333ef5d51fa2059aa6aec42c7e6aa70708835fe0c3122dcb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page