XLSBeans

XLSBeans is a library for mapping Excel sheets to POJOs.

Лицензия

Лицензия

Категории

Категории

SBE Данные Data Structures
Группа

Группа

com.github.takezoe
Идентификатор

Идентификатор

xlsbeans
Последняя версия

Последняя версия

1.2.7
Дата

Дата

Тип

Тип

jar
Описание

Описание

XLSBeans
XLSBeans is a library for mapping Excel sheets to POJOs.
Ссылка на сайт

Ссылка на сайт

http://maven.apache.org
Система контроля версий

Система контроля версий

https://github.com/takezoe/xlsbeans

Скачать xlsbeans

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.takezoe/xlsbeans/ -->
<dependency>
    <groupId>com.github.takezoe</groupId>
    <artifactId>xlsbeans</artifactId>
    <version>1.2.7</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.takezoe/xlsbeans/
implementation 'com.github.takezoe:xlsbeans:1.2.7'
// https://jarcasting.com/artifacts/com.github.takezoe/xlsbeans/
implementation ("com.github.takezoe:xlsbeans:1.2.7")
'com.github.takezoe:xlsbeans:jar:1.2.7'
<dependency org="com.github.takezoe" name="xlsbeans" rev="1.2.7">
  <artifact name="xlsbeans" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.takezoe', module='xlsbeans', version='1.2.7')
)
libraryDependencies += "com.github.takezoe" % "xlsbeans" % "1.2.7"
[com.github.takezoe/xlsbeans "1.2.7"]

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
net.sourceforge.jexcelapi : jxl jar 2.6.12
org.apache.poi : poi jar 3.6
org.apache.poi : poi-ooxml jar 3.6
ognl : ognl jar 3.1.4

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 3.8.1

Модули Проекта

Данный проект не имеет модулей.

XLSBeans Build Status Maven Central

XLSBeans is a Java library for mapping Excel sheets to POJO.

Setup

To use XLSBeans, add the following dependency to your pom.xml:

<dependencies>
  <dependency>
    <groupId>com.github.takezoe</groupId>
    <artifactId>xlsbeans</artifactId>
    <version>1.2.7</version>
  </dependency>
</dependencies>

Getting Started

For example, here is one Excel sheet.

Sample Excel

Map this Excel sheet to POJO using @HorizontalRecords and @LabelledCell.

@Sheet(name="Users")
public class UserList {

  @LabelledCell(label="Title", type=LabelledCellType.Right)
  public String title;

  @HorizontalRecords(tableLabel="User list", recordClass=User.class)
  public List<User> users;

}

And the following is the record class. Properties of the record class is mapped to columns by @Column.

public class User {

  @Column(columnName="ID")
  public int id;

  @Column(columnName="Name")
  public String name;

  @Column(columnName="Gender", merged=true)
  public String gender;

}

You can get the mapped POJO using XLSBeans#load() like following:

UserList userList = (UserList)new XLSBeans().load(
  new FileInputStream("example.xls"), UserList.class);

Documentation

See more details in http://amateras.sourceforge.jp/site/xlsbeans/howtouse.html (in Japanese)

Версии библиотеки

Версия
1.2.7
1.2.6