For the rare breed who use the combination of Windows, Ruby, and
Excel...
I've put together a data analysis gem which accepts 2D arrays or nested
Hashes as input, and gives you some Excel-style methods to access and
modify the data.
I've never tried it on a non-windows computer. I'd be interested to know
what happens since I don't have a mac or linux test rig to use.
It tries to require win32ole, but that's only for the ExcelTools module.
As far as I know the rest of RubyExcel should work fine without it.
Just had a thought about this... is it possible to trap calls to the
methods which use win32ole via method_missing and then require the
relevant code from there?
My reasoning is that by removing default Excel support in order for the
data structure to be available on non-win32ole systems (it can still
output TSV, HTML & Arrays), everyone who uses it will have to put in
explicit require statements, thus breaking existing code.
If I were able to hold back requiring the extra file until a relevant
method was called, perhaps that would both allow non-win32ole
compatibility (just don't use the Excel methods) and still work in
backward compatibility.
However, I'm not sure whether it'll work, or whether it'd be good
practice even if it does work. Does anyone have any hints on how to
around this kind of issue?