1 Star 0 Fork 6

上帝 / ExcelHelp

forked from 没想好 / ExcelHelp 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

ExcelHelp

介绍

  • 基于JQ-Bootstrap和xlsx.core.min 实现前端读取导出Excel文件
  • 用于在项目现场处理Excel文件,解决部分实施工作量,测试浏览器为Firefox。

地址


软件架构


使用说明

  1. 引用excelHelp.js
  2. 创建对象var eh = new ExcelHelp();
  3. 注册两个关键事件 typeErr:文件选择错误事件;select:文件选择完成事件,见index.js
  4. 读取方法:eh.read;导出方法:eh.out,见index.html
属性名 类型 说明
fileType 数组 设置 文件类型 验证用 默认["xls","xlsx"]
log 布尔 是否打开日志 默认true
file 对象 当前选择的文件对象
excelData 数组 当前读取的数据
sheets 数组 当前读取的页签
方法名 参数 说明
select 执行选择文件方法,会弹出选择文件对护框,
选择前触发beforselect事件,
选择完成后触发select事件,
选择错误触发typeErr事件
read 方法 文件读取方法,读取文件,参数为:(返回的数据,返回的页签名称)
out 导出名称,数据(数组) 导出方法,把数据(json),导出为Excel
事件 参数 说明
beforselect 文件选择前事件
select 对象 文件选择完成事件,参数是选择的文件
typeErr 文件选择出错事件

作者

北京@没想好


MIT License Copyright (c) 2020 没想好 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

基于JQ-Bootstrap和xlsx.core.min 实现前端读取处理Excel文件 展开 收起
JavaScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/TTDZ/ExcelHelp.git
git@gitee.com:TTDZ/ExcelHelp.git
TTDZ
ExcelHelp
ExcelHelp
master

搜索帮助