Replies: 1 comment 2 replies
-
I was able to do the formatting manually using a combination of phpSpreadsheet's functions inside the afterSheet event but I was hoping if there was a less manual way of doing this. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How to add column styles(number formatting and all) per table?
I've searched a lot about this topic and the ones are:
-column formatting is done on one sheet and one table (I've also read the laravel excel docs about this)
-tables are usually exported using fromArray.
-was thinking of binding the cell to a certain data format according to value but I decided against it because the tables are exported using fromView (plus with the additional layer of complexity that tables 1 and 3 are manually done using HTML and table 2 is a collection of table entries and all three of them are encapsulated as a collection).
Supposing I have three tables and I want to format some columns in table 2 (table 2 is sandwiched between tables 1 and 2) to have a specific number formatting. Tables 1 and 3 are made enclosed in HTML table tags individually.
The issue I have with this is that these three tables are exported using the fromView method and was built using an html builder.
tables generated is similar to this closed issue:
Generating a single sheet with multiple tables under each other #2338
Beta Was this translation helpful? Give feedback.
All reactions