Skip to content

Commit 125c031

Browse files
author
m.r
committed
V 5.1.1
1 parent 967ba8e commit 125c031

File tree

5 files changed

+51
-43
lines changed

5 files changed

+51
-43
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Version 5.1.1 (2024-01-31)
4+
5+
### Bug Fixes
6+
7+
- Fixed README.md
8+
39
## Version 5.1.0 (2024-01-31)
410

511
### New Features

README.md

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ We have four functions that are defined with specific use cases as follows:
6969

7070
- **`convertTableToExcel`**: This function is designed exclusively for **client-side** use. It requires passing a DOM element (a table element) as a parameter. The output of this function is an Excel file generated from the provided table.
7171

72-
<a id="side-by-side-line-by-line"></a>
72+
<a id="side-by-side-line-by-line"></a>
7373

7474
- **`sideBySideLineByLine`**: This function offers the capability to generate a single-sheet Excel file containing multiple tables side by side and line by line.
7575

@@ -154,10 +154,10 @@ Ensure you choose the appropriate method based on your installation preferences
154154

155155
After adding the library to your project, generating XLSX files becomes straightforward. You can achieve this by creating a data object similar to the code snippet below:
156156

157-
### How to use themeBaseGenerate
158-
159157
<a id="theme-base-generate-usage"></a>
160158

159+
### How to use themeBaseGenerate
160+
161161
<details>
162162
<summary>Display Code</summary>
163163

@@ -417,12 +417,12 @@ ExcelTable.themeBaseGenerate(data, 12);
417417

418418
</details>
419419

420-
[More Example](example/CDN/themeBaseGenerates)
421-
422-
### How to use convertTableToExcel
420+
[More Example](example/CDN/themeBaseGenerate)
423421

424422
<a id="convert-table-to-excel-usage"></a>
425423

424+
### How to use convertTableToExcel
425+
426426
```javascript
427427
ExcelTable.convertTableToExcel("#table");
428428
-------------------------------------------------------------------
@@ -452,10 +452,10 @@ ExcelTable.convertTableToExcel("#table", null, true, rowF, colF)
452452
ExcelTable.extractExcelData(your excel url);
453453
```
454454

455-
### How to use sideBySideLineByLine
456-
457455
<a id="side-by-side-line-by-line-usage"></a>
458456

457+
### How to use sideBySideLineByLine
458+
459459
`sideBySideLineByLine` is a new feature that enables the generation of multiple tables within a single Excel sheet.
460460

461461
<details>
@@ -601,10 +601,10 @@ ExcelTable.sideBySideLineByLine(sideData);
601601

602602
[More Example](example/CDN/sideBySideLineByLine)
603603

604-
### generateExcel
605-
606604
<a id="generate-excel-usage"></a>
607605

606+
### generateExcel
607+
608608
<details>
609609

610610
<summary>Display Code</summary>
@@ -770,10 +770,12 @@ ExcelTable.generateExcel(data);
770770

771771
</details>
772772

773-
## General option [⬆️](#table-of-contents)
773+
[More Example](example/CDN/generateExcel)
774774

775775
<a id="general-option"></a>
776776

777+
## General option [⬆️](#table-of-contents)
778+
777779
Each sheet has options for customization. You can change the sheet name using name, adjust the tab name color with tabColor, control visibility with state, add protection to a sheet via protectionOption, and implement sorting and filtering using sortAndFilter. In the example below, we will demonstrate how to utilize these properties. Additionally, for Excel file information, we offer options such as creator, created, notSave, and modified.
778780

