rainabba / jquery-table2excel

jQuery Plugin to export HTML tabled to Excel Spreadsheet Compatible Files
593 stars 666 forks source link

exclude_img: true — not working #44

Open AliveDD opened 8 years ago

AliveDD commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

im try today

AliveDD commented 8 years ago

JSFIDDLE link

fileext, exclude_img, exclude_links — Not working

screen shot 2016-07-04 at 15 02 46
AliveDD commented 8 years ago

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

ubeyou commented 8 years ago

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

AliveDD commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

with this .js app totally doesnt work see link

ubeyou commented 8 years ago

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

AliveDD commented 8 years ago

with .xlsx we are get error

screen shot 2016-08-15 at 14 17 38
ezequielprieto commented 7 years ago

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 commented 7 years ago

It did not work for me :(

ezequielprieto commented 7 years ago

@mparini2107 you can download my whole file from here: https://raw.githubusercontent.com/ezequielprieto/jquery-table2excel/master/dist/jquery.table2excel.js

mparini2107 commented 7 years ago

@ezequielprieto 404 not found

rdmordido commented 6 years ago

@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 commented 6 years ago

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

@rdmordido this fix works fine for me.