Export to Excel

I am facing issue with export to excel. I am using codeigniter 4 GroceryCRUD 2.9.2, However export to pdf and print works as expected. The error details.

ErrorException

Required parameter $pValue follows optional parameter $pCoordinate

  1. APPPATH\Libraries\GroceryCrudEnterprise\scoumbourdis\phpexcel\Classes\PHPExcel\Autoloader.php : 79 — CodeIgniter\Debug\Exceptions->errorHandler
$severity 8192
$message Required parameter $pValue follows optional parameter $pCoordinate
$file D:\webdevelopment\08-08-2021_New_Build\30-10-2021\ci4\app\Libraries\GroceryCrudEnterprise\scoumbourdis\phpexcel\Classes\PHPExcel\Worksheet.php
$line 1477
  1. APPPATH\Libraries\GroceryCrudEnterprise\grocerycrud\enterprise\src\GroceryCrud\Core\State\ExportState.php : 195 — GroceryCrud\Core\State\ExportState->exportToExcel ( arguments )
    $data

Array
(
[0] => Array
(
[userid] => test
[scheme] => Replacement of Old Pumpsets
[office] => CUDDALORE
[insdate] =>
[officer] =>
[workcompleted] =>
[document] =>
[invoice] =>
[paymentcompleted] =>
[central] =>
[state] =>
[farmer] =>
)

)

$columns

Array
(
[0] => stdClass Object
(
[name] => userid
[displayAs] => Farmer Name
)

[1] => stdClass Object
    (
        [name] => scheme
        [displayAs] => Scheme
    )

[2] => stdClass Object
    (
        [name] => office
        [displayAs] => Office
    )

[3] => stdClass Object
    (
        [name] => insdate
        [displayAs] => Inspection Date
    )

[4] => stdClass Object
    (
        [name] => officer
        [displayAs] => Inspection Official
    )

[5] => stdClass Object
    (
        [name] => workcompleted
        [displayAs] => Work Completed (Yes / No)
    )

[6] => stdClass Object
    (
        [name] => document
        [displayAs] => Inspection Document
    )

[7] => stdClass Object
    (
        [name] => invoice
        [displayAs] => Invoice
    )

[8] => stdClass Object
    (
        [name] => paymentcompleted
        [displayAs] => Payment Completed (Yes / No)
    )

[9] => stdClass Object
    (
        [name] => central
        [displayAs] => Central Share Relesed (Rs.)
    )

[10] => stdClass Object
    (
        [name] => state
        [displayAs] => State Share Relesed (Rs.)
    )

[11] => stdClass Object
    (
        [name] => farmer
        [displayAs] => Farmer Share Relesed (Rs.)
    )

)

Kindly help.

Hello @vallstn and welcome to our forums :hugs:

We’ve tracked this issue that the export to excel doesn’t work for PHP 8. Can you please confirm that the version of PHP is version 8 or later? I will try to fix this issue for the next release.

Regards
Johnny

Yes I am using PHP 8.0.11, Thanks for immediate response. I am waiting for next update.

Hello @vallstn ,

I am glad to inform you that the latest version of Grocery CRUD Enterprise (2.9.3) now includes the fix for the export to excel. In order to download the latest version visit the page: User's Page Login

Let me know if that worked for you.

Regards
Johnny

Thanks Johnny,

Now it is working.

Regards,
Vallstn

1 Like