export sum at the end

Is there a way to sum the totals of an exported table at the end of the excel file automatically ?
34 Replies
taka92
taka924mo ago
Yes, you can sum the totals of an exported table As far as i know, there are serveral ways to solve it
AnnA|Sythe|Jake
AnnA|Sythe|JakeOP4mo ago
Do you have a link to the documentation ? I didn't see it here https://filamentphp.com/docs/3.x/actions/prebuilt-actions/export Just a sum in the current row.
AnnA|Sythe|Jake
AnnA|Sythe|JakeOP4mo ago
@Takashi do you have any documentation or something I can read to implement this ?
taka92
taka924mo ago
I have no any documentation. but if you want, I will give you full explanation
AnnA|Sythe|Jake
AnnA|Sythe|JakeOP4mo ago
Would appreciate that. I already had to do a modifyed query on the table to sum and group alot of the values for export. Just trying to figure where in the process to add a row on the bottom of the export totalling it with out having to reopen the file
taka92
taka924mo ago
So, did you install the Laravel Excel package?
AnnA|Sythe|Jake
AnnA|Sythe|JakeOP4mo ago
No using filament to do the export. Since it is built in
taka92
taka924mo ago
Well, I think you should install Laravel Excel Package first. composer require maatwebsite/excel
AnnA|Sythe|Jake
AnnA|Sythe|JakeOP4mo ago
Will I have to rebuild this exporter from scratch ? Why add a package when filament "should" be able to do it ?
taka92
taka924mo ago
it is not absolutely ncessary to install that package. but using Larave Excel is the most straightforward and powerful way to handle exports in Filament especially when you need to customize the export you want to implement this using only Filament?
AnnA|Sythe|Jake
AnnA|Sythe|JakeOP4mo ago
Aight will look into the documentation of it. And ideally. I already built the export in filament using table data that I plan to expand on. I just trying to figure out how to add a row at the end.
taka92
taka924mo ago
I see, I will share source code with you Well, I checked it again but without installing Laravel Excel package, it is impossible to implement
AnnA|Sythe|Jake
AnnA|Sythe|JakeOP4mo ago
So got to rebuild this thing ?
taka92
taka924mo ago
if you need dynamic Excel features like sum totals or formulas in the exported file, you must use Laravel excel along with Filament
AnnA|Sythe|Jake
AnnA|Sythe|JakeOP4mo ago
Well I don't need it to be doing functions just out put the data Cause i need CSV and PDF as well. PDF is the next one i needed to do after this.
taka92
taka924mo ago
so, you want to add the sum totals in the end of CSV or PDF too?
AnnA|Sythe|Jake
AnnA|Sythe|JakeOP4mo ago
Yep PDF shouldn't be hard since it is just a thing that saves an HTML page as pdf.
taka92
taka924mo ago
right, so, I think we should solve them one by one
AnnA|Sythe|Jake
AnnA|Sythe|JakeOP4mo ago
CSV and Excel are made together in filament
taka92
taka924mo ago
got it. Well, filament provide us with only some simple features you want to use advanced features related to Excel I think you should install laravel excel package
AnnA|Sythe|Jake
AnnA|Sythe|JakeOP4mo ago
Aight. Will take a look. This sucks puts me behind schedule what I promised my boss 😦
taka92
taka924mo ago
Well, I can help you if you want
AnnA|Sythe|Jake
AnnA|Sythe|JakeOP4mo ago
I mean sure. How would you help ? Installed the excel Apparently already there for other exports from old dev
taka92
taka924mo ago
how many developers are there in?
AnnA|Sythe|Jake
AnnA|Sythe|JakeOP4mo ago
Took over from the old dev that moved on haha Small company
taka92
taka924mo ago
you have any the other projects or jobs for me?
AnnA|Sythe|Jake
AnnA|Sythe|JakeOP4mo ago
huh ?
taka92
taka924mo ago
Well, I am looking for a job now
AnnA|Sythe|Jake
AnnA|Sythe|JakeOP4mo ago
Ah. I know my boss doesn't have the budget for any other dev 😦 I am going to be working on a go project soon but need to start that still lol
taka92
taka924mo ago
could you please let me know your skype id or telegram link to keep in touch with you?
AnnA|Sythe|Jake
AnnA|Sythe|JakeOP4mo ago
I don't use either of those. Just discord and teams
taka92
taka924mo ago
okay, contact me anytime if you need any help!

Did you find this page helpful?