From: Andrew Wagner Date: 2013-03-09T09:47:04+09:00 Subject: Re: RubyExcel class. Useful? --20cf307f382c32179504d7734748 Content-Type: text/plain; charset=UTF-8 Are there tests that demonstrate the use of this? On Fri, Mar 8, 2013 at 10:49 AM, Joel Pearson wrote: > I've managed to create a (relatively) stable data-processing class which > behaves a bit like Excel, but with some of Ruby's awesome syntax styles. > I've used it on a few projects now so I'm happy with how it works, > although I'm always trying to improve it. > > The 2 files are intended to be placed in the same directory. I might > break it down further in a later build. > > This was written to be documented with "yard" if that makes the random > layout easier on the eyes. > > The intention is to help simplify scripts which have to sift through > table data, by allowing the user to work with a variety of ways to > access > and loop though the data. The class is built around the assumption that > it is dealing with a 2D array of data with headers in the first row, > which it generally tries to avoid touching while looping through the > data. The > indexing is 1-based to mimic Excel's API. > > There are multiple ways to reference the data. You can do this by Row, > Column, Cell indices, Ranges, and individual addresses using []. > > I've found this a happy medium between the slowness of Excel's clunky > VBA, and the frustration of having to constantly move Ruby's Array > indices around to avoid affecting the headers. > > If I can get rid of the bugs in this and add enough useful functionality > then I might publish it as a gem for anyone who regularly has to deal > with tables (HTML in my case) and wants a simple tool to do it with. > > Any comments, advice, requests or constructive criticism are welcome! > > Special thanks to Robert Klemme for providing the impetus to get this > started. > > Attachments: > http://www.ruby-forum.com/attachment/8208/RubyExcel.rb > http://www.ruby-forum.com/attachment/8209/RubyExcel_Components.rb > > > -- > Posted via http://www.ruby-forum.com/. > > --20cf307f382c32179504d7734748 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Are there tests that demonstrate the use of this?


On Fri, Mar 8, 2= 013 at 10:49 AM, Joel Pearson <lists@ruby-forum.com> wrot= e:
I've managed to create a (relatively) st= able data-processing class which
behaves a bit like Excel, but with some of Ruby's awesome syntax styles= .
I've used it on a few projects now so I'm happy with how it works,<= br> although I'm always trying to improve it.

The 2 files are intended to be placed in the same directory. I might
break it down further in a later build.

This was written to be documented with "yard" if that makes the r= andom
layout easier on the eyes.

The intention is to help simplify scripts which have to sift through
table data, by allowing the user to work with a variety of ways to
access
and loop though the data. The class is built around the assumption that
it is dealing with a 2D array of data with headers in the first row,
which it generally tries to avoid touching while looping through the
data. The
indexing is 1-based to mimic Excel's API.

There are multiple ways to reference the data. You can do this by Row,
Column, Cell indices, Ranges, and individual addresses using [].

I've found this a happy medium between the slowness of Excel's clun= ky
VBA, and the frustration of having to constantly move Ruby's Array
indices around to avoid affecting the headers.

If I can get rid of the bugs in this and add enough useful functionality then I might publish it as a gem for anyone who regularly has to deal
with tables (HTML in my case) and wants a simple tool to do it with.

Any comments, advice, requests or constructive criticism are welcome!

Special thanks to Robert Klemme for providing the impetus to get this
started.

Attachments:
http://www.ruby-forum.com/attachment/8208/RubyExcel.rb
http://www.ruby-forum.com/attachment/8209/RubyExcel_Co= mponents.rb


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


--20cf307f382c32179504d7734748--