tfose5-xlsx 2.0.1 → 2.1.1
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 +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
- package/dist/file-parser-base.d.ts +0 -5
- package/dist/file-parser-base.js +0 -6
- package/dist/file-parser-parse-result.d.ts +0 -7
- package/dist/file-parser-parse-result.js +0 -2
- package/dist/file-parser.d.ts +0 -10
- package/dist/file-parser.js +0 -22
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
# 
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -19,3 +19,4 @@ __exportStar(require("./enum-sheet-parser-parse-option"), exports);
|
|
|
19
19
|
__exportStar(require("./i-parser"), exports);
|
|
20
20
|
__exportStar(require("./parser-factory"), exports);
|
|
21
21
|
__exportStar(require("./work-book-parser-base"), exports);
|
|
22
|
+
__exportStar(require("./work-book-parser-parse-result"), exports);
|
package/package.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { XlsxFileParserParseResult } from './file-parser-parse-result';
|
|
2
|
-
import { IXlsxParser } from './i-parser';
|
|
3
|
-
export declare abstract class XlsxFileParserBase implements IXlsxParser<string, XlsxFileParserParseResult> {
|
|
4
|
-
abstract parse(path: string): XlsxFileParserParseResult;
|
|
5
|
-
}
|
package/dist/file-parser-base.js
DELETED
package/dist/file-parser.d.ts
DELETED
package/dist/file-parser.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.XlsxFileParser = void 0;
|
|
4
|
-
const xlsx_1 = require("xlsx");
|
|
5
|
-
const file_parser_base_1 = require("./file-parser-base");
|
|
6
|
-
class XlsxFileParser extends file_parser_base_1.XlsxFileParserBase {
|
|
7
|
-
parse(path) {
|
|
8
|
-
const wb = (0, xlsx_1.readFile)(path);
|
|
9
|
-
return {
|
|
10
|
-
sheets: wb.SheetNames.filter(r => {
|
|
11
|
-
return !r.includes('_');
|
|
12
|
-
}).map(r => {
|
|
13
|
-
return {
|
|
14
|
-
name: r,
|
|
15
|
-
rows: xlsx_1.utils.sheet_to_json(wb.Sheets[r]),
|
|
16
|
-
};
|
|
17
|
-
}).reverse(),
|
|
18
|
-
enumName: wb.SheetNames[0],
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.XlsxFileParser = XlsxFileParser;
|