diff --git a/README.md b/README.md
index 5669232..2cf9eb6 100644
--- a/README.md
+++ b/README.md
@@ -668,7 +668,8 @@ Write options are described in the [Writing Options](#writing-options) section.
### Utilities
-Utilities are available in the `XLSX.utils` object:
+Utilities are available in the `XLSX.utils` object and are described in the
+[Utility Functions](#utility-functions) section:
**Importing:**
@@ -683,8 +684,6 @@ Utilities are available in the `XLSX.utils` object:
- `sheet_to_html` generates HTML output.
- `sheet_to_formulae` generates a list of the formulae (with value fallbacks).
-These utilities are described in [Utility Functions](#utility-functions) below.
-
**Cell and cell address manipulation:**
@@ -693,8 +692,6 @@ These utilities are described in [Utility Functions](#utility-functions) below.
- `{en,de}code_cell` converts cell addresses
- `{en,de}code_range` converts cell ranges
-Utilities are described in the [Utility Functions](#utility-functions) section.
-
## Common Spreadsheet Format
js-xlsx conforms to the Common Spreadsheet Format (CSF):
@@ -1610,7 +1607,15 @@ var ws = XLSX.utils.aoa_to_sheet([
### Array of Objects Input
`XLSX.utils.json_to_sheet` takes an array of objects and returns a worksheet
-with automatically-generated "headers" based on the keys of the objects.
+with automatically-generated "headers" based on the keys of the objects. The
+default column order is determined by the first appearance of the field using
+`Object.keys`, but can be overridden using the options argument:
+
+| Option Name | Default | Description |
+| :---------- | :------: | :-------------------------------------------------- |
+| header | | Use specified column order (default `Object.keys`) |
+| dateNF | fmt 14 | Use specified date format in string output |
+| cellDates | false | Store dates as type `d` (default is `n`) |
Examples (click to show)
@@ -1622,7 +1627,7 @@ After replacing the second `e` and `S` with `e_1` and `S_1`:
var ws = XLSX.utils.json_to_sheet([
{S:1,h:2,e:3,e_1:4,t:5,J:6,S_1:7},
{S:2,h:3,e:4,e_1:5,t:6,J:7,S_1:8}
-]);
+], {header:["S","h","e","e_1","t","J","S_1"]});
```
diff --git a/demos/angular/index.html b/demos/angular/index.html
new file mode 100644
index 0000000..07f34cb
--- /dev/null
+++ b/demos/angular/index.html
@@ -0,0 +1,55 @@
+
+
+
+
+
+SheetJS + angular 1 + ui-grid demo
+
+The core library can be used as-is in angular applications.
+The Community Edition README details some common use cases.
+We also have some more public demos
+
+This demo shows:
+- SheetJSExportService: a service for exporting data from a ui-grid
+- SheetJSImportDirective: a directive providing a file input button for import
+
+Sample Spreadsheet
+
+
+
+Advanced Demo Options:
+Use Web Workers: (when available)
+Use Transferrables: (when available)
+Use readAsBinaryString: (when available)
+
+
+
+
+
+
+
diff --git a/docbits/40_interface.md b/docbits/40_interface.md
index bcb649f..81cbfd6 100644
--- a/docbits/40_interface.md
+++ b/docbits/40_interface.md
@@ -29,7 +29,8 @@ Write options are described in the [Writing Options](#writing-options) section.
### Utilities
-Utilities are available in the `XLSX.utils` object:
+Utilities are available in the `XLSX.utils` object and are described in the
+[Utility Functions](#utility-functions) section:
**Importing:**
@@ -44,8 +45,6 @@ Utilities are available in the `XLSX.utils` object:
- `sheet_to_html` generates HTML output.
- `sheet_to_formulae` generates a list of the formulae (with value fallbacks).
-These utilities are described in [Utility Functions](#utility-functions) below.
-
**Cell and cell address manipulation:**
@@ -54,5 +53,3 @@ These utilities are described in [Utility Functions](#utility-functions) below.
- `{en,de}code_cell` converts cell addresses
- `{en,de}code_range` converts cell ranges
-Utilities are described in the [Utility Functions](#utility-functions) section.
-
diff --git a/docbits/82_util.md b/docbits/82_util.md
index d4787ee..83f9a85 100644
--- a/docbits/82_util.md
+++ b/docbits/82_util.md
@@ -45,7 +45,15 @@ var ws = XLSX.utils.aoa_to_sheet([
### Array of Objects Input
`XLSX.utils.json_to_sheet` takes an array of objects and returns a worksheet
-with automatically-generated "headers" based on the keys of the objects.
+with automatically-generated "headers" based on the keys of the objects. The
+default column order is determined by the first appearance of the field using
+`Object.keys`, but can be overridden using the options argument:
+
+| Option Name | Default | Description |
+| :---------- | :------: | :-------------------------------------------------- |
+| header | | Use specified column order (default `Object.keys`) |
+| dateNF | fmt 14 | Use specified date format in string output |
+| cellDates | false | Store dates as type `d` (default is `n`) |
Examples (click to show)
@@ -57,7 +65,7 @@ After replacing the second `e` and `S` with `e_1` and `S_1`:
var ws = XLSX.utils.json_to_sheet([
{S:1,h:2,e:3,e_1:4,t:5,J:6,S_1:7},
{S:2,h:3,e:4,e_1:5,t:6,J:7,S_1:8}
-]);
+], {header:["S","h","e","e_1","t","J","S_1"]});
```
diff --git a/misc/docs/README.md b/misc/docs/README.md
index 9cbca53..a49c1c5 100644
--- a/misc/docs/README.md
+++ b/misc/docs/README.md
@@ -614,7 +614,8 @@ Write options are described in the [Writing Options](#writing-options) section.
### Utilities
-Utilities are available in the `XLSX.utils` object:
+Utilities are available in the `XLSX.utils` object and are described in the
+[Utility Functions](#utility-functions) section:
**Importing:**
@@ -629,8 +630,6 @@ Utilities are available in the `XLSX.utils` object:
- `sheet_to_html` generates HTML output.
- `sheet_to_formulae` generates a list of the formulae (with value fallbacks).
-These utilities are described in [Utility Functions](#utility-functions) below.
-
**Cell and cell address manipulation:**
@@ -639,8 +638,6 @@ These utilities are described in [Utility Functions](#utility-functions) below.
- `{en,de}code_cell` converts cell addresses
- `{en,de}code_range` converts cell ranges
-Utilities are described in the [Utility Functions](#utility-functions) section.
-
## Common Spreadsheet Format
js-xlsx conforms to the Common Spreadsheet Format (CSF):
@@ -1490,7 +1487,15 @@ var ws = XLSX.utils.aoa_to_sheet([
### Array of Objects Input
`XLSX.utils.json_to_sheet` takes an array of objects and returns a worksheet
-with automatically-generated "headers" based on the keys of the objects.
+with automatically-generated "headers" based on the keys of the objects. The
+default column order is determined by the first appearance of the field using
+`Object.keys`, but can be overridden using the options argument:
+
+| Option Name | Default | Description |
+| :---------- | :------: | :-------------------------------------------------- |
+| header | | Use specified column order (default `Object.keys`) |
+| dateNF | fmt 14 | Use specified date format in string output |
+| cellDates | false | Store dates as type `d` (default is `n`) |
The original sheet cannot be reproduced because JS object keys must be unique.
@@ -1500,7 +1505,7 @@ After replacing the second `e` and `S` with `e_1` and `S_1`:
var ws = XLSX.utils.json_to_sheet([
{S:1,h:2,e:3,e_1:4,t:5,J:6,S_1:7},
{S:2,h:3,e:4,e_1:5,t:6,J:7,S_1:8}
-]);
+], {header:["S","h","e","e_1","t","J","S_1"]});
```
### HTML Table Input