Skip to content

Commit dce076b

Browse files
committed
add(pptxjs): support XLSX file preview
1 parent c26228e commit dce076b

464 files changed

Lines changed: 50592 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

exceljs/.babelrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"presets": [
3+
"@babel/preset-env"
4+
]
5+
}

exceljs/.browserslistrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
> 0.25%
2+
not dead

exceljs/.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
build
2+
dist
3+
out
4+
spec/manual/public/

exceljs/.eslintrc

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"parserOptions": {
3+
"sourceType": "script"
4+
},
5+
"extends": [
6+
"airbnb-base",
7+
"prettier",
8+
"plugin:node/recommended"
9+
],
10+
"env": {
11+
"es6": true,
12+
"mocha": true,
13+
"node": true
14+
},
15+
"rules": {
16+
"arrow-parens": ["error", "as-needed"],
17+
"class-methods-use-this": ["off"],
18+
"comma-dangle": ["error", {"arrays": "always-multiline", "objects": "always-multiline", "imports": "always-multiline", "exports": "always-multiline", "functions": "never"}],
19+
"default-case": ["off"],
20+
"func-names": ["off", "never"],
21+
"global-require": ["off"],
22+
"max-len": ["error", {"code": 120, "ignoreComments": true, "ignoreStrings": true}],
23+
"no-console": ["error", { "allow": ["warn"] }],
24+
"no-continue": ["off"],
25+
"no-mixed-operators": ["error", {"allowSamePrecedence": true}],
26+
"no-multi-assign": ["off"],
27+
"no-param-reassign": ["off"],
28+
"no-path-concat": ["off"],
29+
"no-plusplus": ["off"],
30+
"no-prototype-builtins": ["off"],
31+
"no-restricted-syntax": ["error", "ForInStatement", "LabeledStatement", "WithStatement"],
32+
"no-return-assign": ["off"],
33+
"no-trailing-spaces": ["error", { "skipBlankLines": true }],
34+
"no-underscore-dangle": ["off", { "allowAfterThis": true, "allowAfterSuper": true }],
35+
"no-unused-vars": ["error", {"vars": "all", "args": "none", "ignoreRestSiblings": true}],
36+
"no-use-before-define": ["error", { "variables": false, "classes": false, "functions": false }],
37+
"node/no-unsupported-features/es-syntax": ["error", {"version": ">=10.0.0","ignores": []}],
38+
"node/process-exit-as-throw": ["off"],
39+
"object-curly-spacing": ["error", "never"],
40+
"object-property-newline": ["off", { "allowMultiplePropertiesPerLine": true }],
41+
"prefer-destructuring": ["warn", {"array": false, "object": true}],
42+
"prefer-object-spread": ["off"],
43+
"prefer-rest-params": ["off"],
44+
"quotes": ["error", "single"],
45+
"semi": ["error", "always"],
46+
"space-before-function-paren": ["error", {"anonymous": "never", "named": "never", "asyncArrow": "always"}],
47+
"strict": ["off"]
48+
}
49+
}

