承接 olegv/sheets 相关项目开发

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

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

olegv/sheets

最新稳定版本:v1.0.1

Composer 安装命令:

composer require olegv/sheets

包简介

Google sheets manager

README 文档

README

Lib for work with google sheets

Features

  • lightweight
  • dependency-free(only curl and openssl)
  • 90+% test coverage
  • phpstan max lvl
  • phpstan full strict rules

Install

composer require olegv/sheets

Usage

  1. You must create project and add to project service account here
  2. In service account must create key in kes tab, after that your credentials will be downloaded as a json file
  3. Put json file with credentials somewhere, for example /path_to/credentials.json
  4. Ydoou may need to add the email address from your credentials to sheet access
  5. Code example
use OlegV\Sheet;

$sheet = new Sheet("sheets_id",'/path_to/credentials.json');


//append
$response = ->setSheet('Sheet9')->append([[1,2,"Text","Текст","many words many words many words",6,7,8,9]], 'R1C1');
print_r($response);


//clear
$data = json_decode($response, true);
$range = explode('!', $data['updates']['updatedRange']);
$response = $sheet->clear($range[1]);
print_r($response);


//get
$response = $sheet->get(
    'A6:C6',
);
print_r($response);

//update
$response = $sheet->update(
    [[1, 2, 3]],
    'A6:C6',
);
print_r($response);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-08