Export data collection to XLS excel file using code

@zivassor Ok, i tested your given example (and as expected, nothing happens).
The same behaviour like on my testing free-site). This will be due to the fact, that free-sites have some permissions related to utilising HTML-components (i think).

The example does not work for me sorry. I have the same problem with two other differnent export solutions.

Did you test it? To test it right, you should create a free site (not premium) and test it again.

@russian-dima Hi,
the example above is a free website and as you can see, it is working.
do you click the document icon and then the “export to excel” button?

@zivassor Hello Ziv,

yes at first moment i thought, ohhh maaaaan, i am stupid and did not see the second button. But also after i have done loading first the collection and then using the “export”-button —> absolutely nothing happens.

I can see the results in the log…

But the export does not work for me.

Perhaps anybody else could try to do it on a —> free-site ???

EDIT: Also tested it on 3 different browsers (edge/chrome/brave). All without success. :expressionless:

Can anybody else test Ziv-Assors example?
https://zivassor.wixsite.com/exporttoexcel

You have just to make 2-clicks.

What is your result? Does it work for you ? (Am i the only one, for who the example does not work?) If so, why? Who can give some light into the dark?

Hi guys, I am able to download excel after exporting data to hidden HTML. I want to go further … I need to create excel like below. What changes are needed in HTML code

Basically, I want to have column span in HTML

I am using HTML code shared by @andreas-kviby

@zivassor I deploy your script but its not downloading the file on chrome now due to chrome security update

there is other solution to download the excel file?

Thanks

https://www.wix.com/velo/forum/coding-with-velo/refreshing-data-in-html-for-excel-download

You can also generate an HTML-Component-Version, instead of using NPM.
One of many is shown by → Andreas Kviby

@zivassor Hi,
its stop working due to chorme sandbox security update
there is other way to download to Excel file?

Hello Guys, My code (as provided by @andreas-kviby was working fine and I was able to download excel. It has stopped working now. I can see populated HTML but excel is not getting downloaded. Has Google changed some setting? How to make it work ? Pls help as live site is impacted

@russian-dima still not working
working on your site?

@naimibaby The iframe (html component) solution suppose to work on a premium site, connected to domain, and not on a free site. On free sites the iframes now set in sandbox mode which prevents downloads. This looks like a recent security change on Wix’s side. I’ll try to get more details.

sandbox="allow-same-origin allow-forms allow-popups allow-scripts allow-pointer-lock"

@moran-frumer Thanks Moran, i’ll finish the site and then buy premium and start working on this Excel file

@naimibaby
I have already created about 3 of different VERSIONS of my own which were working 100%, if they are still working, i do not know, did not use them since about 3-4-Month xD.

I will check it soon, and let you know…stay tuned… :wink:
But Ziv-Assor was the master who gave me all the ideas to create my own versions.
Big thanks to Ziv at this point!

I perhaps also should check my last working Version.
Is it still working??? Who knows xDDDDD.

@arthosmaciel or @zivassor

How do you do the first step? (i.e. 81) Install the package: “xlsx”). How do you acquire and install this package?

Also, it seems there is now a “sandbox” related security issue–has anyone determined conclusively if this is not an issue for premium domain-bearing sites?

Hello
I integrated this code which works fine. Thank you
I would like to change the appearance of the excel file: change the color or size of the texts, change the width of the columns …

I did not see how to make or where to place this code (excel.jsw?)

Thanks for your help

Hello guys, need one more help. I am using HTML to export data to excel. However, if some one clicks button twice, data is duplicated in excel. I think HTML needs to be refreshed/reloaded. How to do that?

$w ( “#html1” ). postMessage ( items );

@ arthosmaciel
@zivassor