-
Notifications
You must be signed in to change notification settings - Fork 665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EXCLUDE doesn't need to be whole row Feature (with simple code change) #40
Comments
Thanks @SeanDevoy . If you know how to submit a PR, go for it and get the contribution! :) If not, just fork the repo, make the change, the find the "Submit Pull Request" button and it should be clear where to go from there. You can even make the change right in the web interface in your repo so you don't need to leave the browser. |
Did I do it correctly? Am I supposed to [cid:image001.png@01D1BD7F.4F390C10] ? From: rainabba [mailto:notifications@github.com] Thanks @SeanDevoyhttps://github.com/SeanDevoy . If you know how to submit a PR, go for it and get the contribution! :) If not, just fork the repo, make the change, the find the "Submit Pull Request" button and it should be clear where to go from there. You can even make the change right in the web interface in your repo so you don't need to leave the browser. — |
You did it correctly and have now officially contributed to another repo :) Thanks for the help. |
FYI: I love this add-in!
Currently, the "exclude" filter only ignores complete s (rows) with the matching class on them. I had a need to export a table and NOT export "controls" like Buttons and dropbox items into the spreadsheet.
With a very simple change to the code, individual s can have there content ignored. Code does not display well here, but the idea is simple. Step through the item's s. If the contains something with the exclude class, send an empty , otherwise send its contents. There is probably a cleaner way to do this, jQuery tips will be welcomed.
I changed:
// get contents of table except for exclude $(e.element).each( function(i,o) { var tempRows = ""; $(o).find("tr").not(e.settings.exclude).each(function (i,o) { tempRows += "<tr>" + $(o).html() + "</tr>"; }); e.tableRows.push(tempRows); });
to:
`
// get contents of table except for exclude
$(e.element).each( function(i,o) {
var tempRows = "";
$(o).find("tr").not(e.settings.exclude).each(function (i,p) {
tempRows += "";
$(p).find("td").not(e.settings.exclude).each(function (i,q) {
var flag = $(q).find(e.settings.exclude) // does this have an exclude item
if(flag.length >= 1) {
tempRows += " " // exclude it!!
} else {
tempRows += "" + $(q).html() + ""
}
})
`
Now I my "controls" are excluded from the spreadsheet.
Hope that helps someone out.
Sean
The text was updated successfully, but these errors were encountered: