<?php
    use \koolreport\excel\Table;

    $sheet1 = "Sales by Customer";
?>
<meta charset="UTF-8">

<div sheet-name="<?php echo $sheet1; ?>">
    <?php
    $spreadsheetStyle = [
		'font' => [
			'bold' => false,
			'italic' => true,
			'underline' => false,
			'strikethrough' => true,
			'name' => 'Arial',
			'size' => '14',
			'color' => '808080',
		],
		'border' => [
			// 'color' => '000000',
			'width' => 'thick', //'thin', 'medium', 'thick'
			// 'style' => 'solid', //'none', 'solid', 'dashed', 'dotted', 'double'.
			'top' => [
				'color' => '000000',
				'width' => 'medium', //'thin', 'medium', 'thick'
				'style' => 'solid', //'none', 'solid', 'dashed', 'dotted', 'double'.
			],
			'right' => [],
			'bottom' => [],
			'left' => [],
		],
		'backgroundColor' => '00ff00',
		'wrapText' => true,
	];
    ?>
    <div><strong>
        Appointments Report
    </strong></div>

    <div>
        <?php
        Table::create(array(
            "dataSource" => $this->dataStore('myappts'),
            "removeDuplicate"=>array("name", "concatday"),

                "columns"=>array(
                    "name"=>array(
                    "label"=>"Service Name",
                ),
                "concatday"=>array(
                    "label"=>"Start-date",
                ),
                 "time"=>array(
                    "label"=>"Start-time",
                    "type"=>"hh:mm", 
                ),
                "endtime"=>array(
                    "label"=>"End-time",
                    "type"=>"hh:mm", 

                ),
                "first_name"=>array(
                    "label"=>"First Name",
                ),
                "last_name"=>array(
                    "label"=>"Last Name",
                ),
                "email"=>array(
                    "label"=>"Email",
                ),
                "date_sent"=>array(
                    "label"=>"Date Sent",
                ),
                 "email_header"=>array(
                    "label"=>"Email Header Sent",
                ),
                 "email_description"=>array(
                    "label"=>"Email desc Sent", 
                ),
                "status"=>array(
                    "label"=>"Status", 
                ),
                ),
        ));
        ?>
    </div>
    
</div>
