style-xlsx-m 0.1.17 → 0.1.19

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 CHANGED
@@ -35,7 +35,7 @@ Install browser:
35
35
  ## 🗒 What I added?
36
36
  -- When you use read (second property put {type:'file'}) or readFile your file get cells style.
37
37
 
38
- ### read or readFile
38
+ ### 1. read or readFile
39
39
 
40
40
  ```js
41
41
  // STEP 1
@@ -61,6 +61,42 @@ XLSX.writeFile(wb, "style-xlsx-m-example.xlsm");
61
61
  ```
62
62
  This example shows how you can change the contents of a file without removing its old style.
63
63
 
64
+ ### 2. read or readFile
65
+
66
+ ```js
67
+ // new keys on worksheet
68
+ const ws = [...]
69
+
70
+ // #1 default null
71
+ ws['!pageSetup'] = {
72
+ paperSize: "9",
73
+ scale: "91",
74
+ fitToWidth: "0",
75
+ orientation: "landscape"
76
+ }
77
+
78
+ // #2 default null
79
+ ws['!colBreaks'] = {
80
+ colBreaks: {
81
+ count: "22",
82
+ manualBreakCount: "22"
83
+ }
84
+ brk: [
85
+ {
86
+ id: "12",
87
+ min: "1",
88
+ max: "37",
89
+ man: "1"
90
+ },
91
+ ...
92
+ ]
93
+ }
94
+
95
+ // #3 default null
96
+ ws['!headerFooter'] = {
97
+ alignWithMargins: "0"
98
+ }
99
+ ```
64
100
 
65
101
  ## 🗒 Style API
66
102
  -- Method to export file in excel with style get from [xlsx-js-style](https://www.npmjs.com/package/xlsx-js-style) (only function writeFile)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "style-xlsx-m",
3
- "version": "0.1.17",
3
+ "version": "0.1.19",
4
4
  "author": "mor8t (Shukurov Shahrom)",
5
5
  "description": "style-xlsx-m is a custom xlsx and xlsx-js-style version library",
6
6
  "keywords": [
@@ -4228,9 +4228,13 @@ function make_xlsx_lib(a) {
4228
4228
  if(c['!sheetViews']){
4229
4229
  i[3] = c['!sheetViews']
4230
4230
  }
4231
+ // console.log([...i].join(''))
4231
4232
  // if(c['!sheetFormatPr']){
4232
4233
  // i[3] = i[3]+c['!sheetFormatPr']
4233
4234
  // }
4235
+ console.log(i[1],`
4236
+ `,i[3],`
4237
+ `)
4234
4238
  const t =parse_xml_pageSetup(c['!pageSetup'])+parse_xml_headerFooter(c['!headerFooter'])+parse_xml_colBreaks(c['!colBreaks'])
4235
4239
  return t
4236
4240
  }
@@ -14655,6 +14659,7 @@ function make_xlsx_lib(a) {
14655
14659
  (c["!legacy"] = g)),
14656
14660
  1 < i.length &&
14657
14661
  ((i[i.length] = '</worksheet>'), (i[1] = i[1].replace("/>", ">"))),
14662
+ // (console.log([...i].join(""))),
14658
14663
  i.join("")
14659
14664
  );
14660
14665
  }
package/xlsx.js CHANGED
@@ -14686,6 +14686,7 @@ function parse_ws_xml(data, opts, idx, rels, wb, themes, styles) {
14686
14686
 
14687
14687
  /* 0.1.17 sheetPr mor8t */
14688
14688
  var sheetPr = data.match(sheetPrregex);
14689
+ console.log(data)
14689
14690
  if(sheetPr) s['!sheetPr'] = sheetPr[0]
14690
14691
 
14691
14692
  // /* 0.1.17 sheetFormatPr mor8t */