title: Jspreadsheet | Examples | Changing the table style keywords: Jexcel, jquery, javascript, table design, spreadsheet, table, grid, colours description: Table styling [Back to Examples](/v2/examples#more) # How to change the spreadsheet style. You can define the CSS for specific columns during the initialization. The following example uses the directive style:[] to bring populate the style attribute for each column. But, after the initialization is still possible to manage the cell style programmatically using the method getStyle or setStyle. | | | | ---|--- | | $('#my1').jexcel('setStyle', 'A1', 'font-weight', 'bold'); | Change A1 fontWeight | | $('#my1').jexcel('setStyle', 'A2', 'background-color', 'yellow'); | Change A2 backgroundColor | | $('#my1').jexcel('setStyle', [ { A1: 'font-weight: bold; color:red;' }, { B2: 'background-color: yellow;' }, { C1: 'text-decoration: underline;' }, { D2: 'text-align:left;' } ]); | Change the table in one batch | | $('#my1').jexcel('getStyle', 'A1');| Get A1 style attributes | | $('#my1').jexcel('getStyle');| Get the whole table attributes | ### Source code ```html
``` ## How to set global CSS rules for your jquery tables Give your clients a nice look table with colours and styling. ### Source code ```html
```