cacing69 / uxcel
Uxcel 是一个 PHP 库,可以为您保护/解除某些支持文档的保护。
v1.0.2
2020-07-12 14:20 UTC
Requires
- php: ^5.3.3 || ^7.0
This package is auto-updated.
Last update: 2024-09-24 11:49:38 UTC
README
Uxcel 是一个 PHP 库,可以为您保护/解除某些支持文档的保护。
uxcel-php深受 Sourceforge 上的 Uxcel 启发 UXCEL,该库是用 Java 编写的。
Uxcel 需要 PHP >= 5.*
目录
安装
composer require cacing69/uxcel
用法
自动加载
uxcel-php 支持使用 PSR-0 和 PSR-4 自动加载器。
<?php # When installed via composer require_once 'vendor/autoload.php';
您也可以加载 Uxcel 提供的 PSR-0 自动加载器
<?php # Load Uxcel own autoloader require_once '/path/to/Uxcel/src/autoload.php';
或者,您可以使用任何其他符合 PSR-4 规范的自动加载器
解除 Excel 保护
使用 Uxcel\Factory 创建并初始化一个 uxcel 实例。
<?php // use the factory to create a Uxcel instance $uxcel = new Uxcel\Factory(); // set target file to unprotect $target = "/path/to/file.xlsx"; $uxcel->setTarget($target); // set destination to save result $destination = "/path/to/destination"; $uxcel->setDestination($destination); // lets process unprotect excel $unprotect = $uxcel->unProtect(); // it will return uxcel instance
许可证
Uxcel-PHP 在 MIT 许可证下发布。有关详细信息,请参阅附带的 LICENSE 文件。