├── .gitignore ├── docs ├── demo │ ├── demo.xlsx │ ├── example4.html │ ├── example1.html │ ├── example2.html │ ├── example3.html │ └── common.js ├── img │ ├── sibbell.png │ ├── ExcelPlus.png │ ├── ExcelPlus16x16.png │ ├── ExcelPlus128x128.png │ └── ExcelPlus.svg ├── css │ ├── prettify.css │ ├── default.css │ ├── sunburst.css │ └── bootstrap-responsive.min.css └── js │ ├── bootstrap-dropdown.js │ ├── bootstrap-scrollspy.js │ └── bootstrap-collapse.js ├── 2.0 └── swfobject │ ├── test.swf │ ├── FileToDataURI.swf │ ├── expressInstall.swf │ ├── src │ ├── expressInstall.fla │ └── expressInstall.as │ ├── index_dynamic.html │ ├── index.html │ └── swfobject.js ├── 2.1 └── swfobject │ ├── test.swf │ ├── FileToDataURI.swf │ ├── expressInstall.swf │ ├── src │ ├── expressInstall.fla │ └── expressInstall.as │ ├── index_dynamic.html │ ├── index.html │ └── swfobject.js ├── 2.2 └── swfobject │ ├── test.swf │ ├── FileToDataURI.swf │ ├── expressInstall.swf │ ├── src │ ├── expressInstall.fla │ └── expressInstall.as │ ├── index_dynamic.html │ ├── index.html │ ├── FileToDataURI.mxml │ └── swfobject.js ├── 2.3 └── swfobject │ ├── test.swf │ ├── FileToDataURI.swf │ ├── expressInstall.swf │ ├── src │ ├── expressInstall.fla │ └── expressInstall.as │ ├── index_dynamic.html │ ├── index.html │ ├── FileToDataURI.mxml │ └── swfobject.js ├── 2.4 └── swfobject │ ├── test.swf │ ├── FileToDataURI.swf │ ├── expressInstall.swf │ ├── src │ ├── expressInstall.fla │ └── expressInstall.as │ ├── index_dynamic.html │ ├── index.html │ ├── FileToDataURI.mxml │ └── swfobject.js ├── 2.5 └── swfobject │ ├── test.swf │ ├── FileToDataURI.swf │ ├── expressInstall.swf │ ├── src │ ├── expressInstall.fla │ └── expressInstall.as │ ├── index_dynamic.html │ ├── index.html │ └── FileToDataURI.mxml ├── 2.4.1 └── swfobject │ ├── test.swf │ ├── FileToDataURI.swf │ ├── expressInstall.swf │ ├── src │ ├── expressInstall.fla │ └── expressInstall.as │ ├── index_dynamic.html │ ├── index.html │ └── FileToDataURI.mxml ├── jsdoc_template ├── static │ ├── demo │ │ ├── demo.xlsx │ │ ├── example4.html │ │ ├── example2.html │ │ ├── example1.html │ │ ├── example3.html │ │ └── common.js │ ├── img │ │ ├── sibbell.png │ │ ├── ExcelPlus.png │ │ ├── ExcelPlus16x16.png │ │ ├── ExcelPlus128x128.png │ │ └── ExcelPlus.svg │ ├── css │ │ ├── prettify.css │ │ ├── default.css │ │ ├── sunburst.css │ │ └── bootstrap-responsive.min.css │ └── js │ │ ├── bootstrap-dropdown.js │ │ ├── bootstrap-scrollspy.js │ │ └── bootstrap-collapse.js ├── README.md └── tmpl │ ├── container.tmpl │ ├── layout.tmpl │ └── mainpage.tmpl ├── README.md └── changelog.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /docs/demo/demo.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/docs/demo/demo.xlsx -------------------------------------------------------------------------------- /docs/img/sibbell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/docs/img/sibbell.png -------------------------------------------------------------------------------- /2.0/swfobject/test.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.0/swfobject/test.swf -------------------------------------------------------------------------------- /2.1/swfobject/test.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.1/swfobject/test.swf -------------------------------------------------------------------------------- /2.2/swfobject/test.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.2/swfobject/test.swf -------------------------------------------------------------------------------- /2.3/swfobject/test.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.3/swfobject/test.swf -------------------------------------------------------------------------------- /2.4/swfobject/test.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.4/swfobject/test.swf -------------------------------------------------------------------------------- /2.5/swfobject/test.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.5/swfobject/test.swf -------------------------------------------------------------------------------- /docs/img/ExcelPlus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/docs/img/ExcelPlus.png -------------------------------------------------------------------------------- /2.4.1/swfobject/test.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.4.1/swfobject/test.swf -------------------------------------------------------------------------------- /docs/img/ExcelPlus16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/docs/img/ExcelPlus16x16.png -------------------------------------------------------------------------------- /docs/img/ExcelPlus128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/docs/img/ExcelPlus128x128.png -------------------------------------------------------------------------------- /2.0/swfobject/FileToDataURI.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.0/swfobject/FileToDataURI.swf -------------------------------------------------------------------------------- /2.0/swfobject/expressInstall.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.0/swfobject/expressInstall.swf -------------------------------------------------------------------------------- /2.1/swfobject/FileToDataURI.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.1/swfobject/FileToDataURI.swf -------------------------------------------------------------------------------- /2.1/swfobject/expressInstall.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.1/swfobject/expressInstall.swf -------------------------------------------------------------------------------- /2.2/swfobject/FileToDataURI.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.2/swfobject/FileToDataURI.swf -------------------------------------------------------------------------------- /2.2/swfobject/expressInstall.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.2/swfobject/expressInstall.swf -------------------------------------------------------------------------------- /2.3/swfobject/FileToDataURI.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.3/swfobject/FileToDataURI.swf -------------------------------------------------------------------------------- /2.3/swfobject/expressInstall.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.3/swfobject/expressInstall.swf -------------------------------------------------------------------------------- /2.4.1/swfobject/FileToDataURI.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.4.1/swfobject/FileToDataURI.swf -------------------------------------------------------------------------------- /2.4/swfobject/FileToDataURI.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.4/swfobject/FileToDataURI.swf -------------------------------------------------------------------------------- /2.4/swfobject/expressInstall.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.4/swfobject/expressInstall.swf -------------------------------------------------------------------------------- /2.5/swfobject/FileToDataURI.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.5/swfobject/FileToDataURI.swf -------------------------------------------------------------------------------- /2.5/swfobject/expressInstall.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.5/swfobject/expressInstall.swf -------------------------------------------------------------------------------- /2.4.1/swfobject/expressInstall.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.4.1/swfobject/expressInstall.swf -------------------------------------------------------------------------------- /2.0/swfobject/src/expressInstall.fla: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.0/swfobject/src/expressInstall.fla -------------------------------------------------------------------------------- /2.1/swfobject/src/expressInstall.fla: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.1/swfobject/src/expressInstall.fla -------------------------------------------------------------------------------- /2.2/swfobject/src/expressInstall.fla: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.2/swfobject/src/expressInstall.fla -------------------------------------------------------------------------------- /2.3/swfobject/src/expressInstall.fla: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.3/swfobject/src/expressInstall.fla -------------------------------------------------------------------------------- /2.4.1/swfobject/src/expressInstall.fla: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.4.1/swfobject/src/expressInstall.fla -------------------------------------------------------------------------------- /2.4/swfobject/src/expressInstall.fla: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.4/swfobject/src/expressInstall.fla -------------------------------------------------------------------------------- /2.5/swfobject/src/expressInstall.fla: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/2.5/swfobject/src/expressInstall.fla -------------------------------------------------------------------------------- /jsdoc_template/static/demo/demo.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/jsdoc_template/static/demo/demo.xlsx -------------------------------------------------------------------------------- /jsdoc_template/static/img/sibbell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/jsdoc_template/static/img/sibbell.png -------------------------------------------------------------------------------- /jsdoc_template/static/img/ExcelPlus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/jsdoc_template/static/img/ExcelPlus.png -------------------------------------------------------------------------------- /jsdoc_template/static/img/ExcelPlus16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/jsdoc_template/static/img/ExcelPlus16x16.png -------------------------------------------------------------------------------- /jsdoc_template/static/img/ExcelPlus128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aymkdn/ExcelPlus/HEAD/jsdoc_template/static/img/ExcelPlus128x128.png -------------------------------------------------------------------------------- /jsdoc_template/README.md: -------------------------------------------------------------------------------- 1 | Template for SharepointPlus 2 | 3 | # Generating the doc 4 | 5 | 1. Install `jsdoc`: `npm install jsdoc` 6 | 2. Use the template from this folder: `node "node_modules\jsdoc\jsdoc.js" sharepointplus-x.x.js -t jsdoc_template/ -d docs` -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ExcelPlus 2 | ========= 3 | 4 | This project is just an interface for https://github.com/SheetJS/js-xlsx/ 5 | 6 | ExcelPlus is **DEPRECATED** and better solutions exist: 7 | - https://github.com/guyonroche/exceljs 8 | - https://github.com/dtjohnson/xlsx-populate 9 | - https://github.com/protobi/js-xlsx (a fork of the original js-xlsx) 10 | - and more... 11 | -------------------------------------------------------------------------------- /docs/css/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} -------------------------------------------------------------------------------- /jsdoc_template/static/css/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} -------------------------------------------------------------------------------- /2.0/swfobject/index_dynamic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |For old browsers (IE8 and others), make sure to be in standard mode with <meta http-equiv="X-UA-Compatible" content="IE=EDGE"> and with a DOCTYPE.
Reading the file demo.xlsx:
17 | 18 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /jsdoc_template/static/demo/example4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 12 | 13 | 14 | 15 |For old browsers (IE8 and others), make sure to be in standard mode with <meta http-equiv="X-UA-Compatible" content="IE=EDGE"> and with a DOCTYPE.
Reading the file demo.xlsx:
17 | 18 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /docs/demo/example1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 12 | 13 | 14 | 15 | For old browsers (IE8 and others), make sure to be in standard mode with<meta http-equiv="X-UA-Compatible" content="IE=EDGE"> and with a DOCTYPE.
16 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/docs/demo/example2.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
12 |
13 |
14 |
15 | For old browsers (IE8 and others), make sure to be in standard mode with <meta http-equiv="X-UA-Compatible" content="IE=EDGE"> and with a DOCTYPE.
16 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/jsdoc_template/static/demo/example2.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
12 |
13 |
14 |
15 | For old browsers (IE8 and others), make sure to be in standard mode with <meta http-equiv="X-UA-Compatible" content="IE=EDGE"> and with a DOCTYPE.
16 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/jsdoc_template/static/demo/example1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
12 |
13 |
14 |
15 | For old browsers (IE8 and others), make sure to be in standard mode with <meta http-equiv="X-UA-Compatible" content="IE=EDGE"> and with a DOCTYPE.
16 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/changelog.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | **Change Log v2.5 (April 14, 2017)**
4 |
5 | - Add compatibility with the last js-xlsx releases (see https://github.com/Aymkdn/ExcelPlus/issues/8)
6 | - Add option `propertiesOnly` for `read`
7 | - Add option `compression` for `saveAs`
8 | - Add function `open()` (see https://github.com/Aymkdn/ExcelPlus/issues/13)
9 | - Fix Angular compatibility issue (see https://github.com/Aymkdn/ExcelPlus/issues/14)
10 | - Change `parseDate` option for `read` (see documentation)
11 | - Change demo pages to always get the latest release of js-xlsx
12 | - Change license to Apache v2
13 |
14 | **Change Log v2.4.1 (June 21, 2016)**
15 |
16 | - Better handle of cells with a Date
17 |
18 | **Change Log v2.4 (June 14, 2016)**
19 |
20 | - Add `writeRow()` and `writeNextRow()`
21 | - Show `write()` into the documentation
22 |
23 | **Change Log v2.3 (January 15, 2016)**
24 |
25 | - Fix `writeCell()` when the content was an empty string
26 | - Fix documentation
27 | - IE10/11 compatibility
28 | - Stop using readAsBinaryString to use readAsArrayBuffer
29 | - Fix button size when using Flash
30 | - Fix: with IE and Flash object, the Excel was returning column A as null
31 | - Add same options for both readAll() and read()
32 | - SheetJS/JS-XLSX 0.8.0 doesn't handle correctly the cell format, so I've changed the file (see https://github.com/SheetJS/js-xlsx/pull/349)
33 | - SheetJS/JS-XLSX 0.8.0 and IE8 didn't return the first column of a file, so I've fixed it (see https://github.com/SheetJS/js-xlsx/issues/350)
34 | - Fix for the read()/readAll() when `parseDate` is true, it should now recognize a date cell
35 | - Add options `parameters` as a boolean for read()/readAll()
36 |
37 | **Change Log v2.2 (December 23, 2014)**
38 |
39 | - Rewrite everything to use the XLSX-JS library
40 | - Official release
41 |
--------------------------------------------------------------------------------
/docs/demo/example3.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
12 |
13 |
14 |
15 | For old browsers (IE8 and others), make sure to be in standard mode with <meta http-equiv="X-UA-Compatible" content="IE=EDGE"> and with a DOCTYPE.
Please select an Excel file from your computer:
17 |For old browsers (IE8 and others), make sure to be in standard mode with <meta http-equiv="X-UA-Compatible" content="IE=EDGE"> and with a DOCTYPE.
Please select an Excel file from your computer:
17 |'+example.code.replace(/^ {6}/gm,"")+''
72 | })
73 | ?>
74 |
75 |
76 | ExcelPlus (EP) is a JavaScript API/interface to deal with Excel using the js-xlsx library from SheetJS. The SheetJS library is powerful but difficult to use, so I've created ExcelPlus to interface with it.
15 |I've developed this interface for my needs during my job at Dell and we thought it could be useful for the community too, so here it is !
16 |Because ExcelPlus is an interface for js-xlsx then you'll need it.
20 |Just add two lines to call the necessary files:
21 |<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/CHOOSE_A_VERSION/xlsx.core.min.js"></script> 22 | <script type="text/javascript" src="excelplus-.min.js"></script>23 |
Below are two examples about how to write/create an Excel file:
26 |
27 | // --- EXAMPLE 1 ---
28 | // in this example we want to build an Excel file with one sheet and write some stuff
29 | var ep=new ExcelPlus();
30 | // We're going to do several tasks in one line of code:
31 | // 1) create an Excel with one sheet called "Book1"
32 | // 2) write some data from an array to the new-created sheet
33 | // 3) create a new sheet called "Book2"
34 | // 4) write "A1" in cell "A1" of the new-created sheet
35 | // 5) write the today date in D1 of the "Book1" sheet
36 | // 6) save it on the user computer (this last step only works with IE10+ and modern browsers)
37 | ep.createFile("Book1")
38 | .write({ "content":[ ["A1","B1","C1"] ] })
39 | .createSheet("Book2")
40 | .write({ "cell":"A1", "content":"A1" })
41 | .write({ "sheet":"Book1", "cell":"D1", "content":new Date() })
42 | .saveAs("demo.xlsx");
43 |
44 | → See in action this example 1
45 |
46 | // --- EXAMPLE 2 ---
47 | // in this other example we want to build an Excel file with several sheets and write some stuff
48 | var ep=new ExcelPlus();
49 | // We're going to do several tasks in one line of code:
50 | // 1) create an Excel with three sheets called "Book1", "Book2" and "Book3"
51 | // 2) write some data from an array to the "Book1"
52 | // 3) write "A1" in cell "A1" of "Book2"
53 | // 3) delete "Book3"
54 | // 4) select "Book2"
55 | // 5) write the today date in A2 of the "Book2" sheet
56 | ep.createFile([ "Book1", "Book2", "Book3" ])
57 | .write({ "sheet":"Book1", "content":[ ["A1","B1","C1"] ] })
58 | .write({ "sheet":"Book2", "cell":"A1", "content":"A1" })
59 | .deleteSheet("Book3")
60 | .selectSheet("Book2")
61 | .write({ "cell":"A2", "content":new Date() });
62 |
63 | → See in action this example 2
64 |Below are some examples about how to read an Excel file:
66 |
67 | // --- EXAMPLE 3 ---
68 | // in this example we want to read a local (= on the user's computer) Excel file
69 | // to do so we need to add `<object id="file-object"></object>` into our HTML where a button to upload the file will appear
70 | // then we can call our JavaScript
71 | var ep=new ExcelPlus();
72 | // we call openLocal() and when the file is loaded then we want to display its content
73 | // openLocal() will use the FileAPI if exists, otherwise it will use a Flash object
74 | ep.openLocal({
75 | "flashPath":"/js/excelplus/2.4/swfobject/",
76 | "labelButton":"Open an Excel file"
77 | },function() {
78 | // show the content of the first sheet
79 | console.table(ep.selectSheet(1).readAll())
80 | })
81 |
82 | → See in action this example 3
83 |
84 | // --- EXAMPLE 4 ---
85 | // in this other example we want to read a remote (= on a server) Excel file
86 | // to do so we need to make sure the server accepts the remote requests (it's the case for the same domain)
87 | var ep=new ExcelPlus();
88 | // we call openRemote()
89 | ep.openRemote("http://my.server.com/path/file.xlsx", function(passed) {
90 | if (!passed) alert("Error: impossible to load the remote file");
91 | else alert(ep.selectSheet(1).readAll()) // show the content of the first sheet
92 | })
93 |
94 | → See in action this example 4
95 |
96 | // a combo because we create an Excel file and we read it
97 | var ep=new ExcelPlus();
98 | ep.createFile().write({cell:"A1", content:"A1"}).writeCell("B1","B1").write({cell:"A2",content:"A2"});
99 | console.table(ep.read("A1:B3"));
100 |
101 | If you use Sharepoint you can use ExcelPlus with my other library called SharepointPlus. With these both libraries you can save your Excel file to Sharepoint:
103 |
104 | // Create an Excel file and save it to Sharepoint
105 | var ep=new ExcelPlus();
106 | ep.createFile("Book1").write({ "content":[ ["A1","B1","C1"] ] });
107 | $SP().list("Documents Library", "http://my.sharepoint.com/path/").createFile({
108 | "content": ep.saveTo(),
109 | "encoded": true,
110 | "filename": "myfile.xlsx",
111 | after:function(fileURL) {
112 | // and you can send it to the user calling the below line :
113 | window.location.href=fileURL;
114 | }
115 | });
116 |
117 |