PHP code example of technicalkumargaurav / ppt-exporter

1. Go to this page and download the library: Download technicalkumargaurav/ppt-exporter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

technicalkumargaurav / ppt-exporter example snippets




echnicalkumargaurav\PptExporter\PptExporter;

$data = [
    ['Name', 'Age', 'City'],
    ['Gaurav', 30, 'Bhopal'],
    ['Rahul', 25, 'Delhi'],
];

PptExporter::make()
    ->title('Employee Report')
    ->table($data)
    ->save('employees.pptx');



echnicalkumargaurav\PptExporter\PptExporter;

$data = [
    ['Name', 'Age', 'City'],
];

for ($i = 1; $i <= 55; $i++) {
    $data[] = [
        'Employee ' . $i,
        rand(20, 50),
        'City ' . $i
    ];
}

PptExporter::make()
    ->title('Employee Report')
    ->rowsPerSlide(20)
    ->table($data)
    ->save('employees.pptx');