Export to Excel -> Convert TD's with class to a given format
Export to Excel -> Convert TD's with class to a given format
Been loving DataTables since I discovered it. Used the help a lot, but couldn't find the answer to this one.
Creating a table with conditional highlighting on various cells. Doing this by setting a class name on each impacted TD.
Is there a way that I can use customize on my Excel button to convert classes to styles? I'm fine doing this manually for each class (ie find all TD's with a class of "red" and set $(this).attr( 's', '11' )).
Currently I am iterating over all TD's with jQuery and evaluating the text contents to manually set the styles. It's a bit painful.
Answers
There currently isn't a way of doing this I'm afraid - your semi-manual method is the way to do.
I've been toying with the idea of spinning the XLSX creation stuff into a separate project and rewriting it to be a bit more flexible, allowing exactly the kind of thing you are looking for. Early planning stages, and its somewhat time dependent (since my focus is DataTables core just now), but longer term I think this sort of thing should be possible.
Allan