779781
<details>
@@ -1796,10 +1798,10 @@ const data = {
17961798
};
17971799
```
17981800

1799-
## Header Option [⬆️](#table-of-contents)
1800-
18011801
<a id="header"></a>
18021802

1803+
## Header Option [⬆️](#table-of-contents)
1804+
18031805
We offer specific header options for Excel headers. The header is a mandatory component, so the withoutHeader option cannot be used to omit it. The headerHeight option is employed to determine the height of the header row. Additionally, we provide the headerStyleKey property, which specifies the most commonly used style for each cell (its value corresponds to the style ID; detailed functionality is explained in the Styles section).
18041806

18051807
Each header cell is endowed with properties beyond the label and text. The size property defines the width of the column, while the formula property applies a formula to all rows (excluding the header) within the column, ultimately affecting the final cell in that column.
@@ -2041,10 +2043,10 @@ ExcelTable.generateExcel(data);
20412043

20422044
</details>
20432045

2044-
## Formula Option [⬆️](#table-of-contents)
2045-
20462046
<a id="formula"></a>
20472047

2048+
## Formula Option [⬆️](#table-of-contents)
2049+
20482050
We provide two distinct methods for defining formulas: customization and column type. In the customization approach, if you employ a cell containing data that is used within the formula, the formula will display an instance of the formula. When using the customization type, it's important to specify the formula type, which can be any of the following: AVERAGE, SUM, COUNT, MAX, or MIN.
20492051

20502052
<details>
@@ -2548,10 +2550,10 @@ ExcelTable.generateExcel(data);
25482550

25492551
</details>
25502552

2551-
## Styles & Format Options [⬆️](#table-of-contents)
2552-
25532553
<a id="styles-format"></a>
25542554

2555+
## Styles & Format Options [⬆️](#table-of-contents)
2556+
25552557
In the library, styles are defined with an ID that represents the desired style. This ID is then used to apply the corresponding style to cells. Each cell is associated with only one style. These styles encompass various attributes such as borders, alignment, text color, font family, font size, background, and bold, among others.
25562558

25572559
The format property is a distinct style attribute. Unlike other styles, the format is predefined and cannot be customized.
@@ -2725,10 +2727,10 @@ ExcelTable.generateExcel(data);
27252727

27262728
</details>
27272729

2728-
## Merging Cells Options [⬆️](#table-of-contents)
2729-
27302730
<a id="merging-cells"></a>
27312731

2732+
## Merging Cells Options [⬆️](#table-of-contents)
2733+
27322734
We offer options for merging rows of cells together. Additionally, we provide a function-based approach to facilitate cell merging.
27332735

27342736
<details>
@@ -2935,10 +2937,10 @@ ExcelTable.generateExcel(data);
29352937

29362938
</details>
29372939

2938-
## Group Rows Options [⬆️](#table-of-contents)
2939-
29402940
<a id="group-rows"></a>
29412941

2942+
## Group Rows Options [⬆️](#table-of-contents)
2943+
29422944
With this library, you can group rows together using two properties added to the data: outlineLevel and hidden. The outlineLevel represents the grouping level, while hidden represents whether the default state is collapsed or not. The key of this property is changeable, so in case of a conflict with your data, you have the flexibility to modify it. We will discuss how to change the key in the next section.
29432945

29442946
<details>
@@ -3366,9 +3368,10 @@ ExcelTable.generateExcel(data);
33663368

33673369
</details>
33683370

3371+
<a id="shift-title"></a>
3372+
33693373
## Shift & Title Option [⬆️](#table-of-contents)
33703374

3371-
<a id="shift-title"></a>
33723375
The shift feature allows you to adjust the starting point of generating an Excel file. The title option, on the other hand, is used when you want to include a title at the top of the generated file.
33733376

33743377
<details>
@@ -3463,10 +3466,10 @@ ExcelTable.generateExcel(data);
34633466

34643467
</details>
34653468

3466-
## Comment Option [⬆️](#table-of-contents)
3467-
34683469
<a id="comment"></a>
34693470

3471+
## Comment Option [⬆️](#table-of-contents)
3472+
34703473
After version 2.4.0 you can add comment on cells.
34713474

34723475
<details>
@@ -3612,10 +3615,10 @@ ExcelTable.generateExcel(data);
36123615

36133616
</details>
36143617

3615-
## Multi Style value Option [⬆️](#table-of-contents)
3616-
36173618
<a id="multi-style-value"></a>
36183619

3620+
## Multi Style value Option [⬆️](#table-of-contents)
3621+
36193622
After version 2.4.0, We added Ability to change the style of each character of cells. (only text value)
36203623

36213624
<details>
@@ -3974,10 +3977,10 @@ ExcelTable.generateExcel(data);
39743977

39753978
</details>
39763979

3977-
## Conditional Styling [⬆️](#table-of-contents)
3978-
39793980
<a id="conditional-styling"></a>
39803981

3982+
## Conditional Styling [⬆️](#table-of-contents)
3983+
39813984
Using the 'styleCellCondition' option, you can apply styles to each cell based on specific conditions as needed.
39823985

39833986
<details>
@@ -4070,10 +4073,10 @@ ExcelTable.generateExcel(data);
40704073

40714074
</details>
40724075

4073-
## Conditinal Formating [⬆️](#table-of-contents)
4074-
40754076
<a id="conditinal-formating"></a>
40764077

4078+
## Conditinal Formating [⬆️](#table-of-contents)
4079+
40774080
You can apply Excel conditional formatting in two ways. One method is through the Header object, which affects a whole column. The other method is using the Sheet object, where you need to specify the start and end properties.
40784081

40794082
<details>
@@ -4206,10 +4209,10 @@ ExcelTable.generateExcel(data);
42064209

42074210
</details>
42084211

4209-
## On Column(Header) [⬆️](#table-of-contents)
4210-
42114212
<a id="conditinal-formating-header"></a>
42124213

4214+
### On Column(Header) [⬆️](#table-of-contents)
4215+
42134216
Here's an example of how to use conditional formatting on a header.
42144217

42154218
<details>
@@ -4420,10 +4423,10 @@ ExcelTable.generateExcel(data);
44204423

44214424
</details>
44224425

4423-
## General use [⬆️](#table-of-contents)
4424-
44254426
<a id="conditinal-formating-general-use"></a>
44264427

4428+
### General use [⬆️](#table-of-contents)
4429+
44274430
General use and sheet objects offer the same functionality but are more flexible, allowing you to apply them to multiple columns and various other use cases
44284431

44294432
<details>
@@ -4555,10 +4558,10 @@ ExcelTable.generateExcel(data);
45554558

45564559
</details>
45574560

4558-
## Image Option [⬆️](#table-of-contents)
4559-
45604561
<a id="image-option"></a>
45614562

4563+
## Image Option [⬆️](#table-of-contents)
4564+
45624565
After version 2.8.0, we introduced the ability to add images.
45634566

45644567
<details>

change-log

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
## Version 5.1.0 (2024-01-31)
1+
## Version 5.1.1 (2024-01-31)
22

3-
### New Features
4-
5-
- The `fetch` option allows you to use your method to retrieve images and .xlsx files
3+
### Bug Fixes
64

5+
- Fixed README.md

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mr-excel",
3-
"version": "5.1.0",
3+
"version": "5.1.1",
44
"main": "dist/excel-table.mjs",
55
"types": "dist/excel-table.d.ts",
66
"scripts": {

0 commit comments

Comments
 (0)