excellentexport 3.9.3 → 3.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -9
- package/dist/excellentexport.d.ts +45 -45
- package/dist/excellentexport.js +1 -1
- package/dist/format.d.ts +30 -30
- package/dist/utils.d.ts +30 -30
- package/package.json +58 -60
- package/scripts/postinstall.js +3 -0
- package/src/excellentexport.ts +1 -1
- package/New Text Document.txt +0 -0
package/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
[](https://github.com/jmaister/excellentexport/actions/workflows/webpack.yml)
|
|
3
3
|
[](https://www.jsdelivr.com/package/npm/excellentexport)
|
|
4
|
-
[](https://openbase.io/js/excellentexport?utm_source=embedded&utm_medium=badge&utm_campaign=rate-badge)
|
|
5
4
|
[](https://coveralls.io/github/jmaister/excellentexport?branch=master)
|
|
6
5
|
|
|
7
6
|
# ExcellentExport.js
|
|
@@ -21,6 +20,21 @@
|
|
|
21
20
|
|
|
22
21
|
# Revision history:
|
|
23
22
|
|
|
23
|
+
### 3.9.6
|
|
24
|
+
|
|
25
|
+
* Got a license from IntelliJ and helped to fix some things in the code
|
|
26
|
+
* Remove references to openbase.io
|
|
27
|
+
* Fix typos
|
|
28
|
+
* _Update npm dependencies to fix vulnerabilities_
|
|
29
|
+
|
|
30
|
+
### 3.9.5
|
|
31
|
+
|
|
32
|
+
* _Update npm dependencies to fix vulnerabilities_
|
|
33
|
+
|
|
34
|
+
### 3.9.4
|
|
35
|
+
|
|
36
|
+
* _Update npm dependencies to fix vulnerabilities_
|
|
37
|
+
|
|
24
38
|
### 3.9.3
|
|
25
39
|
|
|
26
40
|
* Fix TypeScript exported types
|
|
@@ -114,7 +128,7 @@
|
|
|
114
128
|
### 2.1.0
|
|
115
129
|
|
|
116
130
|
* Add Webpack build.
|
|
117
|
-
* Create UMD JavaScript module. Library can be loaded as a module (import, RequireJS, AMD, etc...) or standalone as window.
|
|
131
|
+
* Create UMD JavaScript module. Library can be loaded as a module (import, RequireJS, AMD, etc...) or standalone as window.ExcellentExport.
|
|
118
132
|
|
|
119
133
|
### 2.0.3
|
|
120
134
|
|
|
@@ -272,8 +286,8 @@ You can specify an array with the formats for a specific cell range (i.e. A1:A10
|
|
|
272
286
|
|
|
273
287
|
Each element in the format array consists on:
|
|
274
288
|
|
|
275
|
-
```
|
|
276
|
-
{
|
|
289
|
+
```typescript
|
|
290
|
+
const sheet01 = {
|
|
277
291
|
"range": "A1:A100", // Range of cells to apply the format, mandatory
|
|
278
292
|
"format": {
|
|
279
293
|
"type": "<cell_type>", // Type of format, mandatory
|
|
@@ -282,15 +296,27 @@ Each element in the format array consists on:
|
|
|
282
296
|
}
|
|
283
297
|
```
|
|
284
298
|
|
|
285
|
-
|
|
299
|
+
Example:
|
|
286
300
|
|
|
287
301
|
```typescript
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
302
|
+
formats: [
|
|
303
|
+
{
|
|
304
|
+
range: "C2:C20",
|
|
305
|
+
format: {
|
|
306
|
+
type: "n",
|
|
307
|
+
pattern: "0.00",
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
range: "C2:C20",
|
|
312
|
+
format: ExcellentExport.formats.NUMBER,
|
|
313
|
+
}
|
|
314
|
+
]
|
|
292
315
|
```
|
|
293
316
|
|
|
317
|
+
`format` can be used from one of the predefined types if you use TypeScript
|
|
318
|
+
|
|
319
|
+
|
|
294
320
|
`cell_type` can be one of the followint:
|
|
295
321
|
|
|
296
322
|
's': String
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ExcellentExport 3.7.2
|
|
3
|
-
* A client side Javascript export to Excel.
|
|
4
|
-
*
|
|
5
|
-
* @author: Jordi Burgos (jordiburgos@gmail.com)
|
|
6
|
-
* @url: https://github.com/jmaister/excellentexport
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
import { CellTypes, FormatDefinition, CellFormats, CellPatterns } from './format';
|
|
10
|
-
declare global {
|
|
11
|
-
interface Navigator {
|
|
12
|
-
msSaveBlob?: (blob: any, defaultName?: string) => boolean;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
export interface ConvertOptions {
|
|
16
|
-
anchor?: (string | HTMLAnchorElement);
|
|
17
|
-
openAsDownload?: boolean;
|
|
18
|
-
format: ('csv' | 'xls' | 'xlsx');
|
|
19
|
-
filename?: string;
|
|
20
|
-
rtl?: boolean;
|
|
21
|
-
}
|
|
22
|
-
export interface FromOptions {
|
|
23
|
-
table?: (string | HTMLTableElement);
|
|
24
|
-
array?: any[][];
|
|
25
|
-
}
|
|
26
|
-
export interface SheetOptions {
|
|
27
|
-
name: string;
|
|
28
|
-
from: FromOptions;
|
|
29
|
-
removeColumns?: number[];
|
|
30
|
-
filterRowFn?(row: any[]): boolean;
|
|
31
|
-
fixValue?(value: any, row: number, column: number): any;
|
|
32
|
-
fixArray?(array: any[][]): any[][];
|
|
33
|
-
rtl?: boolean;
|
|
34
|
-
formats?: (FormatDefinition | null)[];
|
|
35
|
-
}
|
|
36
|
-
declare const ExcellentExport: {
|
|
37
|
-
version: () => string;
|
|
38
|
-
excel: (anchor: (HTMLAnchorElement | string), table: HTMLTableElement, name: string) => boolean;
|
|
39
|
-
csv: (anchor: (HTMLAnchorElement | string), table: HTMLTableElement, delimiter?: string, newLine?: string) => boolean;
|
|
40
|
-
convert: (options: ConvertOptions, sheets: SheetOptions[]) => string | false;
|
|
41
|
-
formats: CellFormats;
|
|
42
|
-
cellTypes: typeof CellTypes;
|
|
43
|
-
cellPatterns: typeof CellPatterns;
|
|
44
|
-
};
|
|
45
|
-
export default ExcellentExport;
|
|
1
|
+
/**
|
|
2
|
+
* ExcellentExport 3.7.2
|
|
3
|
+
* A client side Javascript export to Excel.
|
|
4
|
+
*
|
|
5
|
+
* @author: Jordi Burgos (jordiburgos@gmail.com)
|
|
6
|
+
* @url: https://github.com/jmaister/excellentexport
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
import { CellTypes, FormatDefinition, CellFormats, CellPatterns } from './format';
|
|
10
|
+
declare global {
|
|
11
|
+
interface Navigator {
|
|
12
|
+
msSaveBlob?: (blob: any, defaultName?: string) => boolean;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export interface ConvertOptions {
|
|
16
|
+
anchor?: (string | HTMLAnchorElement);
|
|
17
|
+
openAsDownload?: boolean;
|
|
18
|
+
format: ('csv' | 'xls' | 'xlsx');
|
|
19
|
+
filename?: string;
|
|
20
|
+
rtl?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface FromOptions {
|
|
23
|
+
table?: (string | HTMLTableElement);
|
|
24
|
+
array?: any[][];
|
|
25
|
+
}
|
|
26
|
+
export interface SheetOptions {
|
|
27
|
+
name: string;
|
|
28
|
+
from: FromOptions;
|
|
29
|
+
removeColumns?: number[];
|
|
30
|
+
filterRowFn?(row: any[]): boolean;
|
|
31
|
+
fixValue?(value: any, row: number, column: number): any;
|
|
32
|
+
fixArray?(array: any[][]): any[][];
|
|
33
|
+
rtl?: boolean;
|
|
34
|
+
formats?: (FormatDefinition | null)[];
|
|
35
|
+
}
|
|
36
|
+
declare const ExcellentExport: {
|
|
37
|
+
version: () => string;
|
|
38
|
+
excel: (anchor: (HTMLAnchorElement | string), table: HTMLTableElement, name: string) => boolean;
|
|
39
|
+
csv: (anchor: (HTMLAnchorElement | string), table: HTMLTableElement, delimiter?: string, newLine?: string) => boolean;
|
|
40
|
+
convert: (options: ConvertOptions, sheets: SheetOptions[]) => string | false;
|
|
41
|
+
formats: CellFormats;
|
|
42
|
+
cellTypes: typeof CellTypes;
|
|
43
|
+
cellPatterns: typeof CellPatterns;
|
|
44
|
+
};
|
|
45
|
+
export default ExcellentExport;
|