KoolReport's Forum

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

Header grouping is not working in export to excel #1634

Closed Mike opened this topic on on Sep 29, 2020 - 5 comments

Mike commented on Sep 29, 2020

The header grouping is not working in export to excel. I have applied it using headers colspan in the pdf report with the code

"headers" => array(
	array(
		"" => array("colSpan"=>3),
		"Amount" => array("colSpan"=>3),
		"Percentage" => array("colSpan"=>2),
	)
)

Find the below print screen for reference.

David Winterburn commented on Oct 1, 2020

Hi Mike,

Unfortunately not all Core's Table widget's features are available for Excel's Table widget. In this case the "headers" property won't work with Excel's Table. While it's not as convenient, I think you could use some Text widget with bold font style to simulate those headers just above your table:

https://www.koolreport.com/docs/excel/excel_widgets/#text-widget-(version-%3E=-6.0.0)

https://www.koolreport.com/examples/reports/excel/excel_template/

//MyReportExcel.view.php
    <div cell="A1" range="A1:H1" excelstyle='<?php echo json_encode($styleArray); ?>' >
        Sales Report
    </div>
Mike commented on Oct 3, 2020

Hi David,

Thanks for the updates. But am looking for the colspan property of the header column. Is there any way to format the exactly like that in excel?

Mike commented on Oct 3, 2020

It's done...I have applied text widget with range for the colspan in the headers.

I have another issue related to excel format that is 'Remove duplicate rows'. Shall I discuss in this forum or need to create another forum?

David Winterburn commented on Oct 5, 2020

Hi Mike,

Please open a new topic for a new issue so that other users and we could follow them better in the future. Thanks!

Mike commented on Oct 5, 2020

ok sure

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
help needed

Excel