Perl and the Art of Motorcycle Navigation

jmcnamara on 2009-01-21T00:25:02

A lot of people use Spreadsheet::WriteExcel I think. At least I get a lot of emails related to it. At the same time I don't generally get an insight into what people use the module for. There are some obvious tasks that I can imagine such as invoices or inventories or balance sheets and the email addresses of the correspondents suggest a heavy usage among financial companies. The occasional example Excel file that I receive isn't usually very exciting, not least of all when viewed in a hex editor. As such Spreadsheet::WriteExcel is used for the mundane reporting we all have to do occasionally. (Apart from me that is. In the eight years with my current company I've only used Spreadsheet::WriteExcel once and that was in the last six months. So much for eating your own dogfood).

That's why I was blown away when Rick Lavigne contacted me to say he was using Spreadsheet::WriteExcel to produce Tulip Diagram roll charts for motorcycle navigation. If you don't know what that is, and I certainly didn't, have a look at Rick's website rollcharts.org where it is all explained in detail. In particular the quality of the finished worksheets really impressed me.

In fact it impressed me so much that I felt obliged to help Rick out. He had written to ask if a document properties feature was planned. It was on the TODO list but with a low priority so I moved it up the list and implemented it. There probably aren't many advantages to running your own Open Source project but at least you can set your own priorities.

John.
--


Thank you for making the boring possible

btilly on 2009-01-21T09:15:13

Whenever possible I try to make tab-delimited files and call them .xls. However from time to time you get requests that simply can't be done that way. Perhaps there are issues about forcing the formatting of something that looks like a date. Specific requests for colors. Or having multiple spreadsheets in one file. When I encounter those, I reach for Spreadsheet::WriteExcel.

Yes, these are boring examples. But were it not for Spreadsheet::WriteExcel, they would be examples that would have forced me to make the choice between using Perl on Linux and not doing what was requested, or being forced to write hacks manipulating Excel on Windows on the fly. Thank you for keeping me from having to make that choice.

What I have used it for

Limbic Region on 2009-01-21T14:45:50

In one case I used Spreadsheet::ParseExcel::SaveParser to do the following things:

  • Generate Excel file on Unix
  • Create a chart using a hidden data tab
  • Fancy formatting on a multi-tab workbook

I remember having to work around a lot of limitations - not sure if they were in the ParseExcel or WriteExcel side. One of them was the hidden tab which you helped me with - at the time it wasn't included in the standard distribution. Another was many cells losing formatting. I ended up having to break encapsulation in quite a few places. I got it all to work but I would never want to have to maintain that code as it was one kludge after another.

The other project I used it for was also on Unix but it was a lot simpler. I needed to parse a bunch of academic papers (scanned PDFs) and extract information from the bibliography. The output was already being put into excel by hand - I just provided the value added of automatically doing so.