承接 labelworx/excel-converter 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

labelworx/excel-converter

Composer 安装命令:

composer require labelworx/excel-converter

包简介

Quickly convert XLSX, XLS or delimited files such as CSV, TSV, Semi Colon, Pipe Delimited or files with any bespoke delimiter of your choosing to a delimited file.

README 文档

README

This package allows you to quickly convert XLSX, XLS or delimited files such as CSV, TSV, Semi Colon, Pipe Delimited or files with any bespoke delimiter of your choosing to a delimited file.

Installation

Require the package using composer:

composer require labelworx/excel-converter

Usage

use LabelWorx\ExcelConverter\ExcelConverter;

$excel = new ExcelConverter();

// Simple Conversions
$excel->source('path/to/input.xls')->toCSV('path/to/output.csv');
$excel->source('path/to/input.xlsx')->toTSV('path/to/output.tsv');
$excel->source('path/to/input.csv')->toTSV('path/to/output.tsv');
$excel->source('path/to/input.tsv')->toCSV('path/to/output.csv');

// Converts Pipe delimited file to Semi-Colon delimited file by passing delimiters
$excel->source('path/to/input.txt', '|')->to('path/to/output.txt', ';');

// For Excel source files you can specify a worksheet by name or number
$excel->source('path/to/input.xls')->worksheet('Sheet 2')->toCSV('path/to/output.csv');
$excel->source('path/to/input.xlsx')->worksheet(2)->toTSV('path/to/output.tsv');

// For Excel source files you can also specify an export date format
$excel->source('path/to/input.xls')->exportDateFormat('d/m/Y')->toCSV('path/to/output.csv');
$excel->source('path/to/input.xlsx')->exportDateFormat('d/m/Y')->toTSV('path/to/output.tsv');

Laravel Usage

For Laravel users there is the option of using a Facade.

use LabelWorx\ExcelConverter\Facades\ExcelConverter;

ExcelConverter::source('path/to/input.xls')->toCSV('path/to/output.csv');

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

统计信息

  • 总下载量: 7.03k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-09-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固