Python (pyuno) “Hello World” Addon for OpenOffice

Written By
MF
Mitch Frazier
Feb 7, 2009

“As is the law, our first program when doing something new has
to be a “Hello World” program. The idea here is to add an option to
the OpenOffice menu which will insert “Hello World” into the first
cell of a spreadsheet. As a starting point for this example I used
an example from the pyuno udk site (the second “Hello World”
example on the page).

“The example there does essentially the same thing as the
example here except there it inserts “Hello World” into a Writer
(Word Processor) document rather than a spreadsheet. One would
assume that it would be a fairly easy conversion, and once I knew
the answer it was. The hard part was figuring out how to get the
“spreadsheet” object and then how to get a “cell” object from it.
And it wasn’t so much hard as just time consuming trying to find
the right information in the documentation.

“After a few hours of searching and a few false starts I came
across the two needed interfaces: XSpreadsheetDocument and XCell.
These gave me what I needed to modify the example to work with a
spreadsheet:”

Advertisement


Complete Story

MF

Mitch Frazier

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.