Git Product home page Git Product logo

groovy-excel-test's Introduction

Groovy Excel Test

##Data of sample Excel file

id name pid date
1234567890 ほげ 1112233 2014/11/14
1234567891 ほげ,ほげ 1112234 2014/11/14
1234567892 “hoge” 1112235 2014/11/14

##Log sample

2015-11-18 16:33:44 INFO  ExcelReader:? - Let's process the file:HSSF.xls
2015-11-18 16:33:45 INFO  ExcelReader:? - workbook class:org.apache.poi.hssf.usermodel.HSSFWorkbook
2015-11-18 16:33:45 INFO  ExcelReader:? - number of sheets:3
2015-11-18 16:33:45 INFO  ExcelReader:? - ---------------------------------
2015-11-18 16:33:45 INFO  ExcelReader:? - sheet index:0
2015-11-18 16:33:45 INFO  ExcelReader:? - sheet name:Sheet1
2015-11-18 16:33:45 INFO  ExcelReader:? - row count:4
2015-11-18 16:33:45 INFO  ExcelReader:? - col count:4
2015-11-18 16:33:45 INFO  ExcelReader:? - cell type analysis>===============
2015-11-18 16:33:45 INFO  ExcelReader:? - cell index:0, type:CELL_TYPE_NUMERIC, data:1.23456789E9, as long:1234567890
2015-11-18 16:33:45 INFO  ExcelReader:? - cell index:1, type:CELL_TYPE_STRING, data:ほげ
2015-11-18 16:33:45 INFO  ExcelReader:? - cell index:2, type:CELL_TYPE_NUMERIC, data:1112233.0, as int:1112233
2015-11-18 16:33:45 INFO  ExcelReader:? - cell index:3, type:CELL_TYPE_NUMERIC, data:41957.0, as date:Fri Nov 14 00:00:00 CET 2014
2015-11-18 16:33:45 INFO  ExcelReader:? - ================<analysis end!
2015-11-18 16:33:45 INFO  ExcelReader:? - ---------------------------------

##Memo

  • 整数も小数も日付も、POI側からは、Cell Type:Numeric となってしまう
    => DBカラム定義を参照して、日付ならgetDateCellValue()を呼ぶとか、数値ならlong/int/doubleで型変換するとかが必要そう

groovy-excel-test's People

Contributors

hitokun-s avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.