Export table caption (v2023)

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
elonmusk
User
Posts: 52

Export table caption (v2023)

Post by elonmusk »

i have one dashboard report i want export to Excel using phpexcel with table caption.
Is there any posibilities?
Help me out.

Thanks !


mobhar
User
Posts: 11791

Post by mobhar »

Did you mean "table caption" = title of the page?


elonmusk
User
Posts: 52

Post by elonmusk »

yes thats correct. because i want to export the dashboard report that contains 9 reports i can't differentiate which report that is. That's why i am asking.
Please help me out.
Thank You!


mobhar
User
Posts: 11791

Post by mobhar »

Well, since you want to export the Dashboard Report, it does not support for Page_Exporting server event.

You may follow this topic, and then you need to customize the loadHtml method that belongs to the related Export class, since Report Pages use that method to display the data in the exported media/file.


elonmusk
User
Posts: 52

Post by elonmusk »

I am using pageDataRendering function. Now i am facing issue is that table header is exporting but i want it as a header now it is show like a simple text. below i my code please correct it if i am wrong.

public function pageDataRendering(&$header)
    {
        // Example:
        //$header = "your header";
        if ($this->isExport("excel"))
            $header = '<table><thead><tr class = "ew-table-header"><th class="ew-export-table-header ew-export"><b>BANGALORE</b></th></tr></thead></table>';
    }

mobhar
User
Posts: 11791

Post by mobhar »

You may disable the PhpSpreadsheet extension from Tools -> Extensions, after that, re-generate ALL the scripts, and try again.


elonmusk
User
Posts: 52

Post by elonmusk »

If i disable PhpSpreadsheet extension. grand summary is not exporting.
i don't know how to solve it.


Post Reply