网页上预览Excel文件

如何运行: 需要发布在服务器 如Tomcat

实例图片:

需要展示的文件:

复制代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>excel预览</title>
    <link rel="stylesheet" href="js-preview-lib/excel.css" />
    <script src="js-preview-lib/excel.umd.js"></script>
</head>
<body>
<div id="excel" style="width: 100vw; height: 100vh"></div>

<script>
    const myExcelPreviewer = jsPreviewExcel.init(document.getElementById('excel'));
    myExcelPreviewer .preview('./文件名.xlsx').then(()=>{
        console.log('预览完成');
    }).catch(e=>{
        console.log('预览失败', e);
    })
</script>
</body>
</html>
相关推荐
凯子坚持 c2 小时前
Trae 宝藏功能实测:从 Mcp 搭建天气系统,到 AI 重塑 Excel 数据处理
java·人工智能·excel
二狗哈1 天前
制作一款打飞机游戏23:编辑器ui
ui·编辑器·excel
CodeCraft Studio1 天前
Excel处理控件Spire.XLS系列教程:Java设置Excel活动工作表或活动单元格
java·python·excel
CodeJourney.1 天前
深度探索:DeepSeek赋能WPS图表绘制
数据库·人工智能·算法·信息可视化·excel
努力的搬砖人.1 天前
在springboot项目中,如何进行excel表格的导入导出功能?
spring boot·后端·excel
java程序员CC1 天前
使用springboot+easyexcel实现导出excel并合并指定单元格
spring boot·后端·excel
我老菜2 天前
解析excel中的图片
java·excel
CodeCraft Studio2 天前
Excel处理控件Aspose.Cells教程:使用 Python 在 Excel 中进行数据验
开发语言·python·excel
时间之城2 天前
笔记:记一次使用EasyExcel重写convertToExcelData方法无法读取@ExcelDictFormat注解的问题(已解决)
java·spring boot·笔记·spring·excel
VBAMatrix2 天前
审计效率升级!快速匹配Excel报表项目对应的Word附注序号
excel·审计·财务报表·会计师事务所·审计工具