@gatekeeper_technology/excel-utils 1.0.6 → 1.0.7
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 +3 -3
- package/index.js +3 -3
- package/package.json +1 -1
- package/utils.js +4 -4
- package/workbook_creator.js +5 -5
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Gatekeeper's Excel Utils
|
|
2
2
|
|
|
3
3
|
## Changelog
|
|
4
|
-
### [1.00.
|
|
5
|
-
###
|
|
6
|
-
-
|
|
4
|
+
### [1.00.07] 24-08-2022
|
|
5
|
+
### Fixed
|
|
6
|
+
- Fixed bug where workbook_creator class was not exported properly.
|
|
7
7
|
### [1.00.05] 18-03-2022
|
|
8
8
|
### Changed
|
|
9
9
|
- Fixed import bug
|
package/index.js
CHANGED
package/package.json
CHANGED
package/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const WorkbookCreator = require("./workbook_creator");
|
|
1
|
+
const WorkbookCreator = require("./workbook_creator.js");
|
|
2
2
|
|
|
3
3
|
async function generateXLSXBuffer(data, sheet_name) {
|
|
4
|
-
const workbook_creator = new WorkbookCreator
|
|
4
|
+
const workbook_creator = new WorkbookCreator();
|
|
5
5
|
let _workbook = workbook_creator.createWorkbook();
|
|
6
6
|
let _worksheet = workbook_creator.createWorksheet(_workbook, sheet_name);
|
|
7
7
|
workbook_creator.loadDataIntoWorksheet(_worksheet, data);
|
|
@@ -13,7 +13,7 @@ async function generateXLSXBuffer(data, sheet_name) {
|
|
|
13
13
|
* Returns an array of all
|
|
14
14
|
*/
|
|
15
15
|
async function getWorkbookData(data) {
|
|
16
|
-
const workbook_creator = new WorkbookCreator
|
|
16
|
+
const workbook_creator = new WorkbookCreator();
|
|
17
17
|
let _workbook = await workbook_creator.loadXLSX(data);
|
|
18
18
|
let _worksheet = _workbook.worksheets[0];
|
|
19
19
|
|
|
@@ -28,4 +28,4 @@ async function getWorkbookData(data) {
|
|
|
28
28
|
module.exports = {
|
|
29
29
|
generateXLSXBuffer,
|
|
30
30
|
getWorkbookData
|
|
31
|
-
}
|
|
31
|
+
}
|
package/workbook_creator.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
const ExcelJS = require("exceljs");
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
constructor() {
|
|
3
|
+
let WorkbookCreator = class {
|
|
4
|
+
constructor() {
|
|
5
|
+
|
|
6
|
+
}
|
|
5
7
|
/**
|
|
6
8
|
* Create a new workbook
|
|
7
9
|
* @returns {ExcelJS.Workbook} The created workbook
|
|
@@ -124,6 +126,4 @@ class WorkbookCreator {
|
|
|
124
126
|
|
|
125
127
|
}
|
|
126
128
|
|
|
127
|
-
module.exports =
|
|
128
|
-
WorkbookCreator
|
|
129
|
-
}
|
|
129
|
+
module.exports = WorkbookCreator;
|