Skip to content
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_img: true — not working #44

Open
AliveDD opened this issue Jun 29, 2016 · 17 comments
Open

exclude_img: true — not working #44

AliveDD opened this issue Jun 29, 2016 · 17 comments

Comments

@AliveDD
Copy link

AliveDD commented Jun 29, 2016

i use t2e with this settings:

    $("#restaurant_stat").table2excel({
        exclude: ".noExl",
        name: "SmartReserve",
        filename: xlsFilename,
        fileext: ".xls",
        exclude_img: true,
        exclude_links: true,
        exclude_inputs: true
    });

but image boxes are included:

screen shot 2016-06-29 at 12 14 17

whats wrong?

@AliveDD
Copy link
Author

AliveDD commented Jun 30, 2016

i dont know how it resolve, i make some duct tape
make shadow div, for temp table content

screen shot 2016-06-30 at 15 37 11

@rainabba
Copy link
Owner

If you can provide a jsFiddle example or such, I could check it out. Without seeing your markup, I can't really say what might be happening.

@AliveDD
Copy link
Author

AliveDD commented Jul 4, 2016

im try today

@AliveDD
Copy link
Author

AliveDD commented Jul 4, 2016

JSFIDDLE link

fileext, exclude_img, exclude_links — Not working

screen shot 2016-07-04 at 15 02 46

@AliveDD
Copy link
Author

AliveDD commented Jul 4, 2016

fileext not work, but im rename extension manually to .xls for test

@ubeyou
Copy link

ubeyou commented Aug 15, 2016

try js file from dist instead of src. src does not include the exclude img functionality.

@AliveDD
Copy link
Author

AliveDD commented Aug 15, 2016

dist file dont help us
im edit /demo file, and include input, link, and img
Exporting don't remove this

html:
screen shot 2016-08-15 at 12 40 49

xls:
screen shot 2016-08-15 at 12 41 25

@ubeyou
Copy link

ubeyou commented Aug 15, 2016

Sorry, this is the dist file you need. https://github.com/rainabba/jquery-table2excel/blob/8bbfca41abf4457200bca96134d8b756d3d56837/dist/jquery.table2excel.js

Apparently the latest commit removed the exclude feature.

@AliveDD
Copy link
Author

AliveDD commented Aug 15, 2016

with this .js app totally doesnt work
see link

@ubeyou
Copy link

ubeyou commented Aug 15, 2016

set the extension of the excel to .xls instead of .xlsx should works.

@AliveDD
Copy link
Author

AliveDD commented Aug 15, 2016

with .xlsx we are get error
screen shot 2016-08-15 at 14 17 38

@ezequielprieto
Copy link

I'm using the last dist file and I have changed this lines:

$(o).find("tr").not(e.settings.exclude).each(function (i,o) { tempRows += "<tr>" + $(o).html() + "</tr>"; });

for:
$(o).find("tr").not(e.settings.exclude).each(function (i,o) { if(e.settings.exclude_img){ $(o).find('img').remove(); } if(e.settings.exclude_links){ $(o).find('a').contents().unwrap(); } tempRows += "<tr>" + $(o).html() + "</tr>"; });

That solves the problem with images and links.

@mparini2107
Copy link

It did not work for me :(

@ezequielprieto
Copy link

@mparini2107
Copy link

@ezequielprieto 404 not found

@rdmordido
Copy link

@rainabba - Me too having issue with including/displaying images on my table to an excel.
I am using dist ver 1.1.1. Do you have demos or examples how to do this? Thanks!

@ezequielprieto
Copy link

@mparini2107 sorry for the delay here is a pastebin of the correct file https://pastebin.com/M5EAGTYd

@rdmordido this fix works fine for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants