jQuery UI Widgets Forums Vue [jqxGrid] Export column date time to xlsx

Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  ivanpeevski 2 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • [jqxGrid] Export column date time to xlsx #121099


    Good day,

    Is it possible to export a column with a data type of ‘date’ to excel xlsx?
    I have a date that comes from my API as a DateTimeOffset and when it is loaded into the grid and I hit export button to call this.$refs.jqxGrid.exportview, the xlsx file displays random numbers instead of the actual date.

    Shown as below

    If I export it using this.$refs.jqxGrid.exportdata(‘xls’) then the date comes out right.

    Any help would be greatly appreciated.


    [jqxGrid] Export column date time to xlsx #121104


    Hello Vince,

    The numbers in the xlsx file represent 2 + the number of days since 1900-01-01 , which is Excel’s default way of handling Dates.

    To customize this, you can set the cellsformat property of your date column.
    For example the following column:

      text: "My date",
      datafield: 'myDate',
      cellsformat: 'dd.MM.yyyy HH:mm'

    will correctly export the data to an xlsx file.

    If you have any other questions, please do not hesitate to contact us again!
    Best regards,
    Ivan Peevski
    jQWidgets Team

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.