KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Missing Uncaught Error: Class 'koolreport\excel\Table' #1820

Open Daniel Amamoo-Otchere opened this topic on on Jan 6, 2021 - 4 comments

Daniel Amamoo-Otchere commented on Jan 6, 2021

Hello Team, Happy New year, I am getting this error with the package KoolReport Pro 4.3.2.

Fatal error: Uncaught Error: Class 'koolreport\excel\Table' not found in

my code is as follows :

ListByPaymentCallsExcel.php

 <?php 
    $sheet1 = "List Processed Scholarship";
 ?>
 <meta charset="UTF-8">

 <div sheet-name="<?php echo $sheet1;?>">
       <?php
	 	 \koolreport\excel\Table::create(array(
			  "dataSource" => $this->dataStore('result'),
		));
      ?>   
</div>

and my export code :

 require_once "reports/kreports/ListByPaymentCallsExcel.php";
			   $report = new ListByPaymentCalls(array(
						"payment_call_id"=>$_GET['payment_call_id']
					));
				$report->run();
			ob_clean();
				$report->exportToXLSX('ListByPaymentCallsExcel')->toBrowser("MyReport.xlsx");

Why does it indicate the table is not available ?

Kindly help!

Daniel Amamoo-Otchere commented on Jan 6, 2021

This export function "exportToXLSX" is also not working for bigspreadsheet. yet in the online example it has a sample call to it.

I managed to get the report to load the excel file without error but it returns empty page with the name of the sheet sheet-name and another sheet with named chart_data

I renamed to Excel view to ListByPaymentCallsExcel.view.php ` <?php

use\koolreport\excel\Table;
$sheet1 = "ScholarshipPayments";

?> <meta charset="UTF-8"> <div sheet-name="<?php echo $sheet1;?>">

   <?php Table::create(array("dataSource"=>$this->dataStore('result')));?>   

</div>


Why is it not returning any data?
Sebastian Morales commented on Jan 7, 2021

Daniel, the structure of the excel view file should be strictly 2-level divs like this:

<div sheet-name="sheet1">

    <div>
        Text
    </div>

    <div>
        <?php
            \koolreport\excel\Table::create(...);
        ?>
    </div>

</div>

Please try it and let us know if it works. Cheers,

christer77 commented on Jun 25, 2022

Hello team! It seems that this topic is still not closed, so I'm relaunching it because I'm facing the same problem.

<< Missing Uncaught Error: Class 'koolreport\excel\Table >>

Please help us! Thanks

Sebastian Morales commented on Jun 27, 2022

Pls install our Excel package and use full namespace \koolreport\excel\Table in your excel view. Tks,

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
None yet

None