style-xlsx-m 0.1.23 → 0.1.26

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
@@ -1,5 +1,5 @@
1
1
  # style-xlsx-m
2
- # Now i test library pleas wait to evening (finished in 8/30/2022 10:00 pm)
2
+ <!-- # Now i test library pleas wait to evening (finished in 8/30/2022 10:00 pm) -->
3
3
  ## ℹ️ About
4
4
 
5
5
  Style-xlsx-m is a custom [XLSX](https://www.npmjs.com/package/xlsx) (SheetJs) version library with styling from [xlsx-js-style](https://www.npmjs.com/package/xlsx-js-style)
@@ -33,9 +33,9 @@ Install browser:
33
33
 
34
34
 
35
35
  ## 🗒 What I added?
36
- -- When you use read (second property put {type:'file'}) or readFile your file get cells style.
37
36
 
38
37
  ### 1. read or readFile
38
+ -- When you use read (second property put {type:'file'}) or readFile your file get cells style.
39
39
 
40
40
  ```js
41
41
  // STEP 1
@@ -60,22 +60,25 @@ XLSX.utils.book_append_sheet(workbook, worksheet, false, false, sheetname);
60
60
  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
+ (But you can't get style in xls format becouse this format don't use xml)
63
64
 
64
- ### 2. read or readFile
65
+
66
+ ### 2. PageSetup
65
67
 
66
68
  ```js
67
- // new keys on worksheet
68
- const ws = [...]
69
+ const worksheet = [...]
69
70
 
70
- // #1 default null
71
- ws['!pageSetup'] = {
72
- paperSize: "9",
73
- scale: "91",
74
- fitToWidth: "0",
75
- orientation: "landscape"
71
+ // default null
72
+ worksheet['!pageSetup'] = {
73
+ paperSize: "9", // "9" for format A4
74
+ scale: "91", // 1 - 100%
75
+ fitToWidth: "0", // "0" || "1"
76
+ orientation: "landscape" // "landscape" || "portrait"
76
77
  }
77
-
78
- // #2 default null
78
+ ```
79
+ it can be used to print in desired format
80
+
81
+ <!-- // #2 default null
79
82
  ws['!colBreaks'] = {
80
83
  colBreaks: {
81
84
  count: "22",
@@ -95,8 +98,7 @@ XLSX.writeFile(wb, "style-xlsx-m-example.xlsm");
95
98
  // #3 default null
96
99
  ws['!headerFooter'] = {
97
100
  alignWithMargins: "0"
98
- }
99
- ```
101
+ } -->
100
102
 
101
103
  ## 🗒 Style API
102
104
  -- Method to export file in excel with style get from [xlsx-js-style](https://www.npmjs.com/package/xlsx-js-style) (only function writeFile)