@justybase/spreadsheet-tasks 1.3.3 → 2.0.0
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/CHANGELOG.md +38 -0
- package/README.md +25 -16
- package/browser/browser-spreadsheet.js +3037 -0
- package/browser/justybase-spreadsheet.min.js +36 -0
- package/dist/cjs/index.d.ts +399 -0
- package/dist/cjs/index.js +3944 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/esm/index.js +3889 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +1 -0
- package/docs/API.md +8 -9
- package/docs/PACKAGING.md +32 -0
- package/docs/PUBLISHING.md +8 -1
- package/examples/basic-read.ts +1 -1
- package/examples/formats-verify.ts +1 -2
- package/examples/large-dataset.ts +1 -1
- package/package.json +28 -13
- package/dist/BiffReaderWriter.d.ts +0 -44
- package/dist/BiffReaderWriter.d.ts.map +0 -1
- package/dist/BiffReaderWriter.js +0 -282
- package/dist/BiffReaderWriter.js.map +0 -1
- package/dist/BigBuffer.d.ts +0 -24
- package/dist/BigBuffer.d.ts.map +0 -1
- package/dist/BigBuffer.js +0 -120
- package/dist/BigBuffer.js.map +0 -1
- package/dist/ExcelReaderAbstract.d.ts +0 -17
- package/dist/ExcelReaderAbstract.d.ts.map +0 -1
- package/dist/ExcelReaderAbstract.js +0 -25
- package/dist/ExcelReaderAbstract.js.map +0 -1
- package/dist/Formats.d.ts +0 -34
- package/dist/Formats.d.ts.map +0 -1
- package/dist/Formats.js +0 -48
- package/dist/Formats.js.map +0 -1
- package/dist/ReaderFactory.d.ts +0 -6
- package/dist/ReaderFactory.d.ts.map +0 -1
- package/dist/ReaderFactory.js +0 -56
- package/dist/ReaderFactory.js.map +0 -1
- package/dist/XlsbReader.d.ts +0 -24
- package/dist/XlsbReader.d.ts.map +0 -1
- package/dist/XlsbReader.js +0 -186
- package/dist/XlsbReader.js.map +0 -1
- package/dist/XlsbWriter.d.ts +0 -80
- package/dist/XlsbWriter.d.ts.map +0 -1
- package/dist/XlsbWriter.js +0 -964
- package/dist/XlsbWriter.js.map +0 -1
- package/dist/XlsxReader.d.ts +0 -30
- package/dist/XlsxReader.d.ts.map +0 -1
- package/dist/XlsxReader.js +0 -341
- package/dist/XlsxReader.js.map +0 -1
- package/dist/XlsxWriter.d.ts +0 -51
- package/dist/XlsxWriter.d.ts.map +0 -1
- package/dist/XlsxWriter.js +0 -632
- package/dist/XlsxWriter.js.map +0 -1
- package/dist/index.d.ts +0 -10
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -29
- package/dist/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,30 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justybase/spreadsheet-tasks",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "High-performance TypeScript library for reading and writing Excel files in XLSB and XLSX formats. XLSB is 3.3x faster to write and 2.1x faster to read than XLSX.",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"
|
|
5
|
+
"main": "./dist/cjs/index.js",
|
|
6
|
+
"module": "./dist/esm/index.js",
|
|
7
|
+
"types": "./dist/cjs/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/cjs/index.d.ts",
|
|
11
|
+
"import": "./dist/esm/index.js",
|
|
12
|
+
"require": "./dist/cjs/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
7
15
|
"files": [
|
|
8
16
|
"dist",
|
|
17
|
+
"browser/justybase-spreadsheet.min.js",
|
|
18
|
+
"browser/browser-spreadsheet.js",
|
|
9
19
|
"README.md",
|
|
20
|
+
"CHANGELOG.md",
|
|
10
21
|
"LICENSE",
|
|
11
22
|
"docs",
|
|
12
23
|
"examples"
|
|
13
24
|
],
|
|
14
25
|
"scripts": {
|
|
15
|
-
"build": "
|
|
26
|
+
"build": "tsup && node -e \"require('fs').copyFileSync('dist-esm-package.json','dist/esm/package.json')\"",
|
|
27
|
+
"build:browser": "esbuild src/browser/download.ts --bundle --minify --format=iife --global-name=JustybaseSpreadsheet --outfile=browser/justybase-spreadsheet.min.js && esbuild src/browser/download.ts --bundle --format=esm --outfile=browser/browser-spreadsheet.js",
|
|
16
28
|
"lint": "eslint src/",
|
|
17
29
|
"typecheck": "tsc --noEmit",
|
|
18
|
-
"test": "npm run
|
|
19
|
-
"test:smoke": "
|
|
30
|
+
"test": "npm run typecheck && npm run test:smoke && npm run test:unit && npm run test:integration && npm run test:dist",
|
|
31
|
+
"test:smoke": "npx ts-node tests/smoke.test.ts",
|
|
20
32
|
"test:unit": "npx ts-node tests/unit/bigbuffer.test.ts && npx ts-node tests/unit/biff-reader-writer.test.ts && npx ts-node tests/unit/xlsb-writer.test.ts",
|
|
21
|
-
"test:integration": "
|
|
22
|
-
"test:
|
|
23
|
-
"test:
|
|
33
|
+
"test:integration": "npx ts-node tests/integration/xlsb-writer.test.ts && npx ts-node tests/integration/xlsx-writer.test.ts",
|
|
34
|
+
"test:dist": "npm run build && npx ts-node tests/dist-surface.test.ts",
|
|
35
|
+
"test:xlsb": "npx ts-node tests/integration/xlsb-writer.test.ts",
|
|
36
|
+
"test:xlsx": "npx ts-node tests/integration/xlsx-writer.test.ts",
|
|
24
37
|
"benchmark": "npm run build && npx ts-node benchmarks/performance.bench.ts",
|
|
25
38
|
"benchmark:comparison": "npm run build && npx ts-node benchmarks/comparison.bench.ts",
|
|
26
39
|
"test:excel-compat": "npm run build && npx tsx tests/excel-compat/run.ts",
|
|
27
|
-
"prepublishOnly": "npm run build && npm test"
|
|
40
|
+
"prepublishOnly": "npm run build && npm run build:browser && npm test"
|
|
28
41
|
},
|
|
29
42
|
"keywords": [
|
|
30
43
|
"excel",
|
|
@@ -42,11 +55,11 @@
|
|
|
42
55
|
"license": "MIT",
|
|
43
56
|
"repository": {
|
|
44
57
|
"type": "git",
|
|
45
|
-
"url": "git+https://github.com/
|
|
58
|
+
"url": "git+https://github.com/justybase/justybase_spreadsheet_tasks.git"
|
|
46
59
|
},
|
|
47
|
-
"homepage": "https://github.com/
|
|
60
|
+
"homepage": "https://github.com/justybase/justybase_spreadsheet_tasks#readme",
|
|
48
61
|
"bugs": {
|
|
49
|
-
"url": "https://github.com/
|
|
62
|
+
"url": "https://github.com/justybase/justybase_spreadsheet_tasks/issues"
|
|
50
63
|
},
|
|
51
64
|
"engines": {
|
|
52
65
|
"node": ">=16.0.0"
|
|
@@ -62,9 +75,11 @@
|
|
|
62
75
|
"@types/archiver": "^7.0.0",
|
|
63
76
|
"@types/node": "^22.10.5",
|
|
64
77
|
"@types/yauzl": "^2.10.3",
|
|
78
|
+
"esbuild": "0.28.1",
|
|
65
79
|
"eslint": "^9.17.0",
|
|
66
80
|
"exceljs": "^3.4.0",
|
|
67
81
|
"ts-node": "^10.9.2",
|
|
82
|
+
"tsup": "8.5.1",
|
|
68
83
|
"typescript": "^5.7.2",
|
|
69
84
|
"typescript-eslint": "^8.19.1"
|
|
70
85
|
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export declare class BiffReaderWriter {
|
|
2
|
-
private buffer;
|
|
3
|
-
private pos;
|
|
4
|
-
private length;
|
|
5
|
-
_isSheet: boolean;
|
|
6
|
-
_workbookId: number;
|
|
7
|
-
_recId: string | null;
|
|
8
|
-
_workbookName: string | null;
|
|
9
|
-
private _inCellXf;
|
|
10
|
-
private _inNumberFormat;
|
|
11
|
-
private _numberFormatIndex;
|
|
12
|
-
private _format;
|
|
13
|
-
private _formatString;
|
|
14
|
-
_sharedStringValue: string | null;
|
|
15
|
-
_sharedStringUniqueCount: number;
|
|
16
|
-
_cellType: number;
|
|
17
|
-
_intValue: number;
|
|
18
|
-
_doubleVal: number;
|
|
19
|
-
_boolValue: boolean;
|
|
20
|
-
_stringValue: string | null;
|
|
21
|
-
_columnNum: number;
|
|
22
|
-
_xfIndex: number;
|
|
23
|
-
_readCell: boolean;
|
|
24
|
-
_rowIndex: number;
|
|
25
|
-
private _recordStart;
|
|
26
|
-
_xfIndexToNumFmtId: number[];
|
|
27
|
-
_customNumFmts: Set<number>;
|
|
28
|
-
constructor(buffer: Buffer);
|
|
29
|
-
private _tryReadVariableValue;
|
|
30
|
-
private _getDWord;
|
|
31
|
-
private _getInt32;
|
|
32
|
-
private _getWord;
|
|
33
|
-
private _getByte;
|
|
34
|
-
private _getDouble;
|
|
35
|
-
private _getString;
|
|
36
|
-
private _getNullableString;
|
|
37
|
-
readWorkbook(): boolean;
|
|
38
|
-
readSharedStrings(): boolean;
|
|
39
|
-
readStyles(): boolean;
|
|
40
|
-
private _getRkNumber;
|
|
41
|
-
readWorksheet(): boolean;
|
|
42
|
-
}
|
|
43
|
-
export default BiffReaderWriter;
|
|
44
|
-
//# sourceMappingURL=BiffReaderWriter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BiffReaderWriter.d.ts","sourceRoot":"","sources":["../src/BiffReaderWriter.ts"],"names":[],"mappings":"AAAA,qBAAa,gBAAgB;IACzB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,MAAM,CAAS;IAEvB,QAAQ,EAAE,OAAO,CAAS;IAC1B,WAAW,EAAE,MAAM,CAAK;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC7B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEpC,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,kBAAkB,CAAa;IACvC,OAAO,CAAC,OAAO,CAAa;IAC5B,OAAO,CAAC,aAAa,CAAuB;IAE5C,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAQ;IACzC,wBAAwB,EAAE,MAAM,CAAK;IAErC,SAAS,EAAE,MAAM,CAAK;IACtB,SAAS,EAAE,MAAM,CAAK;IACtB,UAAU,EAAE,MAAM,CAAO;IACzB,UAAU,EAAE,OAAO,CAAS;IAC5B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAQ;IACnC,UAAU,EAAE,MAAM,CAAM;IACxB,QAAQ,EAAE,MAAM,CAAK;IACrB,SAAS,EAAE,OAAO,CAAS;IAC3B,SAAS,EAAE,MAAM,CAAM;IAGvB,OAAO,CAAC,YAAY,CAAa;IAEjC,kBAAkB,EAAE,MAAM,EAAE,CAAM;IAClC,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAa;gBAE5B,MAAM,EAAE,MAAM;IAS1B,OAAO,CAAC,qBAAqB;IA2B7B,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,kBAAkB;IAW1B,YAAY,IAAI,OAAO;IA4BvB,iBAAiB,IAAI,OAAO;IAyB5B,UAAU,IAAI,OAAO;IAyDrB,OAAO,CAAC,YAAY;IA6BpB,aAAa,IAAI,OAAO;CAoF3B;AAED,eAAe,gBAAgB,CAAC"}
|
package/dist/BiffReaderWriter.js
DELETED
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BiffReaderWriter = void 0;
|
|
4
|
-
class BiffReaderWriter {
|
|
5
|
-
constructor(buffer) {
|
|
6
|
-
this._isSheet = false;
|
|
7
|
-
this._workbookId = 0;
|
|
8
|
-
this._recId = null;
|
|
9
|
-
this._workbookName = null;
|
|
10
|
-
this._inCellXf = false;
|
|
11
|
-
this._inNumberFormat = false;
|
|
12
|
-
this._numberFormatIndex = 0;
|
|
13
|
-
this._format = 0;
|
|
14
|
-
this._formatString = null;
|
|
15
|
-
this._sharedStringValue = null;
|
|
16
|
-
this._sharedStringUniqueCount = 0;
|
|
17
|
-
this._cellType = 0;
|
|
18
|
-
this._intValue = 0;
|
|
19
|
-
this._doubleVal = 0.0;
|
|
20
|
-
this._boolValue = false;
|
|
21
|
-
this._stringValue = null;
|
|
22
|
-
this._columnNum = -1;
|
|
23
|
-
this._xfIndex = 0;
|
|
24
|
-
this._readCell = false;
|
|
25
|
-
this._rowIndex = -1;
|
|
26
|
-
// Start of the current record data (excluding ID and Length)
|
|
27
|
-
this._recordStart = 0;
|
|
28
|
-
this._xfIndexToNumFmtId = [];
|
|
29
|
-
this._customNumFmts = new Set();
|
|
30
|
-
if (!Buffer.isBuffer(buffer)) {
|
|
31
|
-
throw new Error("BiffReaderWriter expects a Buffer");
|
|
32
|
-
}
|
|
33
|
-
this.buffer = buffer;
|
|
34
|
-
this.pos = 0;
|
|
35
|
-
this.length = buffer.length;
|
|
36
|
-
}
|
|
37
|
-
_tryReadVariableValue() {
|
|
38
|
-
if (this.pos >= this.length)
|
|
39
|
-
return null;
|
|
40
|
-
const b1 = this.buffer[this.pos++];
|
|
41
|
-
let value = (b1 & 0x7F) >>> 0;
|
|
42
|
-
if ((b1 & 0x80) === 0)
|
|
43
|
-
return value;
|
|
44
|
-
if (this.pos >= this.length)
|
|
45
|
-
return null;
|
|
46
|
-
const b2 = this.buffer[this.pos++];
|
|
47
|
-
value = (((b2 & 0x7F) << 7) | value) >>> 0;
|
|
48
|
-
if ((b2 & 0x80) === 0)
|
|
49
|
-
return value;
|
|
50
|
-
if (this.pos >= this.length)
|
|
51
|
-
return null;
|
|
52
|
-
const b3 = this.buffer[this.pos++];
|
|
53
|
-
value = (((b3 & 0x7F) << 14) | value) >>> 0;
|
|
54
|
-
if ((b3 & 0x80) === 0)
|
|
55
|
-
return value;
|
|
56
|
-
if (this.pos >= this.length)
|
|
57
|
-
return null;
|
|
58
|
-
const b4 = this.buffer[this.pos++];
|
|
59
|
-
value = (((b4 & 0x7F) << 21) | value) >>> 0;
|
|
60
|
-
return value;
|
|
61
|
-
}
|
|
62
|
-
_getDWord(offset) {
|
|
63
|
-
return this.buffer.readUInt32LE(this._recordStart + offset);
|
|
64
|
-
}
|
|
65
|
-
_getInt32(offset) {
|
|
66
|
-
return this.buffer.readInt32LE(this._recordStart + offset);
|
|
67
|
-
}
|
|
68
|
-
_getWord(offset) {
|
|
69
|
-
return this.buffer.readUInt16LE(this._recordStart + offset);
|
|
70
|
-
}
|
|
71
|
-
_getByte(offset) {
|
|
72
|
-
return this.buffer[this._recordStart + offset];
|
|
73
|
-
}
|
|
74
|
-
_getDouble(offset) {
|
|
75
|
-
return this.buffer.readDoubleLE(this._recordStart + offset);
|
|
76
|
-
}
|
|
77
|
-
_getString(offset, length) {
|
|
78
|
-
const start = this._recordStart + offset;
|
|
79
|
-
const end = start + (length * 2);
|
|
80
|
-
if (end > this.buffer.length)
|
|
81
|
-
return "";
|
|
82
|
-
return this.buffer.toString('utf16le', start, end);
|
|
83
|
-
}
|
|
84
|
-
_getNullableString(offsetRef) {
|
|
85
|
-
const length = this._getDWord(offsetRef.val);
|
|
86
|
-
offsetRef.val += 4;
|
|
87
|
-
if (length === 0xFFFFFFFF)
|
|
88
|
-
return null;
|
|
89
|
-
const str = this._getString(offsetRef.val, length);
|
|
90
|
-
offsetRef.val += (length * 2);
|
|
91
|
-
return str;
|
|
92
|
-
}
|
|
93
|
-
readWorkbook() {
|
|
94
|
-
const recordId = this._tryReadVariableValue();
|
|
95
|
-
const recordLength = this._tryReadVariableValue();
|
|
96
|
-
if (recordId === null || recordLength === null)
|
|
97
|
-
return false;
|
|
98
|
-
const startPos = this.pos;
|
|
99
|
-
if (startPos + recordLength > this.length)
|
|
100
|
-
return false;
|
|
101
|
-
this._recordStart = startPos;
|
|
102
|
-
this.pos += recordLength;
|
|
103
|
-
this._isSheet = false;
|
|
104
|
-
if (recordId === 0x9C) {
|
|
105
|
-
this._workbookId = this._getDWord(4);
|
|
106
|
-
const offsetRef = { val: 8 };
|
|
107
|
-
this._recId = this._getNullableString(offsetRef);
|
|
108
|
-
const nameLength = this._getDWord(offsetRef.val);
|
|
109
|
-
this._workbookName = this._getString(offsetRef.val + 4, nameLength);
|
|
110
|
-
this._isSheet = true;
|
|
111
|
-
}
|
|
112
|
-
return true;
|
|
113
|
-
}
|
|
114
|
-
readSharedStrings() {
|
|
115
|
-
const recordId = this._tryReadVariableValue();
|
|
116
|
-
const recordLength = this._tryReadVariableValue();
|
|
117
|
-
if (recordId === null || recordLength === null)
|
|
118
|
-
return false;
|
|
119
|
-
const startPos = this.pos;
|
|
120
|
-
if (startPos + recordLength > this.length)
|
|
121
|
-
return false;
|
|
122
|
-
this._recordStart = startPos;
|
|
123
|
-
this.pos += recordLength;
|
|
124
|
-
this._sharedStringValue = null;
|
|
125
|
-
if (recordId === 0x13) {
|
|
126
|
-
const length = this._getDWord(1);
|
|
127
|
-
this._sharedStringValue = this._getString(5, length);
|
|
128
|
-
}
|
|
129
|
-
else if (recordId === 159) {
|
|
130
|
-
this._sharedStringUniqueCount = this._getDWord(4);
|
|
131
|
-
}
|
|
132
|
-
return true;
|
|
133
|
-
}
|
|
134
|
-
readStyles() {
|
|
135
|
-
const recordId = this._tryReadVariableValue();
|
|
136
|
-
const recordLength = this._tryReadVariableValue();
|
|
137
|
-
if (recordId === null || recordLength === null)
|
|
138
|
-
return false;
|
|
139
|
-
const startPos = this.pos;
|
|
140
|
-
if (startPos + recordLength > this.length)
|
|
141
|
-
return false;
|
|
142
|
-
this._recordStart = startPos;
|
|
143
|
-
this.pos += recordLength;
|
|
144
|
-
const _cellXfStart = 0x269;
|
|
145
|
-
const _cellXfEnd = 0x26a;
|
|
146
|
-
const _numberFormatStart = 0x267;
|
|
147
|
-
const _numberFormatEnd = 0x268;
|
|
148
|
-
const _xf = 0x2f;
|
|
149
|
-
const _numberFormat = 0x2c;
|
|
150
|
-
switch (recordId) {
|
|
151
|
-
case _cellXfStart:
|
|
152
|
-
this._inCellXf = true;
|
|
153
|
-
break;
|
|
154
|
-
case _cellXfEnd:
|
|
155
|
-
this._inCellXf = false;
|
|
156
|
-
break;
|
|
157
|
-
case _numberFormatStart:
|
|
158
|
-
this._inNumberFormat = true;
|
|
159
|
-
break;
|
|
160
|
-
case _numberFormatEnd:
|
|
161
|
-
this._inNumberFormat = false;
|
|
162
|
-
break;
|
|
163
|
-
case _xf:
|
|
164
|
-
if (this._inCellXf) {
|
|
165
|
-
this._numberFormatIndex = this._getWord(2);
|
|
166
|
-
this._xfIndexToNumFmtId.push(this._numberFormatIndex);
|
|
167
|
-
}
|
|
168
|
-
break;
|
|
169
|
-
case _numberFormat:
|
|
170
|
-
if (this._inNumberFormat) {
|
|
171
|
-
this._format = this._getWord(0);
|
|
172
|
-
const length = this._getDWord(2);
|
|
173
|
-
this._formatString = this._getString(6, length);
|
|
174
|
-
const code = this._formatString.toLowerCase();
|
|
175
|
-
if (code.includes('yy') || code.includes('mm') || code.includes('dd') || code.includes('h:mm')) {
|
|
176
|
-
this._customNumFmts.add(this._format);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
break;
|
|
180
|
-
}
|
|
181
|
-
return true;
|
|
182
|
-
}
|
|
183
|
-
_getRkNumber(offset) {
|
|
184
|
-
const flags = this._getByte(offset);
|
|
185
|
-
let result = 0;
|
|
186
|
-
if ((flags & 0x02) !== 0) {
|
|
187
|
-
const intVal = this._getInt32(offset);
|
|
188
|
-
result = intVal >> 2;
|
|
189
|
-
}
|
|
190
|
-
else {
|
|
191
|
-
const raw = this._getInt32(offset);
|
|
192
|
-
const highBits = (raw & 0xFFFFFFFC);
|
|
193
|
-
// Need to construct a double from high bits.
|
|
194
|
-
// Since we can't easily write to a reused buffer without risk,
|
|
195
|
-
// we'll just alloc 8 bytes here. It's rare for RK to be double.
|
|
196
|
-
// Alternatively, we could reuse a small buffer if we cared enough.
|
|
197
|
-
const dBuf = Buffer.allocUnsafe(8);
|
|
198
|
-
dBuf.writeInt32LE(0, 0);
|
|
199
|
-
dBuf.writeInt32LE(highBits, 4);
|
|
200
|
-
result = dBuf.readDoubleLE(0);
|
|
201
|
-
}
|
|
202
|
-
if ((flags & 0x01) !== 0) {
|
|
203
|
-
result /= 100;
|
|
204
|
-
}
|
|
205
|
-
return result;
|
|
206
|
-
}
|
|
207
|
-
readWorksheet() {
|
|
208
|
-
const recordId = this._tryReadVariableValue();
|
|
209
|
-
const recordLength = this._tryReadVariableValue();
|
|
210
|
-
if (recordId === null || recordLength === null)
|
|
211
|
-
return false;
|
|
212
|
-
const startPos = this.pos;
|
|
213
|
-
if (startPos + recordLength > this.length)
|
|
214
|
-
return false;
|
|
215
|
-
this._recordStart = startPos;
|
|
216
|
-
this.pos += recordLength;
|
|
217
|
-
this._readCell = false;
|
|
218
|
-
this._columnNum = -1;
|
|
219
|
-
const _row = 0x00;
|
|
220
|
-
const _blank = 0x01;
|
|
221
|
-
const _number = 0x02;
|
|
222
|
-
const _boolError = 0x03;
|
|
223
|
-
const _bool = 0x04;
|
|
224
|
-
const _float = 0x05;
|
|
225
|
-
const _string = 0x06;
|
|
226
|
-
const _sharedString = 0x07;
|
|
227
|
-
const _formulaString = 0x08;
|
|
228
|
-
const _formulaNumber = 0x09;
|
|
229
|
-
const _formulaBool = 0x0a;
|
|
230
|
-
const _formulaError = 0x0b;
|
|
231
|
-
switch (recordId) {
|
|
232
|
-
case _row:
|
|
233
|
-
this._rowIndex = this._getInt32(0);
|
|
234
|
-
break;
|
|
235
|
-
case _blank:
|
|
236
|
-
case _boolError:
|
|
237
|
-
case _formulaError:
|
|
238
|
-
this._readCell = true;
|
|
239
|
-
this._cellType = 0;
|
|
240
|
-
break;
|
|
241
|
-
case _number:
|
|
242
|
-
this._doubleVal = this._getRkNumber(8);
|
|
243
|
-
this._readCell = true;
|
|
244
|
-
this._cellType = 3;
|
|
245
|
-
break;
|
|
246
|
-
case _bool:
|
|
247
|
-
case _formulaBool:
|
|
248
|
-
this._boolValue = (this._getByte(8) === 1);
|
|
249
|
-
this._readCell = true;
|
|
250
|
-
this._cellType = 4;
|
|
251
|
-
break;
|
|
252
|
-
case _formulaNumber:
|
|
253
|
-
case _float:
|
|
254
|
-
this._doubleVal = this._getDouble(8);
|
|
255
|
-
this._readCell = true;
|
|
256
|
-
this._cellType = 3;
|
|
257
|
-
break;
|
|
258
|
-
case _string:
|
|
259
|
-
case _formulaString:
|
|
260
|
-
{
|
|
261
|
-
const length = this._getDWord(8);
|
|
262
|
-
this._stringValue = this._getString(12, length);
|
|
263
|
-
this._readCell = true;
|
|
264
|
-
this._cellType = 5;
|
|
265
|
-
break;
|
|
266
|
-
}
|
|
267
|
-
case _sharedString:
|
|
268
|
-
this._intValue = this._getDWord(8);
|
|
269
|
-
this._readCell = true;
|
|
270
|
-
this._cellType = 2;
|
|
271
|
-
break;
|
|
272
|
-
}
|
|
273
|
-
if (this._readCell) {
|
|
274
|
-
this._columnNum = this._getDWord(0);
|
|
275
|
-
this._xfIndex = this._getDWord(4) & 0xffffff;
|
|
276
|
-
}
|
|
277
|
-
return true;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
exports.BiffReaderWriter = BiffReaderWriter;
|
|
281
|
-
exports.default = BiffReaderWriter;
|
|
282
|
-
//# sourceMappingURL=BiffReaderWriter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BiffReaderWriter.js","sourceRoot":"","sources":["../src/BiffReaderWriter.ts"],"names":[],"mappings":";;;AAAA,MAAa,gBAAgB;IAmCzB,YAAY,MAAc;QA9B1B,aAAQ,GAAY,KAAK,CAAC;QAC1B,gBAAW,GAAW,CAAC,CAAC;QACxB,WAAM,GAAkB,IAAI,CAAC;QAC7B,kBAAa,GAAkB,IAAI,CAAC;QAE5B,cAAS,GAAY,KAAK,CAAC;QAC3B,oBAAe,GAAY,KAAK,CAAC;QACjC,uBAAkB,GAAW,CAAC,CAAC;QAC/B,YAAO,GAAW,CAAC,CAAC;QACpB,kBAAa,GAAkB,IAAI,CAAC;QAE5C,uBAAkB,GAAkB,IAAI,CAAC;QACzC,6BAAwB,GAAW,CAAC,CAAC;QAErC,cAAS,GAAW,CAAC,CAAC;QACtB,cAAS,G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AC,CAAC,CAAC,CAAC;gBACrC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;gBACtB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;gBACnB,MAAM;YAEV,KAAK,OAAO,CAAC;YACb,KAAK,cAAc;gBACf,CAAC;oBACG,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;oBACjC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;oBAChD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;oBACtB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;oBACnB,MAAM;gBACV,CAAC;YAEL,KAAK,aAAa;gBACd,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;gBACnC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;gBACtB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;gBACnB,MAAM;QACd,CAAC;QAED,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACjB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YACpC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC;QACjD,CAAC;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AA5UD,4CA4UC;AAED,kBAAe,gBAAgB,CAAC"}
|
package/dist/BigBuffer.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Buffer } from 'buffer';
|
|
2
|
-
export declare class BigBuffer {
|
|
3
|
-
private chunkSize;
|
|
4
|
-
private chunks;
|
|
5
|
-
private currentBuffer;
|
|
6
|
-
private cursor;
|
|
7
|
-
constructor(chunkSize?: number);
|
|
8
|
-
ensureCapacity(size: number): void;
|
|
9
|
-
private _ensureCapacity;
|
|
10
|
-
private _flush;
|
|
11
|
-
write(buffer: Buffer): void;
|
|
12
|
-
writeByte(val: number): void;
|
|
13
|
-
writeUnsafeByte(val: number): void;
|
|
14
|
-
writeInt32LE(val: number): void;
|
|
15
|
-
writeUnsafeInt32LE(val: number): void;
|
|
16
|
-
writeDoubleLE(val: number): void;
|
|
17
|
-
writeUnsafeDoubleLE(val: number): void;
|
|
18
|
-
writeString(str: string): void;
|
|
19
|
-
writeUtf16LE(str: string): void;
|
|
20
|
-
getChunks(): Buffer[];
|
|
21
|
-
reset(): void;
|
|
22
|
-
}
|
|
23
|
-
export default BigBuffer;
|
|
24
|
-
//# sourceMappingURL=BigBuffer.d.ts.map
|
package/dist/BigBuffer.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BigBuffer.d.ts","sourceRoot":"","sources":["../src/BigBuffer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,qBAAa,SAAS;IAClB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,MAAM,CAAS;gBAEX,SAAS,GAAE,MAAc;IAOrC,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAMlC,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,MAAM;IAQd,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAoB3B,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAM5B,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIlC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAM/B,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKrC,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAMhC,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKtC,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAiB9B,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAwB/B,SAAS,IAAI,MAAM,EAAE;IASrB,KAAK,IAAI,IAAI;CAIhB;AAED,eAAe,SAAS,CAAC"}
|
package/dist/BigBuffer.js
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BigBuffer = void 0;
|
|
4
|
-
const buffer_1 = require("buffer");
|
|
5
|
-
class BigBuffer {
|
|
6
|
-
constructor(chunkSize = 65536) {
|
|
7
|
-
this.chunkSize = chunkSize;
|
|
8
|
-
this.chunks = [];
|
|
9
|
-
this.currentBuffer = buffer_1.Buffer.alloc(chunkSize);
|
|
10
|
-
this.cursor = 0;
|
|
11
|
-
}
|
|
12
|
-
ensureCapacity(size) {
|
|
13
|
-
if (this.cursor + size > this.chunkSize) {
|
|
14
|
-
this._flush();
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
_ensureCapacity(size) {
|
|
18
|
-
this.ensureCapacity(size);
|
|
19
|
-
}
|
|
20
|
-
_flush() {
|
|
21
|
-
if (this.cursor > 0) {
|
|
22
|
-
this.chunks.push(this.currentBuffer.subarray(0, this.cursor));
|
|
23
|
-
this.currentBuffer = buffer_1.Buffer.alloc(this.chunkSize);
|
|
24
|
-
this.cursor = 0;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
write(buffer) {
|
|
28
|
-
let len = buffer.length;
|
|
29
|
-
let offset = 0;
|
|
30
|
-
while (len > 0) {
|
|
31
|
-
let available = this.chunkSize - this.cursor;
|
|
32
|
-
if (available === 0) {
|
|
33
|
-
this._flush();
|
|
34
|
-
available = this.chunkSize;
|
|
35
|
-
}
|
|
36
|
-
const toWrite = Math.min(len, available);
|
|
37
|
-
buffer.copy(this.currentBuffer, this.cursor, offset, offset + toWrite);
|
|
38
|
-
this.cursor += toWrite;
|
|
39
|
-
offset += toWrite;
|
|
40
|
-
len -= toWrite;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
writeByte(val) {
|
|
44
|
-
this._ensureCapacity(1);
|
|
45
|
-
this.currentBuffer[this.cursor] = val;
|
|
46
|
-
this.cursor++;
|
|
47
|
-
}
|
|
48
|
-
writeUnsafeByte(val) {
|
|
49
|
-
this.currentBuffer[this.cursor++] = val;
|
|
50
|
-
}
|
|
51
|
-
writeInt32LE(val) {
|
|
52
|
-
this._ensureCapacity(4);
|
|
53
|
-
this.currentBuffer.writeInt32LE(val, this.cursor);
|
|
54
|
-
this.cursor += 4;
|
|
55
|
-
}
|
|
56
|
-
writeUnsafeInt32LE(val) {
|
|
57
|
-
this.currentBuffer.writeInt32LE(val, this.cursor);
|
|
58
|
-
this.cursor += 4;
|
|
59
|
-
}
|
|
60
|
-
writeDoubleLE(val) {
|
|
61
|
-
this._ensureCapacity(8);
|
|
62
|
-
this.currentBuffer.writeDoubleLE(val, this.cursor);
|
|
63
|
-
this.cursor += 8;
|
|
64
|
-
}
|
|
65
|
-
writeUnsafeDoubleLE(val) {
|
|
66
|
-
this.currentBuffer.writeDoubleLE(val, this.cursor);
|
|
67
|
-
this.cursor += 8;
|
|
68
|
-
}
|
|
69
|
-
writeString(str) {
|
|
70
|
-
const byteLength = buffer_1.Buffer.byteLength(str, 'utf8');
|
|
71
|
-
if (this.cursor + byteLength <= this.chunkSize) {
|
|
72
|
-
this.cursor += this.currentBuffer.write(str, this.cursor, 'utf8');
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
this._flush();
|
|
76
|
-
if (byteLength > this.chunkSize) {
|
|
77
|
-
this.chunks.push(buffer_1.Buffer.from(str, 'utf8'));
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
this.cursor += this.currentBuffer.write(str, this.cursor, 'utf8');
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
writeUtf16LE(str) {
|
|
84
|
-
const byteLength = str.length * 2;
|
|
85
|
-
if (this.cursor + byteLength <= this.chunkSize) {
|
|
86
|
-
for (let i = 0; i < str.length; i++) {
|
|
87
|
-
const code = str.charCodeAt(i);
|
|
88
|
-
this.currentBuffer[this.cursor++] = code & 0xFF;
|
|
89
|
-
this.currentBuffer[this.cursor++] = (code >> 8) & 0xFF;
|
|
90
|
-
}
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
this._flush();
|
|
94
|
-
if (byteLength > this.chunkSize) {
|
|
95
|
-
this.chunks.push(buffer_1.Buffer.from(str, 'utf16le'));
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
for (let i = 0; i < str.length; i++) {
|
|
99
|
-
const code = str.charCodeAt(i);
|
|
100
|
-
this.currentBuffer[this.cursor++] = code & 0xFF;
|
|
101
|
-
this.currentBuffer[this.cursor++] = (code >> 8) & 0xFF;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
getChunks() {
|
|
106
|
-
if (this.cursor > 0) {
|
|
107
|
-
this.chunks.push(this.currentBuffer.subarray(0, this.cursor));
|
|
108
|
-
this.currentBuffer = buffer_1.Buffer.alloc(this.chunkSize);
|
|
109
|
-
this.cursor = 0;
|
|
110
|
-
}
|
|
111
|
-
return this.chunks;
|
|
112
|
-
}
|
|
113
|
-
reset() {
|
|
114
|
-
this.chunks = [];
|
|
115
|
-
this.cursor = 0;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
exports.BigBuffer = BigBuffer;
|
|
119
|
-
exports.default = BigBuffer;
|
|
120
|
-
//# sourceMappingURL=BigBuffer.js.map
|
package/dist/BigBuffer.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BigBuffer.js","sourceRoot":"","sources":["../src/BigBuffer.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAEhC,MAAa,SAAS;IAMlB,YAAY,YAAoB,KAAK;QACjC,IAAI,CAAC,SAAS,GAAG,SAAS,C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17 +0,0 @@
|
|
|
1
|
-
export declare abstract class ExcelReaderAbstract {
|
|
2
|
-
fieldCount: number;
|
|
3
|
-
rowCount: number;
|
|
4
|
-
actualSheetName: string;
|
|
5
|
-
resultsCount: number;
|
|
6
|
-
protected _oaEpoch: number;
|
|
7
|
-
constructor();
|
|
8
|
-
abstract open(path: string, readSharedStrings?: boolean, updateMode?: boolean): Promise<void>;
|
|
9
|
-
close(): Promise<void>;
|
|
10
|
-
abstract read(): boolean | Promise<boolean>;
|
|
11
|
-
abstract getSheetNames(): string[];
|
|
12
|
-
abstract getValue(i: number): any;
|
|
13
|
-
dispose(): void;
|
|
14
|
-
getDateTimeFromOaDate(oaDate: number): Date;
|
|
15
|
-
}
|
|
16
|
-
export default ExcelReaderAbstract;
|
|
17
|
-
//# sourceMappingURL=ExcelReaderAbstract.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExcelReaderAbstract.d.ts","sourceRoot":"","sources":["../src/ExcelReaderAbstract.ts"],"names":[],"mappings":"AAAA,8BAAsB,mBAAmB;IACrC,UAAU,EAAE,MAAM,CAAK;IACvB,QAAQ,EAAE,MAAM,CAAK;IACrB,eAAe,EAAE,MAAM,CAAM;IAC7B,YAAY,EAAE,MAAM,CAAK;IAEzB,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC;;IAM3B,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAEvF,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,QAAQ,CAAC,IAAI,IAAI,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAE3C,QAAQ,CAAC,aAAa,IAAI,MAAM,EAAE;IAElC,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG;IAEjC,OAAO,IAAI,IAAI;IAIf,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAI9C;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExcelReaderAbstract = void 0;
|
|
4
|
-
class ExcelReaderAbstract {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.fieldCount = 0;
|
|
7
|
-
this.rowCount = 0;
|
|
8
|
-
this.actualSheetName = '';
|
|
9
|
-
this.resultsCount = 0;
|
|
10
|
-
this._oaEpoch = Date.UTC(1899, 11, 30);
|
|
11
|
-
}
|
|
12
|
-
async close() {
|
|
13
|
-
// cleanup if needed
|
|
14
|
-
}
|
|
15
|
-
dispose() {
|
|
16
|
-
// cleanup
|
|
17
|
-
}
|
|
18
|
-
getDateTimeFromOaDate(oaDate) {
|
|
19
|
-
const ms = oaDate * 86400000 + this._oaEpoch;
|
|
20
|
-
return new Date(ms);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.ExcelReaderAbstract = ExcelReaderAbstract;
|
|
24
|
-
exports.default = ExcelReaderAbstract;
|
|
25
|
-
//# sourceMappingURL=ExcelReaderAbstract.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExcelReaderAbstract.js","sourceRoot":"","sources":["../src/ExcelReaderAbstract.ts"],"names":[],"mappings":";;;AAAA,MAAsB,mBAAmB;IAQrC;QAPA,eAAU,GAAW,CAAC,CAAC;QACvB,aAAQ,GAAW,CAAC,CAAC;QACrB,oBAAe,GAAW,EAAE,CAAC;QAC7B,iBAAY,GAAW,CAAC,CAAC;QAKrB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAC3C,CAAC;IAID,KAAK,CAAC,KAAK;QACP,oBAAoB;IACxB,CAAC;IAQD,OAAO;QACH,UAAU;IACd,CAAC;IAED,qBAAqB,CAAC,MAAc;QAChC,MAAM,EAAE,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC7C,OAAO,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC;IACxB,CAAC;CACJ;AAhCD,kDAgCC;AAED,kBAAe,mBAAmB,CAAC"}
|