Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

djberg96 (2603)

  (email not shown publicly)

Journal of djberg96 (2603)

Saturday November 23, 2002
12:56 AM

More on porting Spreadsheet::WriteExcel

[ #9106 ]
I decided to do a straight Perl to Ruby conversion of Spreadsheet::WriteExcel version .20 yesterday. I jammed for a couple of hours, no tests, worked out the syntax errors and ..... no love.

I did something wrong somewhere. The file size is way off. In other words, I threw a bomb on 1st and 10 but ended up tossing an incomplete pass.

For my 2nd down play I decided to go with a more conservative slant right and port version .26 instead. I can handle formats. Formulas (formulae?) are another story. For extra blocking power I'm pulling the left guard and doing unit tests to keep me out of trouble.

I figured I could do unit tests by running a simple Perl script, checking the output and/or file size and then compare that against my Ruby code. I can get away with this approach because *I know* John's code works (thanks John!). That has also meant running lots of class methods independently that you normally wouldn't run independently (or at all). Sometimes a lack of 'private' is a good thing. None of those pesky errors to prevent me from doing what I want to do. :)

So far that strategy has paid off, even if it has been slow going. I've caught a few subtle, but significant bugs that could account for the earlier disaster. So far the BIFFWriter and OLEWriter classes look good. The only design change I decided on was to make OLEWriter a subclass of File, rather than store a separate filehandle within the class.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.