Please I need to customize an excel sheet but I do not know number of columns in my excel sheet. It may be 10 columns or 30 or 40 all depends on user. My question how to access those columns to change the background color
This example here shows how to colour the columns. You can find the number of columns with columns().count() - then iterate through those columns in the spreadsheet.
Thanks for reply.
That will color column 'C', I need to select all columns in the excel sheet, so if I have column A, B, C, D, E in excel I need a code that loop over those columns. If I have column A, B, C, D, E, F, G in excel I need a code that a loop over those columns. In short I need code that loop over columns dynamically whatever the number of columns.
This updated example here should help you get that loop going: http://live.datatables.net/sesugofi/1/edit
It looks like you're new here. If you want to get involved, click one of these buttons!
DataTables designed and created by SpryMedia Ltd.
SpryMedia Ltd is registered in Scotland, company no. SC456502.