HTML表格转Excel Table To Xls

码农软件 · 软件分类 · Excel开发包 · 2019-09-16 20:13:32

软件介绍

Java实现,HTML table转换为Excel,支持大部分样式,欢迎提出意见或者建议,后续可能,只是说可能会增加外部样式支持。

有图有真相:

转换结果:

代码托管在 http://git.oschina.net/chyxion/table-to-xls

欢迎捧场,拍砖。

使用方式:

1、添加Maven依赖

    <dependency>
        <groupId>me.chyxion</groupId>
        <artifactId>table-to-xls</artifactId>
        <version>0.0.1-RELEASE</version>
    </dependency>

2、使用

StringBuilder html = new StringBuilder();
Scanner s = new Scanner(getClass().getResourceAsStream("/sample.html"), "utf-8");
while (s.hasNext()) {
    html.append(s.nextLine());
}
s.close();
FileOutputStream fout = new FileOutputStream("data.xls");
fout.write(TableToXls.process(html));
fout.close();

好了,大功告成。

本文地址:https://codercto.com/soft/d/14749.html

Uberland

Uberland

Alex Rosenblat / University of California Press / 2018-11-19 / GBP 21.00

Silicon Valley technology is transforming the way we work, and Uber is leading the charge. An American startup that promised to deliver entrepreneurship for the masses through its technology, Uber ins......一起来看看 《Uberland》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具