public class ToHtml extends Object
| 构造器和说明 |
|---|
ToHtml() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
clearInfoForFile(String fileName)
清空文件内容
|
File |
convert(org.noear.solon.core.handle.UploadedFile file) |
String |
convertToHtml(org.noear.solon.core.handle.UploadedFile file)
将上传的Word文档转化成HTML字符串
|
static InputStream |
getStringStream(String sInputString)
将一个字符串转化为输入流
|
static void |
main(String[] args) |
static File |
wordToHtml(File file,
String htmlFilePath)
wordToHtml
|
static File |
xlxsToHtml(File file,
String fileName)
Excel(xlxs格式)转html
|
public File convert(org.noear.solon.core.handle.UploadedFile file)
public static InputStream getStringStream(String sInputString)
sInputString - 字符串public static void clearInfoForFile(String fileName)
fileName - public String convertToHtml(org.noear.solon.core.handle.UploadedFile file)
file - public static File wordToHtml(File file, String htmlFilePath)
file - word文件htmlFilePath - html文件路径IOExceptionParserConfigurationExceptionTransformerExceptionpublic static File xlxsToHtml(File file, String fileName) throws Exception
file - 文件路劲fileName - 要转换的文件名称ExceptionCopyright © 2022. All rights reserved.