Excel formating
Excel formating
Wooly65
Posts: 94Questions: 27Answers: 1
I would like to style my excel spreadsheet, but am have a hard time understand the process. I have seen a couple examples:
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['Sheet1.xml'];
$('row:first c', sheet).attr('s', '42');
$('row c[r*="2"]', sheet).attr( 's', '25' );
}
I know what they do but how do I interpret the code:
'row:first c' what does "c" mean? // Style the first row Bold, green background, thin black border
'row c[r*="2"]' what does "c" and "r*" mean? // Style and row containing a 2 Normal text, thin black border
What if I wanted all rows to have normal text and thin black border?
What if I wanted the entire 2nd column have style 52 and 65?
Are there a couple of good examples postings or sites?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You would need to understand the Open Spreadsheet XML to know what the exact markup is.
c
is a cell tag,row
is a row tag, etc, like like in HTML, but with tag names and structure specific to spreadsheets.Allan