Home  >  Article  >  Web Front-end  >  How to import Excel from layui

How to import Excel from layui

藏色散人
藏色散人Original
2021-01-18 11:00:295614browse

How to import Excel from layui: First download the layui-excel plug-in from Github or Code Cloud; then introduce jQuery and the plug-in source code, and call the function through the global variable "LAY_EXCEL".

How to import Excel from layui

#The operating environment of this tutorial: Windows 7 system, layui-excel v1.6.6 version, Dell G3 computer.

Recommended: "layUI Tutorial"

When we use layui for development, we often encounter the problem of importing and exporting data. Here we will introduce a plug-in for you. , you can import Excel data or export data to excel.

Environment Tips: The preview environment needs to be deployed on the server, otherwise the data that needs to be exported cannot be obtained asynchronously

The export excel function of this plug-in is based on XLSX.js, the download function is based on FileSaver, and the file reading function is based on FileReader for H5.

Download address:

Github: https://github.com/wangerzi/layui-excel

Code Cloud (faster domestic download) : https://gitee.com/wangerzi/layui-excel

Browser compatibility:

Supports IE10, Firefox, chrome and other mainstream browsers

Non-layui or non-modular support

Introduce jQuery and plug-in source code, call the function through the global variable LAY_EXCEL, see the demo for details: http://excel.wj2015.com/demos/noLayui/index. html

Function demonstration:

1. Function demonstration:

How to import Excel from layui

2. Export data test and export interface data:

How to import Excel from layui

Import Data:

How to import Excel from layui

The above is the detailed content of How to import Excel from layui. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn