Sha256: 31cf06e6765a4b2c9987bde3fa80b38d60007f3a02d9d78ed8a0d9045cb83a05

Contents?: true

Size: 1.2 KB

Versions: 1

Compression:

Stored size: 1.2 KB

Contents

= Overview
Hyogen converts CSV or Excel data to Ruby objects or any text.
This package is like Java's XLSBeans library.

= Here is how do you it

Start with a very simple example.

=== Input

Input data is CSV or Excel format data. The data have to include table tag.
Hyogen converts input data to array of Table class object.
Table class is set of Record class. Record class is a row of table.

  {VTABLE}User List
  {L}id, name, gender
  1, Taro, male
  2, Hanko, female
  3, Ichiro, male

=== Template

Template format is erb.

  <%- table = tables.first -%>
  <%- for record in table.records -%>
  My name is <%= record["name"] %>. I'm <%= record["gender"] %>.
  <%- end -%>

=== Output

  My name is Taro. I'm male.
  My name is Hanko. I'm female.
  My name is Ichiro. I'm male.

= Table tag

<b>{VTABLE}</b>:: This tag means start of table and the line of records is vertical.
<b>{HTABLE}</b>:: This tag means start of table and the line of records is horizontal.
<b>{L}</b>:: This tag means start of label.

<b>{N}</b>:: This tag means 
<b><></b>:: This tag means 

= Install
require ParseExcel (version >= 2007-02-07)  [http://scm.ywesee.com/?p=parseexcel]

gem install hyogen

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hyogen-0.0.3 README