file-formats-javascript-ej1.../xlsio/CreateSpreadsheet.html

86 строки
3.3 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>
Essential XlsIO has support for creating richly formatted spreadsheets
from scratch, without any dependence on Excel. Advanced features, like data validation,
conditional formatting, and charts, can also be used in this approach. This sample
demonstrates the creation of a simple, multi-sheet workbook. Formats like XLS,
XLSX, CSV, Excel Template, Excel Macro Enabled Template
are supported and demonstrated here.
</p>
<br />
<p>
Excel document is widley used to manipulate and visualize data that enables data analytics in ease.
Essential XlsIO supports to create an Excel document without any dependancy of Microsoft Excel in few lines of code.
This sample demonstrates the creation of a simple spreadsheet.
</p>
<br />
<p>
Click the 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>
<p>
<input type="radio" name="ExcelVersion" value="XLS" checked />XLS
&nbsp;&nbsp;&nbsp;
<input type="radio" name="ExcelVersion" value="XLSX" />XLSX
&nbsp;&nbsp;&nbsp;
<input type="radio" name="ExcelVersion" value="CSV" />CSV
&nbsp;&nbsp;&nbsp;
<input type="radio" name="ExcelVersion" value="XLTX" />XLTX
&nbsp;&nbsp;&nbsp;
<input type="radio" name="ExcelVersion" value="XLTM" />XLTM
&nbsp;&nbsp;&nbsp;
</p>
<br>
<p>
<button onClick="formSubmit()" >Create Document</button>
</p>
<br />
<label>
Note: The document creation/manipulation functionalities are defined within Web API.</label>
<script type="text/javascript">
function formSubmit(){
var fileVersion = document.querySelector('input[name = "ExcelVersion"]:checked').value;
var attr = { action:window.baseurl + "api/XlsIO/CreateDocument", method: "post" };
var form = ej.buildTag("form", "", null, attr);
inputAttr = { name: "SaveType", type: "hidden", value: fileVersion };
input = ej.buildTag("input", "", null, inputAttr);
form.append(input);
$("body").append(form);
form.submit();
}
</script>
<style>
table {
border-spacing: 10px;
border-collapse: separate;
}
input[type="radio"]{
margin-right:3px;
}
</style>
</body>
</html>