I am working on a project where a user can upload an excel file with multiple sheets.
Now I just need to append some rows in one of the sheets and download that file.
I am using laravel excel version 3.0 for that. I tried to import the excel file first which gives me the collection of all the sheets and now I am just exporting them with the same collection (after updating the specific sheet).
This works fine for the data but loses all the styling and formatting in other sheets.
I just want to know that is there any way to achieve this without losing the styling and formatting of other sheets.
Here is my code.
// this gives me data in the collection
$defaultData = Excel::toCollection(new EvaluationSheetImport, storage_path('app/public/evaluation_data.xlsx'));
// it returns the sheet without styling
Excel::queue(new AssessmentSheetExport($defaultData), 'evaluation_databaseExport.xlsx', 'public');