Hi Wei Cheng,
Greetings from Syncfusion support.
Query: Excel Export feature of Data Grid not keeping the
Date column formatting
We analyzed your query, we suspect that you are providing
the date format as format='MMM dd, yyyy. please provide the format in the
following method to avoid the issue
|
<template>
<div id="app">
<ejs-grid
ref="grid"
id="Grid"
:dataSource="data"
height="400px"
:toolbar="toolbarOptions"
:allowExcelExport="true"
:toolbarClick="toolbarClick"
>
<e-columns>
<e-column
field="OrderDate"
headerText="Order Date"
textAlign="Right"
:format="formatOptions"
type="date"
width="120"
></e-column>
</e-columns>
</ejs-grid>
</div>
</template>
<script>
data() {
return {
data: gridData,
formatOptions: { type: "date", format:
"MMM/dd/yyyy" },
toolbarOptions:
["ExcelExport"],
};
},
|
Sample: https://codesandbox.io/s/vue-template-forked-3iu2l9?file=/src/App.vue
Please get back to us if you need further assistance on
this.
Regards,
Mohammed Ansar ,