vendredi 26 juillet 2019

Number not converting to indian money format in ms excel while exporting though laravel 5.4 with maatwebsite package

While exporting excel file through laravel 5.4 maatwebsite package numbers are not converting to Indian money format in windows MS Excel.

I've already set the column format as shown below code:

           `$sheet->setColumnFormat(array(
                'D' => '#,##0.00_-',
            ));`

Also tried this function- PHPExcel_Style_NumberFormat but this function results in US money format.

Some example code:

$sheet->setColumnFormat(array( 'D' => \PHPExcel_Style_NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED2 ));

       return \Excel::create($fileName, function($excel) use($reportQry){

          $excel->sheet('Report', function($sheet) use($reportQry,$excel){

              $sheet->setColumnFormat(array(
                  'C' => '#,##0.00_-',
                  'D' => \PHPExcel_Style_NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED2
              ));

I need to convert the number to Indian number format in ms excel. Help for this will be highly appreciated.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire