Posted 10 May 2019, 3:44 am EST
Hello Wijmo team,
I am using wijmo 5 and angular 5 in our project right now.
We are now facing a scenario that we need to support export excel for every flex grid. So, we want to develop a common function for it.
Here is some issues we are facing.
-
For most Grid, we use template to format what we want to show our customer, like date. Here is the code sample:
<wj-flex-grid-column [header]=“‘Date Closed’” [binding]=“‘closedTime’” [visible]=“isNotMobile” [name]=“‘closedTime’” [isReadOnly]=“true” [align]=“‘center’” [width]=“110”>
<ng-template wjFlexGridCellTemplate [cellType]=“‘Cell’” let-cell=“cell”>
<div *ngIf=“cell.item.closedTime”>{{cell.item.closedTime | amUtc | amDateFormat:‘l’ }}
My question is, how do we export the same format with in the excel as it shows on the grid? -
We format our dollar amount with a $ sign in front of it. Here is the code sample:
<wj-flex-grid-column [header]=“‘Open Amt’” [binding]=“‘balance’” [visible]=“isNotMobile” [name]=“‘balance’” [isReadOnly]=“true” [width]=“110”>
<ng-template wjFlexGridCellTemplate [cellType]=“‘Cell’” let-cell=“cell”>
${{cell.item.balance | number:‘1.2-6’ }}
My question is, how do we remove the $ sign from it because our customer want to use excel’s summary function to calculate the totals. -
We have some columns that are using binding which required itemFormatter of the grid. As I know, if the grid is not show that column, flex grid won’t call the formatter. So, how do we export data which need itemformatter that is not showing unless you scroll to it.
-
Some of the flex grids are using server side pagination. Which means we need to get all the records from server and export it as an excel. And some grids using in grid pagination because we know it won’t have too much data to load. We know there is a function for us to export all data in the grid. So, my question is, how do we export the data same as we export data in grid?
Final, we want make a generic function for it. Because we have over 60 grids to add this support. We don’t want to customize for each of them. So, if you have any solution of it, please make it as generic as possible.
By the way, my current wijmo package is C1Wijmo-Enterprise_5.20172.328.zip and angular version is 5.1.0
Thank you.
bzhang