Export options
Export options
rawthriver
Posts: 1Questions: 1Answers: 0
in Buttons
Hi. I have complex structure inside TD. Is it possible to provide some option to exclude some elements from export?
F.ex:
<td data-field="name">
<span class="name">Some Name</span><span class="value hidden">hidden data</span>
</td>
will produce in Excel text: Some Namehidden data
I need to exclude from exort elements with "hidden" class.
This discussion has been closed.
Answers
Yes, you can use the
format
option of theexportOptions
. 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.
Allan
Hi allan.
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.
Allan
Thanks Allen,
That is exactly what i did.
Here's the code in case someone might need a similar solution: