https://github.com/hishidama/embulk-formatter-excel-poi
Excel formatter plugin for Embulk with Apache POI
https://github.com/hishidama/embulk-formatter-excel-poi
embulk-formatter-plugin embulk-plugin excel java-8 poi xls xlsx
Last synced: 3 months ago
JSON representation
Excel formatter plugin for Embulk with Apache POI
- Host: GitHub
- URL: https://github.com/hishidama/embulk-formatter-excel-poi
- Owner: hishidama
- License: mit
- Created: 2023-08-05T21:53:26.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-08T01:04:59.000Z (over 1 year ago)
- Last Synced: 2025-01-07T21:37:47.044Z (5 months ago)
- Topics: embulk-formatter-plugin, embulk-plugin, excel, java-8, poi, xls, xlsx
- Language: Java
- Homepage:
- Size: 61.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Apache POI Excel formatter plugin for Embulk
Formats Excel files(xls, xlsx) for other file output plugins.
This plugin uses Apache POI.## Overview
* **Plugin type**: formatter
* Embulk 0.10 or later## Configuration
* **spread_sheet_version**: Excel file version. `EXCEL97` or `EXCEL2007`. (string, default: `EXCEL2007`)
* **sheet_name**: sheet name. (string, default: `Sheet1`)
* **column_options**: see bellow. (hash, default: `{}`)### column_options
* **data_format**: data format of Cell. (string, default: `null`)
## Example
```yaml
exec:
min_output_tasks: 1 # output to one filein:
type: any input plugin type
...
columns:
- {name: time, type: timestamp}
- {name: purchase, type: timestamp}out:
type: file # any file output plugin type
path_prefix: /tmp/embulk-example/excel-out/sample_
file_ext: xlsx
formatter:
type: poi_excel
spread_sheet_version: EXCEL2007
sheet_name: Sheet1
column_options:
time: {data_format: "yyyy/mm/dd hh:mm:ss"}
purchase: {data_format: "yyyy/mm/dd"}
```### Note
The file name, file split or data order are decided by input/output plugin.
If you'd like to process data and output Excel format, I think it's also one way to use [Asakusa Framework](http://www.asakusafw.com/) ([Excel Exporter](http://www.ne.jp/asahi/hishidama/home/tech/asakusafw/directio/excelformat.html>)).## Install
1. install plugin
```
$ mvn dependency:get -Dartifact=io.github.hishidama.embulk:embulk-formatter-excel-poi:0.2.0
```2. add setting to $HOME/.embulk/embulk.properties
```
plugins.formatter.poi_excel=maven:io.github.hishidama.embulk:excel-poi:0.2.0
```## Build
```
$ ./gradlew package
```### Build to local Maven repository
```
./gradlew generatePomFileForMavenJavaPublication
mvn install -f build/publications/mavenJava/pom-default.xml
./gradlew publishToMavenLocal
```