KoolReport's Forum

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

How to use exportToCSV custom column name? #1064

Open peter sereny opened this topic on on Aug 28, 2019 - 2 comments

peter sereny commented on Aug 28, 2019

Hi! I want to use something like this, is it possible somehow?

$report->exportToCSV('data',array(
                'columns'=>array(
                    "mth"=>'Month',
                    "count"=>'Count',
                    "closed"=>'Closed'
                ),
                "BOM"=>false,
            ))->toBrowser("myreport.csv");
peter sereny commented on Aug 28, 2019

Also how can I exclude queried columns from the CSV?

Like those:

Eugene commented on Aug 29, 2019

Hi,

to set what column to export you can use csv exporting options.

To change the column name you can use ColumnRename process (it will change the column names in your datastore so maybe you will have to change the names somewhere else in your code)

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