KoolReport's Forum

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

Dashboard - Exporting - with Views - Dashboard to Excel #3055

Open Katherine Wong opened this topic on on May 23, 2023 - 5 comments

Katherine Wong commented on May 23, 2023

From the https://www.koolreport.com/examples/reports/dashboard/demo/

May I know when can the development team fix this error? Thanks.

Sebastian Morales commented on May 24, 2023

Thank for your feedback! We've fixed this issue with Dashboard Demo's Exporting With Views. You can check the updated code in file ExportViewBoard.php below the page. Pls try it again and let us know if there's any issue.

Katherine Wong commented on May 24, 2023

Hi, I found the export only for the line and bar chart, how about export the "Data table" into the excel?? Looking for your reply.

Sebastian Morales commented on May 24, 2023

Oh, it's because in the Dashboard's excel view file export_views/ExportViewBoardExcel.view.php we don't include excel's Table widget. You can add it yourself to the excel view:

        $ProductTable = $dashboard->widget("ProductTable");
            "dataSource" => $ProductTable->exportedData()
Katherine Wong commented on May 24, 2023

Hi, Can I used this method ?


                Panel::create()->type("danger")->header("<b>Profit and Loss/Income Statement</b>")->sub([
			->title("<i class='far fa-file-pdf'></i> Export Options")
				"Export PDF"=>MenuItem::create()
					Client::widget("ClosingPLStatementTable")->exportToPDF("PL Statement Dashboard", ["all" => true] )
				"Export Xlsx"=>MenuItem::create()
					Client::widget("ClosingPLStatementTable")->exportToXLSX("All PL Statement Dashboard",["all"=>true])

			HTML::style("#ClosingPLStatementTable .table {white-space:nowrap;}"),

			HTML::style("#ClosingPLStatementTable .pivot-column td{font-weight:bold}"),
			HTML::style("#ClosingPLStatementTable .pivot-row{white-space: normal;}"),


Sebastian Morales commented on May 25, 2023

I'm not sure what you meant but the menu and command for exporting the current dashboard to excel is:

                            ->text("Dashboard to Excel")
                            ->icon("far fa-file-excel")
                                    ->exportToXLSX("Dashboard - Revenue 2022")

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