I have been helping a friend with a website that is exploding in popularity, was developed in HTML/CSS and has no intention of switching to a CMS, and has a registration/supporters page that has grown too fast to maintain with copy and paste.
I did a quick Excel formula that generated equivalent HTML to what GoLive produced and switched the registration form to a Google form that leaves the results in a Google Apps spreadsheet (eliminating data entry).
I have Excel 2003/2007 on my PC, she has Excel 2008 on her Mac, the thought was to write an Excel macro that would automate the maintenance of that page, so I did.
Whenever I got stuck, I had code examples in the Excel VBA help file and loads of examples via Google.
After a day of playing around with the macro (mostly learning how to dynamically identify how many rows are actually being used in an Excel worksheet), I had a fully functional pair of macros (one to facilitate preprocessing the updates before integrating to the master list, the other to covert the master list to HTML).
Guess what? Excel 2008 for Mac doesn’t have VBA support! Shame on you Microsoft!
I would never have expected Microsoft to leave out a major feature in the latest version of Excel.
In searching around for a solution we came up with the idea of using the latest version of Open Office, which had the same macro support across platforms.
While most of Open Office is absolutely compatible with Microsoft Excel, it would appear macros are not.
I did find a reference to Option VBASupport 1 that is supposed to enable VBA support in Open Office macros. While it did prevent the macro from being commented out, when I tried to execute it, I kept getting errors every time the code reached a VBA object. I presume some library wasn’t loaded (either during installation or at run time) and even the might Google search didn’t uncover an answer. Plus I figured if I couldn’t make it work “out of the box” my Mac friend wouldn’t be able to either.
So on to Plan B, convert my relatively simple VBA macros into openoffice.org Basic macros. Sounds like a straightforward process, right?
The documentation for the openoffice.org object model sucks! It really sucks.
Where VBA has lots of code examples in the help file, and even more via Google, I found there was virtually none for openoffice.org Basic (I’m sure that comment will generate lots of flames). Plus the documentation appears to have been automatically generated, consider this example:
While I’m sure this is useful to a bit head who lives with the interface every day, I don’t write programs all that often any more, so it is virtually useless.
And, sadly, there isn’t a lot of example code on the web (at least that Google found), and what is there looks pretty brute force.
So I struggle with figuring out obscure ways to do simple things (like select a column of cells)…