Posted 10 April 2020, 5:39 am EST
How can I create Tables with different styles, merged cells, change fonts, colors from SpreadJS UI from sheets?
And what SpreadJS components should I use to implement this in Angular?
Forums Home / Spread / SpreadJS
Posted by: vinayakbagi on 10 April 2020, 5:39 am EST
Posted 10 April 2020, 5:39 am EST
How can I create Tables with different styles, merged cells, change fonts, colors from SpreadJS UI from sheets?
And what SpreadJS components should I use to implement this in Angular?
Posted 14 April 2020, 7:37 am EST
Hi,
We are sorry there is no out of the box feature available which allows us to add table from the UI however SpreadJS exposes various API methods that you could use to update the spread as required(In this case, add/update table). This gives us the flexibility to control/customize the UI according to our requirements.
To add a table you could use the add() table method of the table manager, and to update the theme you may use the table.style() method. SpreadJS provides many inbuild themes that you could use, it is also possible to create a custom theme using the TableStyle class.
Please refer to the following sample which demonstrates the same and let us know if you face any issues:
https://codesandbox.io/s/funny-brown-tv6fl?file=/src/app/app.component.ts
API reference
• addSpan method: https://www.grapecity.com/spreadjs/docs/v13/online/SpreadJS~GC.Spread.Sheets.Worksheet~addSpan.html?highlight=addspan%2C
• add Table method: https://www.grapecity.com/spreadjs/docs/v13/online/SpreadJS~GC.Spread.Sheets.Tables.TableManager~add.html
• table class: https://www.grapecity.com/spreadjs/docs/v13/online/SpreadJS~GC.Spread.Sheets.Tables.Table.html
• Inbuild themes collection:https://www.grapecity.com/spreadjs/docs/v13/online/SpreadJS~GC.Spread.Sheets.Tables.TableThemes.html
Regards
Sharad