Skip to content

Commit

Permalink
Tweak README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nobeans committed Apr 10, 2015
1 parent fdc3475 commit 8e9bd24
Showing 1 changed file with 56 additions and 10 deletions.
66 changes: 56 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,67 @@
## GExcelAPI
GExcelAPI
=========

GExcelAPI is a thin wrapper library powered by Groovy of Apache POI, not JExcelAPI.
GExcelAPI is a thin Groovy-ish wrapper library of not JExcelAPI but Apache POI.

## Usage

About its usage, see a following article:
Getting Started
---------------

* <http://nobeans-en.blogspot.jp/2011/11/gexcelapi-for-groovyist-using-ms-excel.html>
It's difficult to read and write when using Apache POI directly.
Especially, an identification of a cell to use an index is too complicated and ugly.

and a test code:
```groovy
File inputFile = ...
def book = new HSSFWorkbook(new POIFSFileSystem(new FileInputStream(inputFile)))
def sheet = book.getSheetAt(0) // 1st sheet
println "A1: " + sheet.getRow(0)?.getCell((short) 0)
println "A2: " + sheet.getRow(1)?.getCell((short) 0)
println "B1: " + sheet.getRow(0)?.getCell((short) 1)
```

* <https://github.com/nobeans/gexcelapi/raw/master/src/test/groovy/org/jggug/kobo/gexcelapi/GExcelTest.groovy>
By using GExcelAPI, you can write the above sample like this:

## Code Status
```groovy
File inputFile = ...
def book = GExcel.open(inputFile)
def sheet = book[0] // 1st sheet
println "A1: " + sheet.A1.value
println "A2: " + sheet.A2.value
println "B1: " + sheet.B1.value
```

* [![Build Status](https://drone.io/github.com/nobeans/gexcelapi/status.png)](https://drone.io/github.com/nobeans/gexcelapi/latest)

## License
How to get
-----------

### Grape

```groovy
@GrabResolver(name="bintray", root="http://dl.bintray.com/nobeans/maven")
@GrabConfig(systemClassLoader=true) // necessary if you invoke it by GroovyServ
@Grab("org.jggug.kobo:gexcelapi:0.4")
import org.jggug.kobo.gexcelapi.GExcel
// example...
def book = GExcel.open(args[0])
def sheet = book[0]
println sheet.A1.value
```


Test as Documentation
---------------------

* <https://github.com/nobeans/gexcelapi/blob/master/src/test/groovy/org/jggug/kobo/gexcelapi/GExcelTest.groovy>


Code Status
-----------

[![Build Status](https://travis-ci.org/nobeans/gexcelapi.svg?branch=master)](https://travis-ci.org/nobeans/gexcelapi)


License
-------

GExcelAPI is released under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0)

0 comments on commit 8e9bd24

Please sign in to comment.