# mythpoi
**Repository Path**: gin9/mythpoi
## Basic Information
- **Project Name**: mythpoi
- **Description**: 简洁的Excel交互工具
- **Primary Language**: Java
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2018-05-22
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# myth-poi
> More easy to Export & Import Excel&Word file.
> Importantly Problem : Excel style is too complex, use what way to fix it
[](https://codeclimate.com/github/Kuangcp/mythpoi/maintainability)
[](https://www.codacy.com/app/Kuangcp/mythpoi?utm_source=github.com&utm_medium=referral&utm_content=Kuangcp/mythpoi&utm_campaign=Badge_Grade)
[](https://codebeat.co/projects/github-com-kuangcp-mythpoi-master)
[](https://www.java.com/download/)
## 1. How to install
### A way: Build
- Clone this Repo And install
- `git clone https://github.com/Kuangcp/mythpoi.git`
- `cd mythpoi && gradle install`
### Another way: Use gitee repository
#### Gradle
```groovy
repositories {
maven{
url "https://gitee.com/kcp1104/MavenRepos/raw/master"
}
}
```
#### Maven
************
## 2. Add Dependency
_2.1 Maven_
```xml
com.github.kuangcp
myth-poi
0.2.4-SNAPSHOT
```
_2.2 Gradle_
```groovy
compile("com.github.kuangcp:myth-poi:0.2.4-SNAPSHOT")
```
_2.3 Jar_
Download About Jar
http://mvnrepository.com/artifact/org.jyaml/jyaml
http://mvnrepository.com/artifact/org.apache.poi/poi
https://gitee.com/kcp1104/MavenRepos/tree/master/com/github/kuangcp/myth-poi
********************
## 3. How to use
### Excel
- 1.Implement Interface:
- use annotation to define excelSheet column title and Sheet
- *Just support BaseType field*
```java
@Data
@ExcelSheet(exportTitle = "雇员表", importTitle = "雇员表")
public class Employee implements ExcelTransform{
@ExcelConfig("姓名")
private String names;
@ExcelConfig("住址")
private String address;
// not export this field
@ExcelConfig(value = "QQ号码", exportFlag = false)
private String qq;
}
```
- 2.Export Excel file
```java
List originList = new ArrayList<>();
// add some Employee Object ...
ExcelExport.exportExcel("/home/kcp/test/employee.xls", originList);
```
- 3.Import Excel file
```java
List result = ExcelImport.importExcel("/home/kcp/test/employee.xls", Employee.class);
```
_Excel File :_

### Word