public class ExcelConvertUtil extends Object
| 构造器和说明 |
|---|
ExcelConvertUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static org.springframework.web.multipart.MultipartFile |
toHtml(org.springframework.web.multipart.MultipartFile excelFile)
转HTML(第一个sheet,全部填充至一页内,且列宽根据内容自动调整)
|
static org.springframework.web.multipart.MultipartFile |
toHtml(org.springframework.web.multipart.MultipartFile excelFile,
Integer sheetNum,
Boolean fitToPage,
Boolean autoFitColumn)
转HTML
|
static void |
toHtml(String inputFilePath,
String outputFilePath,
Integer sheetNum,
Boolean fitToPage,
Boolean autoFitColumn)
转HTML
|
static org.springframework.web.multipart.MultipartFile |
toPdf(org.springframework.web.multipart.MultipartFile excelFile)
转PDF(第一个sheet,全部填充至一页内,且列宽根据内容自动调整)
|
static org.springframework.web.multipart.MultipartFile |
toPdf(org.springframework.web.multipart.MultipartFile excelFile,
Integer sheetNum,
Boolean fitToPage,
Boolean autoFitColumn)
转PDF
|
static void |
toPdf(String inputFilePath,
String outputFilePath,
Integer sheetNum,
Boolean fitToPage,
Boolean autoFitColumn)
转PDF
|
static org.springframework.web.multipart.MultipartFile |
toPng(org.springframework.web.multipart.MultipartFile excelFile)
转PNG(第一个sheet,全部填充至一页内,且列宽根据内容自动调整)
|
static org.springframework.web.multipart.MultipartFile |
toPng(org.springframework.web.multipart.MultipartFile excelFile,
Integer sheetNum,
Boolean fitToPage,
Boolean autoFitColumn)
转PNG
|
static void |
toPng(String inputFilePath,
String outputFilePath,
Integer sheetNum,
Boolean fitToPage,
Boolean autoFitColumn)
转PNG
|
public static org.springframework.web.multipart.MultipartFile toPdf(org.springframework.web.multipart.MultipartFile excelFile)
excelFile - public static org.springframework.web.multipart.MultipartFile toPdf(org.springframework.web.multipart.MultipartFile excelFile,
Integer sheetNum,
Boolean fitToPage,
Boolean autoFitColumn)
excelFile - excel 文件sheetNum - 第几个sheet(sheet索引,第一个从0开始)fitToPage - 整个sheet是否都填充到一页PDF内(一页显示所有sheet内容)autoFitColumn - sheet列中的字符超过列宽,是否自动调整列宽public static void toPdf(String inputFilePath, String outputFilePath, Integer sheetNum, Boolean fitToPage, Boolean autoFitColumn)
inputFilePath - excel文件路径outputFilePath - 输出pdf文件路径sheetNum - 第几个sheet(sheet索引,第一个从0开始)fitToPage - 整个sheet是否都填充到一页PDF内(一页显示所有sheet内容)autoFitColumn - sheet列中的字符超过列宽,是否自动调整列宽public static org.springframework.web.multipart.MultipartFile toPng(org.springframework.web.multipart.MultipartFile excelFile)
excelFile - public static org.springframework.web.multipart.MultipartFile toPng(org.springframework.web.multipart.MultipartFile excelFile,
Integer sheetNum,
Boolean fitToPage,
Boolean autoFitColumn)
excelFile - excel 文件sheetNum - 第几个sheet(sheet索引,第一个从0开始)fitToPage - 整个sheet是否都填充到一页PNG内(一页显示所有sheet内容)autoFitColumn - sheet列中的字符超过列宽,是否自动调整列宽public static void toPng(String inputFilePath, String outputFilePath, Integer sheetNum, Boolean fitToPage, Boolean autoFitColumn)
inputFilePath - excel文件路径outputFilePath - 输出png文件路径sheetNum - 第几个sheet(sheet索引,第一个从0开始)fitToPage - 整个sheet是否都填充到一页Png内(一页显示所有sheet内容)autoFitColumn - sheet列中的字符超过列宽,是否自动调整列宽public static org.springframework.web.multipart.MultipartFile toHtml(org.springframework.web.multipart.MultipartFile excelFile)
excelFile - public static org.springframework.web.multipart.MultipartFile toHtml(org.springframework.web.multipart.MultipartFile excelFile,
Integer sheetNum,
Boolean fitToPage,
Boolean autoFitColumn)
excelFile - excel 文件sheetNum - 第几个sheet(sheet索引,第一个从0开始)fitToPage - 整个sheet是否都填充到一页html内(一页显示所有sheet内容)autoFitColumn - sheet列中的字符超过列宽,是否自动调整列宽public static void toHtml(String inputFilePath, String outputFilePath, Integer sheetNum, Boolean fitToPage, Boolean autoFitColumn)
inputFilePath - excel文件路径outputFilePath - 输出html文件路径sheetNum - 第几个sheet(sheet索引,第一个从0开始)fitToPage - 整个sheet是否都填充到一页html内(一页显示所有sheet内容)autoFitColumn - sheet列中的字符超过列宽,是否自动调整列宽Copyright © 2024. All rights reserved.