-
大小: 11.61MB文件类型: .rar金币: 1下载: 0 次发布日期: 2023-07-20
- 语言: Java
- 标签: Excel2HtmlUt office xls转html
资源简介
这款EXCEL转换HTML利用PIO万能转换,来源与CSDN网上资源,我只是吧所有JAR包和程序源码放在一起便于快速开发测试使用。本人测试整理好用。
代码片段和文件信息
package com.hygx.ldw.text;
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License Version 2.0
(the “License“); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing software
distributed under the License is distributed on an “AS IS“ BASIS
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFFont;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.examples.html.HSSFHtmlHelper;
import org.apache.poi.ss.examples.html.HtmlHelper;
import org.apache.poi.ss.examples.html.XSSFHtmlHelper;
import org.apache.poi.ss.format.CellFormat;
import org.apache.poi.ss.format.CellFormatResult;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import java.io.BufferedReader;
import java.io.Closeable;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Formatter;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import static org.apache.poi.ss.usermodel.Cellstyle.*;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
/**
* This example shows how to display a spreadsheet in HTML using the classes for
* spreadsheet display.
*
* @author Ken Arnold Industrious Media LLC
*/
public class Excel2HtmlUtil
{
private final Workbook wb;
private final Appendable output;
private boolean completeHTML;
private Formatter out;
private boolean gotBounds;
private int firstColumn;
private int endColumn;
private HtmlHelper helper;
private static final String DEFAULTS_CLASS = “excelDefaults“;
private static final String COL_HEAD_CLASS = “colHeader“;
private static final String ROW_HEAD_CLASS = “rowHeader“;
private static final Map ALIGN = mapFor(ALIGN_LEFT “left“
ALIGN_CENTER “center“ ALIGN_RIGHT “right“ ALIGN_FILL “left“
ALIGN_JUSTIFY “left“ ALIGN_CENTER_SELECTION “center“);
private static final Map VERTICAL_ALIGN = mapFor(
VERTICAL_BOTTOM “bot
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2320 2013-12-20 22:35 excelst
文件 1194 2016-09-24 20:13 maven配置.txt
文件 232019 2013-10-02 07:14 lib\commons-beanutils-1.8.3.jar
文件 232771 2013-10-02 07:14 lib\commons-codec-1.6.jar
文件 559366 2013-10-02 07:14 lib\commons-collections-3.1.jar
文件 173587 2013-10-02 07:14 lib\commons-io-2.2.jar
文件 279193 2013-10-02 07:14 lib\commons-lang-2.5.jar
文件 60686 2013-10-02 07:14 lib\commons-logging-1.1.1.jar
文件 313898 2013-10-02 07:14 lib\dom4j-1.6.1.jar
文件 86487 2013-10-02 07:14 lib\ezmorph-1.0.6.jar
文件 159123 2013-10-02 07:14 lib\json-lib-2.4-jdk15.jar
文件 16905 2013-10-02 07:14 lib\jstl.jar
文件 358180 2013-10-02 07:14 lib\log4j-1.2.13.jar
文件 1820323 2016-04-08 08:26 lib\poi-3.8-20120326.jar
文件 300235 2016-04-08 08:30 lib\poi-examples-3.8-20120326.jar
文件 30446 2016-04-08 08:28 lib\poi-excelant-3.8-20120326.jar
文件 933010 2016-04-08 08:31 lib\poi-ooxm
文件 4706775 2016-04-08 08:28 lib\poi-ooxm
文件 1186887 2016-04-08 08:32 lib\poi-scratchpad-3.8-20120326.jar
文件 293750 2013-10-02 07:14 lib\standard.jar
文件 26514 2013-10-02 07:14 lib\stax-api-1.0.1.jar
文件 2666695 2013-10-02 07:14 lib\xm
文件 16886 2019-01-14 14:31 Excel2HtmlUtil.java
目录 0 2019-01-14 14:57 lib
----------- --------- ---------- ----- ----
14457250 24
相关资源
- poi3.11-jar包
- poi3.17和poi4.0包含converter.jar
- Java利用POI将office转成HTML
- Java操作office方法jar包:POI_3.17
- java web实现在线预览pdf和office文档de
- 免费JavaOffice组件_FreeSpire.OfficeforJava
- java调用openOffice转换office为pdf的jar包
- Android代码-Office-365-SDK-for-Android
- JAVA用PageOffice动态导出Word文档
- C#、C++、HTML5、JAVA、Python、数据结构与
- java Spring+openOffice实现office转pdf在线预
- Office办公套件_OfficeSuite_Pro字体包
- PageOffice Java 动态填充Word模版
- PageOffice Java中动态填充Word模版生成正
- officetopdf
- Java实现word excel ppt转pdf
- org.apache.poi.hssf.converter,office转html所
- PageOffice for Java (免费破解版)文档控
- office文档浏览(doc、excel、ppt等)
- iwebofficejar包
- WPS二次开发时用到的jar包两个moffice
- springboot PageOffice开发demo(在线编辑
评论
共有 条评论