lorne_excel

lorne_excel framework

License

License

GroupId

GroupId

com.github.1991wangliang
ArtifactId

ArtifactId

lorne_excel
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

lorne_excel
lorne_excel framework
Project URL

Project URL

https://github.com/1991wangliang/lorne_excel
Source Code Management

Source Code Management

https://github.com/1991wangliang/lorne_excel

Download lorne_excel

How to add to project

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

Dependencies

compile (2)

Group / Artifact Type Version
org.apache.poi : poi jar 3.17
org.apache.poi : poi-ooxml jar 3.17

Project Modules

There are no modules declared in this project.

lorne_excel

Excel Utils

使用教程

 <dependency>
    <groupId>com.github.1991wangliang</groupId>
    <artifactId>lorne_excel</artifactId>
    <version>2.0.0</version>
 </dependency>

读取excel文件


    public static List<LSheet>  readExcel() {
		try {
			// 读取文件数据
			List<LSheet> sheets = ExcelUtils.getExcelData(new File("d://data.xls"));
			// 遍历打印
			for (LSheet s : sheets) {
				for (LRow row: s.getRows()) {
					for (String v:row.getContent()) {
						System.out.print(v + "\t\t");
					}
					System.out.println();
				}

				return sheets;
			}
		} catch (Exception e) {
			e.printStackTrace();
		}

		return null;

	}

写入excel文件


    public static void writeExcel(List<LSheet> sheets) {

		try {
			 ExcelUtils.writeExcel(new File("d://data_new.xls"),sheets);
		} catch (Exception e) {
			e.printStackTrace();
		}

	}

Versions

Version
2.0.0
1.0.0