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

Create Excel file on the fly #11

Closed
nakoda opened this issue Mar 23, 2018 · 4 comments
Closed

Create Excel file on the fly #11

nakoda opened this issue Mar 23, 2018 · 4 comments
Labels

Comments

@nakoda
Copy link

nakoda commented Mar 23, 2018

Friend It is not an issue, I want to know how i can use this plugin to generate excel file on the fly. I do not want to save file on server. It take data from database and write in spreadsheet and available user for download

Your quick response is appricited

@robertpustulka
Copy link
Member

Hi. Thanks.

You just need to fill a table with data, set your output file and call writeSpreadsheet() on a table. Or you can use a manager with dynamic tables as described here: https://github.com/robotusers/cakephp-excel#working-with-different-tables.

Then you need to attach your output file to the response.

@nakoda
Copy link
Author

nakoda commented Mar 24, 2018

Thanks for quick response.

Its seems we can use this in table files. Is there any method available which can use directly from controller and output to view.

Also still i am not clear how things will come together. Suppose i get all blog data using find() method [with associated table data]. Now how to write this data on spreadsheet and make it available for download.

@robertpustulka
Copy link
Member

If you feel anything is missing in the plugin, feel free to send a PR.

Although this plugin is just an ORM wrapper for PHP Spreadsheet lib. If you need to have some sort of controller-view integration that's just up to you.

@thiagoreri
Copy link

You just need to fill a table with data, set your output file and call writeSpreadsheet() on a table.

Can you give us an example?

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

No branches or pull requests

3 participants