MNB PHPExcelDeveloper Guide

Collaboration examples

Collaboration Excel examples, explained clearly.

Open a focused example to see the implementation path, copy-ready PHP, expected workbook behavior, and the production boundary that matters.

2examples in this category
21focused categories
5implementation paths
01
Comments & Notes

Add classic Excel notes with an author, content, size, and visibility settings.

EasyDirect API
comment()comments()
comments-notes.php
<?php

use Mnb\PHPExcel\MnbExcel;

MnbExcel::report($rows)
    ->comment('C2', 'Finance Team', 'Confirm this amount before approval.', [
        'width' => 280,
        'height' => 120,
        'visible' => false,
    ])
    ->save('comments-and-notes.xlsx');
02
Share Workbook

Generate the workbook safely, then upload it through your organization’s OneDrive, SharePoint, Google Drive, S3, or application storage integration.

EasyExternal service
storagePath()saveSafe()
share-workbook.php
<?php

use Mnb\PHPExcel\MnbExcel;

$directory = MnbExcel::storagePath('exports');
$path = MnbExcel::report($rows)
    ->withHeader()
    ->saveSafe($directory, 'team-report.xlsx');

// Hand $path to your approved storage SDK or upload service.
$sharedUrl = $storageClient->uploadAndShare($path, [
    'access' => 'organization',
    'role' => 'viewer',
]);