excelHtml5 formatting excel questions
excelHtml5 formatting excel questions
Even after reading some of the documentation on Office and XML, I cannot grasp how to code the jquery part. For example, if concatenating is allowed and how to select a range of cells.
Below is an example taking from the excelHtml5 documenation.
row c[r^="F"]
This selects column F of all rows. Is there a way to select a range of columns of all rows? So that I don't have 10 repeated jquery lines?
What does the ^ represent?
How do I select specific rows? In the Office OpenXML documentation, it states <row r="13">
and so I've tried row[r^="1"] c[r^="F"]
, but that didn't work.
Answers
From the jQuery docs its a starts with selector.
There is ends with as well (
$=
) but that's no good for selecting columns of data since1, 11, 21, etc
would match$=1
).Perhaps the easiest way would be to select the rows and then loop over them, getting the required cell:
Its just jQuery selectors in the end. Its just that you are traversing an XML document rather than HTML.
Allan