OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Import Excel file to a table of HTML page

  • Thread starter Thread starter 홍성남
  • Start date Start date

홍성남

Guest
I have a simple Excel file in my computer at "D:/Book1.xls". I want to import it to make a table and append the table to a div tag in my HTML page.

Would you modify my code below?

Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
<style type="text/css">

</style>
<script src='http://alasql.org/console/alasql.min.js'></script>
<script src='http://alasql.org/console/xlsx.core.min.js'></script>
<script src="./libs/jquery-2.1.4.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        alasql('select * into html("#res",{headers:true}) \
                  from xlsx("d:/Book1.xls",\
                            {headers:true})');
        alert("end of function")
    });
</script>
</head>
<body>
    <div id="res">res</div>
</body>
</html>

<p>I have a simple Excel file in my computer at "D:/Book1.xls". I want to import it to make a table and append the table to a <code>div</code> tag in my HTML page. </p>

<p>Would you modify my code below?</p>

<pre><code><!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
<style type="text/css">

</style>
<script src='http://alasql.org/console/alasql.min.js'></script>
<script src='http://alasql.org/console/xlsx.core.min.js'></script>
<script src="./libs/jquery-2.1.4.js"></script>
<script type="text/javascript">
$(document).ready(function() {
alasql('select * into html("#res",{headers:true}) \
from xlsx("d:/Book1.xls",\
{headers:true})');
alert("end of function")
});
</script>
</head>
<body>
<div id="res">res</div>
</body>
</html>
</code></pre>
 
Top