0

How can i show excel value in a html page within a table, and to be interactive, when even i change the value in excel, it will save XML file, and i want the HTML to read the new value from that XML file, and show it in the table.

lets say, i have in excel

table 2 by 2

name, vlad

age, 29

found an example for how to load xml data to html, but its not readig my xml file that created from excel.

<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>

<script>
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
myFunction(this);
}
};
xhttp.open("GET", "db_from_excel.xml", true);
xhttp.send();

function myFunction(xml) {
var xmlDoc = xml.responseXML;
document.getElementById("demo").innerHTML =
xmlDoc.getElementsByTagName("title")[0].childNodes[0].nodeValue;
}
</script>

</body>

I think i found the issue, when i opened the same code in firefox, it displayed all the values from xml. But, not working in chrome.... why is that ?

Community
  • 1
  • 1

0 Answers0