Author Topic: Render export excel  (Read 1316 times)

atmaneuler

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 33
    • View Profile
Render export excel
« on: November 11, 2020, 09:23:07 am »
- In data response a few data have a datetime, example: cs1: "2020-11-30 00:00:00.0"
- In the grid I format the column as 'yy.mm.dd' and show, example: 2020.11.30
- But when I click the Export Excel button, in the excel file the columns with the date format show 2020-11-30 00: 00: 00.0
>>> Expected: Just like in the display grid, in the excel file the columns with the date format show 2020.11.30

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Render export excel
« Reply #1 on: November 11, 2020, 12:46:24 pm »
Apparently Excel is unable to process formatting on  "2020-11-30 00:00:00.0" values.

Please strip off " 00:00:00.0" from all dates while loading data in grid -> dataModel.getData callback can be used.