The link to one cell to another cell don't work in iframe

Hello,

I need a table to be in a web page, and it need to be total clickable, my client wants that if someone clicks in a cell that is at the begging of the table , it can be redirect to a cell in another place far away from it.

Inside the google sheets I can make it happen, but in the webpage it doesn’t work, the link just open another sheet in a new window.

Another thing is, I would like that any link that I put in the table would open at the same window.

This is the code I’m using:

<!DOCTYPE html>
<html>
<p><iframe title="table" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vSW38yyodki0VWjMg9pziJB-PJHTdrjIiNMBdQMmbbPesA7dEHMIMaJ0xibsUaaAMQHW2G8y_zCllAF/pubhtml?widget=true&amp;headers=false" width="900" height="900" allow="pointer-lock" zoom: 1.75;
  -moz-transform: scale(1.75);
  -moz-transform-origin: 0 0;
sandbox="allow-forms | allow-modals | 
     allow-orientation-lock | allow-pointer-lock | 
     allow-popups | allow-popups-to-escape-sandbox |
     allow-presentation | allow-same-origin | allow-scripts |
     allow-top-navigation | allow-top-navigation-by-user-activation">
     </iframe>
</p>

<style type="text/css">    
@font-face
{         
font-family: 'Roboto', sans-serif; 
src:url('https://fonts.googleapis.com/css2?family=Roboto:[email protected];400&display=swap');
} 

</style>
</html>

I tried to made it clickable by using this parameters:

sandbox="allow-forms | allow-modals | 
     allow-orientation-lock | allow-pointer-lock | 
     allow-popups | allow-popups-to-escape-sandbox |
     allow-presentation | allow-same-origin | allow-scripts |
     allow-top-navigation | allow-top-navigation-by-user-activation">

Then I tried to make it clickable by making a code in the google sheets app script like this:

function linkCellContents() {
 var range = SpreadsheetApp.getActive().getRange("'+'!L9");
 var richValue = SpreadsheetApp.newRichTextValue()
   .setText("TESTE LINK")
   .setLinkUrl("https://docs.google.com/spreadsheets/d/1Aks5t1b08U4mA_-A1r6Js66tPkI24iQj-fYNNSyH1Ck/edit#rangeid=1955833310")
   .build();
 range.setRichTextValue(richValue);
}

The code in app script made the link work, but the problem is that it goes off site domain and goes to a new window in google sheets domain, that is not so good for me either…

I need a way that the cell is clickable and the link works to navigate between cells and the navigation remain inside the iframe structure in site domain (I’m using Wordpress)

Thank you very much!