Cell manipulation

$sheet->cell('A1', function($cell) {

    // manipulate the cell


$sheet->cells('A1:A5', function($cells) {

    // manipulate the range of cells


Set background

To change the background of a range of cells we can use ->setBackground($color, $type, $colorType)

// Set black background

Change fonts

// Set with font color

// Set font family

// Set font size

// Set font weight to bold

// Set font
    'family'     => 'Calibri',
    'size'       => '16',
    'bold'       =>  true

Set borders

// Set all borders (top, right, bottom, left)
$cells->setBorder('solid', 'none', 'none', 'solid');

// Set borders with array
    'top'   => array(
        'style' => 'solid'

Set horizontal alignment

// Set alignment to center

Set vertical alignment

// Set vertical alignment to middle