PacktLib: Learn Spreadsheet Macro Programming: OOoBasic and Calc automation

Learn Spreadsheet Macro Programming


About the Author

About the Reviewer


Working with OOo's Basic IDE

Before We Start

Accessing the OOo IDE

Designing Dialogs with the IDE


Libraries, Modules, Subroutines, and Functions

Using Libraries

Using Modules

Writing Macros

Getting more Information

Subroutines and Functions in Different Libraries


The OOo Object Model

Why be Interested in UNOs?

Overview of the OOo Object Model

Starting to Work with UNOs

Online Reference Material

A Real Example: Using the Table UNO to Access a Cell

Services within Services

List of Everything You Want to Know About UNOs


Using Macros with Spreadsheets

Opening and Closing Spreadsheets

Manipulating Spreadsheet Cells

Named Worksheets and Cells

Working with Multiple Spreadsheets

Using Ranges of Cells


Formatting your Spreadsheets

The Most Basic Formatting—Column and Row Dimensions

Formatting the Printed Page

Customizing Worksheet Names

Updating the Document Information

Formatting Cells and Ranges of Cells

Online Reference Material


Working with Databases

Accessing Databases

Putting it All into a Spreadsheet

Adding New Records to the Database

Updating the Database


Working with Other Documents

The Chart

Using Documents from Other Sources

Processing Web Pages


Developing Dialogs

Using's Built-In Dialogs

Developing your Own Dialogs

Finding Further Information


Creating a Complete Application

Making Macros and Dialogs Available to Everyone

Using a Global Library to Automate OOo Calc

Adding Macros to the Calc Menu

Keeping It All Hidden

Running Macros from the Command Line

Creating Background or Batch Processes

Sending Emails


Using Excel VBA

The Current State

Installing SUSE Linux 10.1

Building from Source

Importing an Excel Spreadsheet that Contains Macros

Starting to Code with Excel VBA in Calc

Comparing VBA and OOo Basic Code

Further VBA Examples

Further Information