rawthriver Posts: 1Questions: 1Answers: 0
Hi. I have complex structure inside TD. Is it possible to provide some option to exclude some elements from export?
<span class="name">Some Name</span><span class="value hidden">hidden data</span>
will produce in Excel text: Some Namehidden data
I need to exclude from exort elements with "hidden" class.
This discussion has been closed.
Yes, you can use the
formatoption of the
exportOptions. There is an example available here. You could use a regex to get the value you want for example.
Another option is to use orthogonal data to define the export.
I have a similar issue as described here, but could not figure out how to use the regex to exclude the "hidden" class elements from the export.
Could you give an example of how the exportOptions would be specified?
If you aren't sure about the regex, you might be best using jQuery to parse that into a DOM object and then get the text from the required cell.
That is exactly what i did.
Here's the code in case someone might need a similar solution: