Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can I add custom styles in my table... ? #34

Closed
r3k4 opened this issue Feb 27, 2014 · 2 comments
Closed

how can I add custom styles in my table... ? #34

r3k4 opened this issue Feb 27, 2014 · 2 comments

Comments

@r3k4
Copy link

r3k4 commented Feb 27, 2014

how can I add custom styles in my table... ?

@MaatwebsiteSupport
Copy link
Contributor

This packages has a couple of styling wrappers (see documentation).
If you want to use the other onces (see PHPExcel documentation), you can always load the class into a $var.

This example will color the text of a range of cells red.

$obj = Excel::loadView('excel')->setTitle('test')->sheet('test');
$obj->excel->getActiveSheet()
                ->getStyle('A1:B30')
                ->getFont()
                ->applyFromArray(
                    array(
                        'name' => 'Arial',
                        'color' => array(
                            'rgb' => 'FF0000'
                        )
                    )
                );
$excel->export('xls');

@MaatwebsiteSupport
Copy link
Contributor

Inside the blade view file (used by loadView()) you can now use inline css styles.(See documentation for available style tags)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants