Skip to content

Exported datetime registration columns are not always interpreted as timestamp in Excel #6806

@OmeGak

Description

@OmeGak

Describe the bug

The export of registration list data to Excel is a rather naive one, simply dumping the text appearing in the list into the spreadsheet cells. This causes Excel to interpret date cells inconsistently. Depending on user locale and, thus, date formatting, these cells are sometimes interpreted as plain text and sometimes as date.

To Reproduce

Steps to reproduce the behavior:

  1. Configure Indico in German
  2. Go to a registration list
  3. Export to Excel and open the file in Excel
  4. Verify that date columns are not interpreted as dates

Expected behavior

Dates and datetimes should be exported in a format that Excel interprets consistently as date, regardless of the user-configured locale.

Additional context

It should be possible to use XlsxWriter's write_datetime() in _prepare_excel_data() to ensure that datetimes are interpreted as such on Excel.

For more information:
https://xlsxwriter.readthedocs.io/working_with_dates_and_time.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions