PHP code example of asperhsu / lang-excel-converter

1. Go to this page and download the library: Download asperhsu/lang-excel-converter 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/ */

    

asperhsu / lang-excel-converter example snippets


php artisan lang-excel:import {filename=translations.xlsx} {--disk}

use Maatwebsite\Excel\Facades\Excel;
use Asper\LangExcelConverter\Imports\TranslationsImport;

Excel::import(new TranslationsImport, 'YOUR FILE');

php artisan lang-excel:export {filename=translations.xlsx} {--disk}

use Maatwebsite\Excel\Facades\Excel;
use Asper\LangExcelConverter\Exports\TranslationsExport;

// store
Excel::store(new TranslationsExport, 'YOUR FILE NAME');

// send download response
return Excel::download(new TranslationsExport, 'YOUR FILE NAME');

php artisan vendor:publish --provider="Maatwebsite\Excel\ExcelServiceProvider"

[
    ...
    'transactions' => [
        'handler' => null,  // change 'db' to null
    ],
    ...
]