Free Sample
+ Collection

Learn Spreadsheet Macro Programming: OOoBasic and Calc automation

Dr Mark Alexander Bain

A fast and friendly tutorial to writing macros and spreadsheet applications
RRP $23.99
RRP $39.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781847190970
Paperback220 pages

About This Book

  • Discover the power of the macro language and Calc object model
  • Fast, fun, friendly step-by-step OOoBasic tutorial
  • Practical and realistic examples to apply to your daily work
  • This book covers version 2.0.4 for Windows and version 2.0.2 for Linux

Who This Book Is For

You don’t need to be a programmer to use this book, but you do need to be familiar with the concept of a program and how simple things like a loop might work. If all you have is a taster of simple programs from high school then you will be fine.

Table of Contents

Chapter 1: Working with OOo's Basic IDE
Before We Start
Accessing the OOo IDE
Designing Dialogs with the IDE
Chapter 2: Libraries, Modules, Subroutines, and Functions
Using Libraries
Using Modules
Writing Macros
Getting more Information
Subroutines and Functions in Different Libraries
Chapter 3: 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
Chapter 4: Using Macros with Spreadsheets
Opening and Closing Spreadsheets
Manipulating Spreadsheet Cells
Named Worksheets and Cells
Working with Multiple Spreadsheets
Using Ranges of Cells
Chapter 5: 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
Chapter 6: Working with Databases
Accessing Databases
Putting it All into a Spreadsheet
Adding New Records to the Database
Updating the Database
Chapter 7: Working with Other Documents
The Chart
Using Documents from Other Sources
Processing Web Pages
Chapter 8: Developing Dialogs
Using's Built-In Dialogs
Developing your Own Dialogs
Finding Further Information
Chapter 9: 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
Chapter 10: 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

What You Will Learn

  • How to create custom Calc applications
  • Creating worksheet functions, automating repetitive tasks, creating new toolbars, menus, and dialog boxes
  • A complete guide to the  IDE, language, and object model
  • Integrating Calc applications with other components of
  • Internet-based collaborative applications
  • How to understand, use and adapt the increasing number of freely available Calc Macros

In Detail

Adding macros to your spreadsheets enables you to add data processing features to your work, automate repetitive tasks, and even create complete data-driven programs that use the spreadsheet as their back end.

This book teaches the OOoBasic language and the Calc object model, so that you can manipulate spreadsheets and data from within your programs. You will also see how to create dialog boxes and windows for friendly user interfaces, and how to integrate your spreadsheets with other applications, for example writing spreadsheet data to a document, or capturing data from a database, and using the spreadsheet for generating advanced calculations and reports.

Calc is's spreadsheet module. Like the rest of Calc can be programmed using the built-in language OOoBasic. Both simple macros and complex applications can be developed in this language by controlling Calc through its object model. The book is compatible with the commercial version of, StarOffice, and the StarBasic language.


Read More