GithubHelp home page GithubHelp logo

kuangcp / mythpoi Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 5.0 132 KB

:battery:致力于 实现一个简单好用的 文档操作工具 基于POI

Home Page: https://kuangcp.github.io/mythpoi/

License: Apache License 2.0

Java 100.00%
gradle jdk8 excel poi

mythpoi's Introduction

myth-poi

More easy to Export & Import Excel&Word file.

Maintainability Codacy Badge codebeat badge Java Version

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

repositories {
    maven{
        url "https://gitee.com/kcp1104/MavenRepos/raw/master"
    }
} 

Maven


2. Add Dependency

2.1 Maven

    <dependency>
        <groupId>com.github.kuangcp</groupId>
        <artifactId>myth-poi</artifactId>
        <version>0.2.4-SNAPSHOT</version>
    </dependency>

2.2 Gradle

    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
@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
List<Employee> originList = new ArrayList<>();
// add some Employee Object ...
ExcelExport.exportExcel("/home/kcp/test/employee.xls", originList);
  • 3.Import Excel file
List<Employee> result = ExcelImport.importExcel("/home/kcp/test/employee.xls", Employee.class);

Excel File :

excel.png

Word


mythpoi's People

Contributors

kuangcp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.