PHPackages                             tinymeng/spreadsheet - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. tinymeng/spreadsheet

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

tinymeng/spreadsheet
====================

php-spreadsheet Excel快速使用

v2.1.9(2mo ago)183↓91.7%[1 issues](https://github.com/majiameng/spreadsheet-php/issues)MITPHPPHP &gt;=7.3

Since Jul 5Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/majiameng/spreadsheet-php)[ Packagist](https://packagist.org/packages/tinymeng/spreadsheet)[ RSS](/packages/tinymeng-spreadsheet/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (6)Versions (29)Used By (0)

tinymeng/spreadsheet
====================

[](#tinymengspreadsheet)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/139f88a8dcc7d75d31ddb9ff09fb0e760ba59fe5325385eb63baf8b03625ede7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d616a69616d656e672f73707265616473686565742d7068702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/majiameng/spreadsheet-php/?branch=master)[![Build Status](https://camo.githubusercontent.com/c37e2f9f6cddfeae9fb87e12bee9ab5b08850e273e596d5b663a1346e96d4f36/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d616a69616d656e672f73707265616473686565742d7068702f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/majiameng/spreadsheet-php/build-status/master)[![Latest Stable Version](https://camo.githubusercontent.com/4e6030834125ad5be57ec77bb894895b42b28c215e70b700bac7ba73237a0c43/68747470733a2f2f706f7365722e707567782e6f72672f74696e796d656e672f73707265616473686565742f762f737461626c65)](https://packagist.org/packages/tinymeng/spreadsheet)[![Total Downloads](https://camo.githubusercontent.com/daba3638db28f59dfe441bc8763be5fef80fcf232a867f9f4d8f62a4d3c83779/68747470733a2f2f706f7365722e707567782e6f72672f74696e796d656e672f73707265616473686565742f646f776e6c6f616473)](https://github.com/majiameng/spreadsheet-php/tags)[![Latest Unstable Version](https://camo.githubusercontent.com/cd9d7bd2d3424a4344d50249b3d0e15efbf0dc806dc178c908eec9325587fa69/68747470733a2f2f706f7365722e707567782e6f72672f74696e796d656e672f73707265616473686565742f762f756e737461626c65)](https://packagist.org/packages/tinymeng/spreadsheet)[![License](https://camo.githubusercontent.com/bf0b37a9d7816df20e4da18d56648257a5cb5c8b5d0d1b4ee7f348b1b735059e/68747470733a2f2f706f7365722e707567782e6f72672f74696e796d656e672f73707265616473686565742f6c6963656e7365)](https://github.com/majiameng/spreadsheet-php/blob/master/LICENSE)

欢迎 Star，欢迎 PR！

> 大家如果有问题要交流，就发在这里吧： [Spreadsheet](https://github.com/majiameng/spreadsheet-php/issues/1) 交流 或发邮件

PHP Spreadsheet Class
=====================

[](#php-spreadsheet-class)

基于 `phpoffice/phpspreadsheet` 扩展快速封装使用，避免我们再重复性的造轮子

您可以在网站上找到tinymeng/spreadsheet文档。查看“入门”页面以获取快速概述。
------------------------------------------------

[](#您可以在网站上找到tinymengspreadsheet文档查看入门页面以获取快速概述)

- [Wiki Home](https://github.com/majiameng/spreadsheet-php/wiki)
- [中文文档](https://github.com/majiameng/spreadsheet-php/wiki/zh-cn-Home)
- [开始](https://github.com/majiameng/spreadsheet-php/wiki/zh-cn-Getting-Started)
- [安装](https://github.com/majiameng/spreadsheet-php/wiki/zh-cn-Installation)
- [配置文件](https://github.com/majiameng/spreadsheet-php/wiki/zh-cn-Configuration)
- [贡献指南](https://github.com/majiameng/spreadsheet-php/wiki/zh-cn-Contributing-Guide)
- [更新日志](https://github.com/majiameng/spreadsheet-php/wiki/zh-cn-Update-log)

Installation
============

[](#installation)

```
composer require tinymeng/spreadsheet  -vvv

```

> 类库使用的命名空间为 `\\tinymeng\\spreadsheet`

- [开始入门](https://github.com/majiameng/spreadsheet-php/wiki/zh-cn-Getting-Started)

### 目录结构

[](#目录结构)

```
.
├── config                          配置文件目录
│   └── TSpreadSheet.php
├── example                         事例代码
│   ├── export.php                  导出事例代码
│   └── import.php                  导入事例代码
├── src                             代码源文件目录
│   ├── Connector
│   │   ├── Gateway.php             必须继承的抽象类
│   │   └── GatewayInterface.php    必须实现的接口
│   ├── Gateways
│   │   ├── Export.php              导出实例
│   │   └── Import.php              导入实例
│   ├── Util
│   │   └── TConfig.php             配置类
│   └── TSpreadSheet.php            抽象实例类
├── composer.json                   Composer File
├── LICENSE                         MIT License
├── README_zh_cn.md                 中文文档
└── README.md                       Documentation

```

### Configuration

[](#configuration)

[Configuration](https://github.com/majiameng/spreadsheet-php/wiki/zh-cn-Configuration)

- 2.1 excel导出 TSpreadSheet::export()
- 2.2 excel导入 TSpreadSheet::import()

#### 2.1.excel导出

[](#21excel导出)

> example 事例目录

```
