Problems using Hype Data Magic with customData

Ref: Example using Hype Data Magic with customData
All great but, there is always a "but", if I view the preview directly from Hype everything works, when I export and view the html it doesn't seem to load anything, could you help me?

Might you be so kind as to share your file. There are numerous ways you can use customData in Hype Data Magic, so it would be prudent to have an example that illustrates the error case.

Of course an tnx in advantage.

I’ll find a way to import data from google sheet in .cvs format or not. :blush:

HYPE GOOGLE DRIVEN.zip (171.1 KB)

Dear Claudio,

I hope you're doing well. I see you've encountered an issue with CORS while using HypeDataMagic to fetch external data from a Google Spreadsheet. Let me explain why this is happening …

When you're trying to fetch data from an external resource (in your case, a Google Spreadsheet), browsers enforce a security measure called Cross-Origin Resource Sharing (CORS). The CORS policy is in place to prevent potentially harmful or unauthorized requests to another domain.

Your error message essentially says that the domain where your Google Spreadsheet resides (https://docs.google.com) doesn't allow the request to come from null origin, which is what happens when you run code from a file:// location on your local system.

Either you have to run it from a server or use local data. The CSV conversion or customData has nothing to-do with it. It all originates from the use of fetch

Hope that helps…

1 Like

if you want to test local without Hype you can use https://simplewebserver.org/ ... it's very ... simple :slight_smile:

Also the preview of Hype is a simple Webserver, but unfortunately you can’t edit the template easily apart from some workarounds.

Maybe I’m missing something. But does not the disable CORS in the developer menu work for you. Sure I do that all the time when using sheets csv.
Not at Mac right now so can’t double check..