/**
* html的 table转换为excel
* @param html html内容
* @return excel二进制
*/
public static byte[] table2Excel(String html)
{
return TableToXls.process(html);
}
public static void main(String[] args) throws IOException
{
FileUtils.writeByteArrayToFile(new File("d:/1.xls"),
table2Excel(FileUtils.readFileToString(
new File("D:/workspace/TestJsCall/TestJsCall/bin/Debug/tempPrint.html"))));
}
easyoffice提供了 html转换 pdf word excel的工具类欢迎下载。
http://download.youkuaiyun.com/detail/shuaizai88/9851814
如果觉得这篇文章帮助到你,给作者打赏点咖啡钱吧。