承接 ribojhin/excelmacro 相关项目开发

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

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

ribojhin/excelmacro

最新稳定版本:0.1.4

Composer 安装命令:

composer require ribojhin/excelmacro

包简介

Edit an Excel file that contains macros

README 文档

README

This PHP library allows you to modify an Excel file that contains macros without disabling them. For most PHP projects, the library (https://github.com/PHPOffice/PhpSpreadsheet) allows you to manipulate Excel files. However, when you modify an Excel file with macro (xlsm), the macros no longer work. This PHP library will allow you to modify XLSM files without disabling macros. The library only applies to Excel files with macros

Requirements

Installation

You can use Composer or simply Download the Release

Composer

The preferred method is via composer. Follow the installation instructions if you do not already have composer installed.

Once composer is installed, execute the following command in your project root to install this library:

  composer require ribojhin/excelmacro

Finally, be sure to include the autoloader:

<?php
  require_once '/path/to/your-project/vendor/autoload.php';

Quickstart

The example below will load data into an excel file that contains macros:

<?php
  require_once 'autoload.php';                                      // Comment this line if you use Composer to install the package
  use \Ribojhin\Excelmacro;

  $excelMacro = new Excelmacro("_FILE_PATH_SRC_XLSM_");              // Set excel file path you want to edit
  $excelMacro->setSheet(0);                                         // Set sheet by index
  $excelMacro->setCellValue($excelMacro->getSheet(), "_KEY_", '_VALUE_'); // Set cell
  $excelMacro->save("_FILE_PATH_DEST_XLSM_");                        // Set destination file path

统计信息

  • 总下载量: 42
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-12