Has anybody been able to get wix html element to download a csv file?

Google is no longer allowing downloads from sandboxed sites, please is the a workaround?

Thanks for the response, I have had a similar code in my html element that worked before but once it gets to “download_file” function then Google blocks the download, please is there a work around on Google? Also the post is since 2018, Google has blocked the function since last year.

I still have somewhere the old version, which is mentioned in the second post.

I will take a look, if it still works or not.


You are searching for a solution for a long time already, i am right?

My question to you would be, if you are using a PREMIUM or a FREE Wix-Website???

If you are using a FREE-Wix-Website → you won’t be able to download a CSV-FILE.

If you are using a PREMIUM-Wix-Website - → Then you will be able to use an iFrame or a CUSTOM-ELEMENT, to get what you want.

I tested my old version, which communicates with the HTML-iFrame without any problems and also conversts all the requested DATA into CSV on FREE-WEBSITE, but it do not start the download, because the iFrame is restricted on FREE-Wix-Websites without own CONNECTED-DOMAIN and is giving for example some ERRORS like the following…

On my PREMUIM-WEBSITE everything works like a charm and i can export CSV-FILES without any problems, even through an iFrame (HTML-Component)…

The BROWSER-DOWNLOAD-WINDOW, opens automaticaly and i am able to download the created CSV-FILE…

…and open it in Microsoft-Excel…

And here you will be able to find a → CUSTOM-ELEMENT-SOLUTION…

And here also not a bad solution using some NPM-PACKAGES…

As you can see, there are always enough of different ways, of how to solve a problem.

And if i would invest some more time and search a little bit more, i surely would find a 4th and maybe even 5th way, of how to solve your problem.

Thanks for the response, is the code from the 2018 post you used? Why should this restriction be on free sites? Does this use custom code? Are you saying my code in the other post will work only on a Premium site?

All of the shown examples, will work only on a Wix-Premium-Site.
Either the HTML-Component, not the CUSTOM-ELEMENT will work on a FREE-Wix-Site as i know.

I assume these restrictions can only be set by wix…
Additional infos…
Applies extra restrictions to the content in the frame. The value of the attribute can either be empty to apply all restrictions, or space-separated tokens to lift particular restrictions:

  • allow-downloads-without-user-activation Experimental: Allows for downloads to occur without a gesture from the user.

  • allow-downloads: Allows for downloads to occur with a gesture from the user.

  • allow-forms: Allows the resource to submit forms. If this keyword is not used, form submission is blocked.

  • allow-modals: Lets the resource open modal windows .

  • allow-orientation-lock: Lets the resource lock the screen orientation .

  • allow-pointer-lock: Lets the resource use the Pointer Lock API .

  • allow-popups: Allows popups (such as window.open(), target=“_blank”, or showModalDialog()). If this keyword is not used, the popup will silently fail to open.

  • allow-popups-to-escape-sandbox: Lets the sandboxed document open new windows without those windows inheriting the sandboxing. For example, this can safely sandbox an advertisement without forcing the same restrictions upon the page the ad links to.

  • allow-presentation: Lets the resource start a presentation session .

  • allow-same-origin: If this token is not used, the resource is treated as being from a special origin that always fails the same-origin policy (potentially preventing access to data storage/cookies and some JavaScript APIs).

  • allow-scripts: Lets the resource run scripts (but not create popup windows).

  • allow-storage-access-by-user-activation Experimental: Lets the resource request access to the parent’s storage capabilities with the Storage Access API .

  • allow-top-navigation: Lets the resource navigate the top-level browsing context (the one named _top).

  • allow-top-navigation-by-user-activation: Lets the resource navigate the top-level browsing context, but only if initiated by a user gesture.

Are you saying it is likely wix sets “allow-downloads-without-user-activation” or “allow-downloads” to their sandbox once the site is Premium? Aslo my chrome browser did not detect any issues as shown

I can’t give you more detailed informations about this issue, because i am not a member of the Wix-Team.

Fact is, that the HTML-Component is → SANDBOXED and since GOOGLE put restrictions onto the download-process of the iFrame, downloads are not allowed anymore, as long as you do not allow the download inside of the iFrame.

This is how i understood it, or how i imagine it.
Maybe i am also wrong, who knows.

How is it allowed inside the iFrame?


Do you have a Wix-Premium-Site?
If so - - > test it on a PREMIUM-SITE and then do the same on a FREE-site, you will recognize the difference.


And do not forget to like it, if you really liked it! :wink:

That was my favourite…

…Wix since they limit your freedom as a developer when it comes to working with technologies that were not made by them…

This hurts, but partialy it’s true. :expressionless::expressionless::expressionless:

Thanks for your response, I just hope the download will be allowed in the HTML element on the Premium plan as my code is not in the custom element.