89 строки
3.1 KiB
HTML
89 строки
3.1 KiB
HTML
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>Essential JS 1 : XlsIO</title>
|
|
<meta charset="utf-8" />
|
|
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
|
<link href="../content/bootstrap.min.css" rel="stylesheet" />
|
|
<link href="../content/default.css" rel="stylesheet" />
|
|
<link href="../content/default-responsive.css" rel="stylesheet" />
|
|
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" type="text/css" />
|
|
<!--[if lt IE 9]>
|
|
<script src="../scripts/jquery-1.11.3.min.js" type="text/javascript"></script>
|
|
<![endif]-->
|
|
<!--[if gte IE 9]><!-->
|
|
<script src="../scripts/jquery-3.4.1.min.js" type="text/javascript"></script>
|
|
<!--<![endif]-->
|
|
|
|
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
|
|
<script src="../scripts/properties.js" type="text/javascript"></script>
|
|
</head>
|
|
<body>
|
|
<p>
|
|
Formulas are entries in Excel that have an equation that calculates the value to
|
|
be displayed. A typical formula might contain cells, constants, and even functions.
|
|
Essential XlsIO has support for reading and writing formulas.
|
|
</p><br />
|
|
<p>
|
|
Click "Read Formula" button to read formula from the Excel file or "Write Formula" button to view an Excel spreadsheet generated by Essential XlsIO.
|
|
Please note that Microsoft Excel Viewer or Microsoft Excel is required to view the resultant document.
|
|
</p><br />
|
|
<p>
|
|
<b>Read Formula from the template document</b> <br />
|
|
</p>
|
|
<p>
|
|
<label ID="Label1">Computed Value</label>
|
|
|
|
<label class="border" ID="txtFormulaNumber"> </label> <br/>
|
|
<label ID="Label2" >Formula String </label>
|
|
|
|
<label class="border"ID="txtFormula" > </label>
|
|
</p><br />
|
|
<p>
|
|
<button onClick="Submit1()" >Write Formula</button>
|
|
<button onClick="Submit2()" >Read Formula</button>
|
|
</p>
|
|
<br />
|
|
<label><b>
|
|
Note: The document creation/manipulation functionalities are defined within Web API.</b></label>
|
|
<script type="text/javascript">
|
|
function Submit1(){
|
|
var attr = { action:window.baseurl + "api/XlsIO/WriteFormula", method: "post" };
|
|
var form = ej.buildTag("form", "", null, attr);
|
|
$("body").append(form);
|
|
form.submit();
|
|
}
|
|
|
|
function Submit2(){
|
|
$.ajax({
|
|
type: "POST",
|
|
url: window.baseurl + "api/XlsIO/ReadFormula",
|
|
dataType: "json", //Expected data format from server
|
|
processdata: true, //True or False
|
|
success: function (msg) {//On Successfull API call
|
|
var data=msg.split(",");
|
|
$("#txtFormulaNumber")[0].textContent=data[0];
|
|
$("#txtFormula")[0].textContent=data[1];
|
|
},
|
|
});
|
|
}
|
|
|
|
</script>
|
|
<style>
|
|
|
|
label{
|
|
font-weight:normal;
|
|
text-align: left;
|
|
}
|
|
|
|
.border {
|
|
width:100px;
|
|
height:20px;
|
|
border-style: solid;
|
|
border-width: 1px;
|
|
}
|
|
</style>
|
|
|
|
</body>
|
|
</html>
|