exceljs/.gitignore

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Logs
2+
logs
3+
*.log
4+
5+
# Runtime data
6+
pids
7+
*.pid
8+
*.seed
9+
10+
# Generated files
11+
dist/*
12+
build/*
13+
14+
# Test Output Folder
15+
out/*
16+
spec/out/*
17+
18+
# Tmp folder
19+
tmp/*
20+
21+
# WebStorm
22+
.idea
23+
24+
# VS Code
25+
.vscode
26+
27+
# Intellij IDEA
28+
exceljs.iml
29+
30+
# Directory for instrumented libs generated by jscoverage/JSCover
31+
lib-cov
32+
33+
# Coverage directory used by tools like istanbul
34+
coverage
35+
36+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
37+
.grunt
38+
39+
# node-waf configuration
40+
.lock-wscript
41+
42+
# Compiled binary addons (http://nodejs.org/api/addons.html)
43+
build/Release
44+
45+
# Dependency directory
46+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
47+
node_modules
48+
49+
# gold internals
50+
spec/integration/data/gold
51+
52+
# bundle files
53+
/spec/manual/public/exceljs.js
54+
/spec/manual/public/exceljs.min.js
55+
56+
package-lock.json
57+
58+
# optional switch off tests
59+
.disable-test-*
60+
61+
# jasmine
62+
_SpecRunner.html
63+
64+
# Mac files
65+
.DS_Store
66+
67+
# Ignore xlsx files generated during testing
68+
*.xlsx
69+
enpm-lock.yaml

exceljs/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

exceljs/.prettier

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"bracketSpacing": false,
3+
"printWidth": 100,
4+
"trailingComma": "all",
5+
"bracketSpacing": false,
6+
"arrowParens": "avoid"
7+
}

exceljs/.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
build
2+
dist
3+
out
4+
spec/manual/public/

exceljs/LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2014-2019 Guyon Roche
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

exceljs/MODEL.md

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# Workbook Model
2+
3+
The workbook and its components define a simple JavaScript Object model which can be accessed and manipulated if desired.
4+
5+
## Workbook Model
6+
7+
```javascript
8+
{
9+
worksheets: [
10+
// array of worksheet models
11+
]
12+
}
13+
```
14+
15+
## Worksheet Model
16+
17+
```javascript
18+
{
19+
// worksheet id (integer>=1)
20+
id: 1,
21+
22+
// worksheet name
23+
name: "blort",
24+
25+
// rows
26+
rows: [
27+
// array of row models
28+
],
29+
30+
// merge ranges
31+
"merges": [
32+
"A2:B3"
33+
],
34+
"dimensions": {
35+
"top": 1,
36+
"left": 1,
37+
"bottom": 3,
38+
"right": 6
39+
},
40+
41+
// setting for enable fit to page (default: false)
42+
fitToPage: false,
43+
44+
// setting for page
45+
pageSetup: {
46+
paperSize: 9,
47+
scale: 100,
48+
firstPageNumber: 0,
49+
fitToWidth: 1,
50+
fitToHeight: 1,
51+
pageOrder: "downThenOver",
52+
orientation: "portrait", // (portrait | landscape)
53+
usePrinterDefaults: "false",
54+
blackAndWhite: "false",
55+
draft: "false",
56+
cellComments: "none",
57+
useFirstPageNumber: "false",
58+
horizontalDpi: 300,
59+
verticalDpi: 300,
60+
copies: 1
61+
},
62+
63+
// setting for margins
64+
pageMargins: {
65+
left: 0.7,
66+
right:0.7,
67+
top: 0.75,
68+
bottom: 0.75,
69+
header: 0.3,
70+
footer: 0.3
71+
}
72+
}
73+
```
74+
75+
## Row Model
76+
77+
```javascript
78+
{
79+
// row number
80+
number: 1,
81+
cells: [
82+
// array of cell models
83+
],
84+
85+
// min column number
86+
min: 1,
87+
88+
// maximum column number
89+
max: 6
90+
}
91+
```
92+
93+
## Cell Models
94+
95+
### Null Cell Model
96+
97+
```javascript
98+
{
99+
address: "A1",
100+
type: 0
101+
}
102+
```
103+
104+
### Merge Cell Model
105+
106+
```javascript
107+
{
108+
address: "B1",
109+
type: 1,
110+
master: "A1"
111+
}
112+
```
113+
114+
### Number Cell Model
115+
116+
```javascript
117+
{
118+
address: "B1",
119+
type: 2,
120+
value: 5
121+
}
122+
```
123+
124+
### String Cell Model
125+
126+
```javascript
127+
{
128+
address: "B1",
129+
type: 2,
130+
value: "Hello, World!"
131+
}
132+
```
133+
134+
### Date Cell Model
135+
136+
```javascript
137+
{
138+
address: "C1",
139+
type: 3,
140+
value: new Date()
141+
}
142+
```
143+
144+
### Formula Cell Model
145+
146+
```javascript
147+
{
148+
address: "D1",
149+
type: 4,
150+
formula: "A1+A2",
151+
result: 7
152+
}
153+
```
154+
155+
### Hyperlink Cell Model
156+
157+
```javascript
158+
{
159+
"address": "F1",
160+
"type": 5,
161+
"text": "www.link.com",
162+
"hyperlink": "http://www.link.com"
163+
}
164+
```

0 commit comments

Comments
 (0)