forked from sheetjs/sheetjs
52 lines
1.4 KiB
HTML
52 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<!-- xlsx.js (C) 2013-present SheetJS http://sheetjs.com -->
|
|
<!-- vim: set ts=2: -->
|
|
<html ng-app="app">
|
|
<head>
|
|
<title>SheetJS + VueJS2</title>
|
|
<!-- Vue 2 -->
|
|
<script src="https://unpkg.com/vue@2.x"></script>
|
|
|
|
<!-- FileSaver shim for exporting files -->
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.3/FileSaver.min.js"></script>
|
|
|
|
<!-- SheetJS js-xlsx library -->
|
|
<script src="xlsx.full.min.js"></script>
|
|
|
|
<!-- SheetJS Vue components -->
|
|
<script src="SheetJS-vue.js"></script>
|
|
|
|
<style>
|
|
.grid1 {
|
|
width: 500px;
|
|
height: 400px;
|
|
};
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<pre>
|
|
<b><a href="http://sheetjs.com">SheetJS + VueJS2 demo</a></b>
|
|
|
|
The core library can be used as-is in Vue applications.
|
|
The <a href="https://github.com/sheetjs/js-xlsx">Community Edition README</a> details some common use cases.
|
|
We also have some <a href="http://sheetjs.com/demos/">more public demos</a>
|
|
|
|
This demo shows a sample Vue component "html-preview" that:
|
|
- displays a file input that accepts a spreadsheet file
|
|
- draws the first worksheet of a submitted file as HTML
|
|
- presents an export button to generate XLSX files
|
|
|
|
<a href="https://obamawhitehouse.archives.gov/sites/default/files/omb/budget/fy2014/assets/receipts.xls">Sample Spreadsheet</a>
|
|
</pre>
|
|
|
|
<div id="app">
|
|
<html-preview></html-preview>
|
|
</div>
|
|
|
|
<script lang="javascript">
|
|
var app = new Vue({ el: '#app' });
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|