I've been trying to embed a google sheet in my project. The steps looks pretty straightforward. Following the steps from this link. I got the iframe from the sheet publish menu.
<iframe src="https://docs.google.com/spreadsheets/d/e/<docId>/pubhtml?widget=true&headers=false"></iframe>
Then picked the edit url from sheet sharing menu
https://docs.google.com/spreadsheets/d/<documentId>/edit?usp=sharing
Then to create the final iframe by combining the above.
<iframe src="https://docs.google.com/spreadsheets/d/<documentId>/edit?usp=sharing&widget=true&headers=false"></iframe>
This works fine. When i use this iframe in the html for React app.
Issue: When I checked out the console I see 2 errors:
Refused to frame 'https://docs.google.com/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self' https://docs.google.com".
and
Refused to frame 'https://contacts.google.com/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors https://docs.google.com".
I've given all possible permissions for edit to on the shared sheet but still can't figure out how to get around these console errors. These errors make the embedded sheet unreliable and unpredictable.
Any help with this is appreciated. Thanks in advance.