-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(export): add missing
valueParserCallback
dataContext & new demo (
#1543) * feat(export): add missing `valueParserCallback` dataContext * fix(excel): the `excelExportOptions.style` should work on regular cells * fix(export): Excel export of Group should work with Excel metadata
- Loading branch information
1 parent
021738d
commit 884b6e0
Showing
12 changed files
with
824 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
examples/vite-demo-vanilla-bundle/src/examples/example23.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<h3 class="title is-3"> | ||
Example 23 - Excel Export Formulas | ||
<div class="subtitle code-link"> | ||
<span class="is-size-6">see</span> | ||
<a class="is-size-5" target="_blank" | ||
href="https://github.com/ghiscoding/slickgrid-universal/blob/master/examples/vite-demo-vanilla-bundle/src/examples/example23.ts"> | ||
<span class="mdi mdi-link-variant"></span> code | ||
</a> | ||
</div> | ||
</h3> | ||
|
||
<h5 class="title is-5 mb-3"> | ||
Calculate Totals via Formatters in the UI, but use Excel Formula when exporting via <code>excelExportOptions.valueParserCallback</code> | ||
</h5> | ||
<h6 class="is-6 mb-4"> | ||
When Grouped we will also calculate the Group Totals in the UI via Group Formatter and we again use Excel Formula to calculate the Group Totals (sum) dynamically. For Grouping we need to use <code>groupTotalsExcelExportOptions.valueParserCallback</code> instead. | ||
</h6> | ||
|
||
<section class="row mb-2"> | ||
<div class="mb-1"> | ||
<button class="button is-small" data-test="export-excel-btn" onclick.delegate="exportToExcel()"> | ||
<span class="mdi mdi-file-excel-outline text-color-success"></span> | ||
<span>Export to Excel</span> | ||
</button> | ||
<span> | ||
<button class="button is-small" onclick.delegate="groupByTaxable()" data-test="group-by-btn"> | ||
<span>Group by Taxable</span> | ||
</button> | ||
</span> | ||
<span class="ml-6 text-bold"> | ||
Tax Rate: | ||
<input type="number" value.bind="taxRate" class="is-narrow input is-small" step="0.25" data-test="taxrate" /> | ||
<button class="button is-small" onclick.delegate="updateTaxRate()" data-test="update-btn"> | ||
Update | ||
</button> | ||
</span> | ||
|
||
</div> | ||
</section> | ||
|
||
<div class="grid23"> | ||
</div> |
19 changes: 19 additions & 0 deletions
19
examples/vite-demo-vanilla-bundle/src/examples/example23.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.grid23 { | ||
.slick-row:not(.slick-group) >.cell-unselectable { | ||
background: #ececec !important; | ||
font-weight: bold; | ||
} | ||
|
||
.text-sub-total { | ||
font-style: italic; | ||
color: rgb(33, 80, 115); | ||
} | ||
.text-taxes { | ||
font-style: italic; | ||
color: rgb(198, 89, 17); | ||
} | ||
.text-total { | ||
font-weight: bold; | ||
color: rgb(0, 90, 158); | ||
} | ||
} |
Oops, something went wrong.