PHP code example of nanaweb / excel-selection-setter

1. Go to this page and download the library: Download nanaweb/excel-selection-setter 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/ */

    

nanaweb / excel-selection-setter example snippets




use Nanaweb\ExcelSelectionSetter\ExcelSelectionSetter;
use Nanaweb\ExcelSelectionSetter\Strategy\AllFirst;


$setter = new ExcelSelectionSetter();
$setter->addStrategy(new AllFirst());

$setter->execute($pathToYourXlsx, 'all_first');




use Nanaweb\ExcelSelectionSetter\ExcelSelectionSetter;
use Nanaweb\ExcelSelectionSetter\Strategy\SynchronizeToTemplate;


$setter = new ExcelSelectionSetter();
$setter->addStrategy(new SynchronizeToTemplate());

$setter->execute($pathToYourXlsx, 'synchronize_to_template');