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

Append to existing file ERROR: Illegal offset type in isset or empty #502

Closed
edward-buskus opened this issue Jul 27, 2015 · 1 comment
Closed

Comments

@edward-buskus
Copy link

I need open existing xls file and append new sheet.

 Excel::load('/public/template.xlsx', function($reader)  {
            $reader->sheet(function($sheet)
            {
                $sheet->appendRow([
                    'test1', 'test2',
                ]);
            });
        })->export('xlsx');

But i get error : ErrorException in PHPExcel.php line 575: Illegal offset type in isset or empty
If i set some sheet name

 Excel::load('/public/storistemplate.xlsx', function($reader)  {
            $reader->sheet('NewSheet',function($sheet)
            {
                $sheet->appendRow([
                    'test1', 'test2',
                ]);
            });
        })->export('xlsx');

I get error : FatalErrorException in HomeController.php line 234: Call to a member function appendRow() on a non-object

@patrickbrouwers
Copy link
Member

Appending new sheets to a template is not yet supported.

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