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

Sum up specific cell range #10

Open
guevarawebgraphics opened this issue Nov 28, 2019 · 1 comment
Open

Sum up specific cell range #10

guevarawebgraphics opened this issue Nov 28, 2019 · 1 comment

Comments

@guevarawebgraphics
Copy link

Currently I can get the data from my excel file, for every sheet I can get the data collection. The problem is, I want to sum up the value of specific cell range.

For example, I have field of weight and I want to get the grand total of that field.

My question in stackoverflow: https://stackoverflow.com/questions/59081560/cyberduck-sum-up-column-value-laravel-excel

@SimoTod
Copy link

SimoTod commented Nov 28, 2019

Once you get the collection object, you can use one of the standard laravel methods to calculate the total. It looks like you need to use "reduce". (https://laravel.com/docs/5.8/collections#method-reduce)

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