Download as Zip which contains the Excel - excelHtml5
Download as Zip which contains the Excel - excelHtml5
samirgj
Posts: 7Questions: 2Answers: 0
I use excelHtml5 to download the table but when is too big i need to download as a zip, how could do this?
This question has accepted answers - jump to:
This discussion has been closed.
Answers
It is already a zip . That's how the xlsx file format works - its a bunch of xml files zipped together. Rename an xlsx file from .xlsx to .zip and unzip it to see the source.
Allan
Hi Allan:
Thanks for the answer, I already changed the extension, but what i need is that the object, which is exported, will a zip and inside of this zip have the xlsx object.
How could i do this?
Thanks again for the help.
I don't see why you would do that? The xlsx is a zip. You would just be zipping another zip file.
If you did want to do that you would need to modify this section of the code to wrap the current zip in another zip. But as I say, I don't see any benefit in that.
Allan
Hi allan:
I understand what you say, but the file which will be export, sometimes be very large and when i try to zip a xlsx, it will reduce.
For that reason i will try to do this:
Finally, when i put the filter of each columns at header using:
Almost every columns work fine but don't do it for the fixed columns.
Thanks a lot again, i will try the first and tell you if everything work fine.
I'm trying to do this
But, still downloading a xlsx and not a zip as i want.
_saveAs
is downloading the file in your firstthen
. You need to have JSZip return a blob which you can then zip again.Allan
Thanks allan, it works fine.
Finally, could you help me with the filters at headers that i mentioned in this question or maybe it is better to do a new question?
Thanks again.
Try using
fixedColumns().update()
immediately after you add your event listeners in the header.Allan