RubyExcel version 0.1.5

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.

Gem: https://rubygems.org/gems/rubyexcel
Code: https://github.com/VirtuosoJoel/RubyExcel

Currently on version 0.1.5.
I think I've destroyed most of the bugs, but then no one else has logged
any bug reports yet, so it's hard to tell :slight_smile:

All hail to the mighty Robert Klemme for laying the foundations!

路路路

--
Posted via http://www.ruby-forum.com/.

All hail to the mighty Robert Klemme for laying the foundations!

I'm constantly learning things from his code and suggestions!

Is this actually dependent on any win32ole stuff?

路路路

On Fri, May 10, 2013 at 11:18 AM, Joel Pearson <lists@ruby-forum.com> wrote:

For the rare breed who use the combination of Windows, Ruby, and
Excel...

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.

路路路

--
Posted via http://www.ruby-forum.com/.

Has anyone tried this without win32ole?

If it does fail to install, is there a way to make those methods
optional?

I've already separated the rb file which requires win32ole, so
presumably there's a way to make that an optional extra.

路路路

--
Posted via http://www.ruby-forum.com/.

Thanks for testing it :slight_smile:

I think I could get around this by having a separate require statement
for the win32ole stuff. Something like this:

require 'rubyexcel'
require 'rubyexcel/excel_tools'

I'll try and work that into the next version.

路路路

--
Posted via http://www.ruby-forum.com/.

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?

路路路

--
Posted via http://www.ruby-forum.com/.

It can be install on OS X 10.8, but `require`ing it causes it to complain
about missing win32ole.

路路路

On Thu, May 16, 2013 at 11:33 AM, Joel Pearson <lists@ruby-forum.com> wrote:

Has anyone tried this without win32ole?

If it does fail to install, is there a way to make those methods
optional?

I've already separated the rb file which requires win32ole, so
presumably there's a way to make that an optional extra.