cds-snc / platform-forms-client

NextJS application that serves the public-facing website for Forms
https://forms-staging.cdssandbox.xyz/
MIT License
34 stars 13 forks source link

CSV files don't open up correctly on French Windows workstations #3878

Open jprince-cds opened 3 months ago

jprince-cds commented 3 months ago

Description

When double-clicking a CSV file on a French Windows workstation, the questions are not coming up correctly in columns. Instead they show up as rows, making the responses file not usable for those users.

image.png

Steps to reproduce

  1. Change your regional settings to French Canada, including the OS language and number options.
  2. Double click on a CSV file containing responses from GC Forms.
  3. You will notice that questions are not shown in columns as they should.

Details

Expected behaviour

Each question should be in its own column, and each response in its own row. French users should not require to make application and OS settings change to open GC Forms responses.

Here is the workaround that we have to give French users in order for them to successfully import CSV files in Excel.

Go to your Excel options, and go to Advanced.

image.png

Then, go to your Control Panel (you can find it by searching for Control Panel):

image.png

Select Change date, time or number formats:

image.png

Click on the Additional Settings button.

image.png

Make sure the List separator is set to a comma, and click Apply:

image.png

After making the above changes to Excel and the Control Panel options, we recommend that you then reboot your computer and try to open the downloaded response file again by double-click the CSV file.

Thanks to @connorscarolyns for finding this workaround!

jprince-cds commented 1 month ago

I don't understand why the images/screenshots are not showing anymore. They appeared fine a while ago...

timarney commented 1 month ago

@jprince-cds are we seeing issues for this outside of FR workstations ?

I made a note here for a different issue which might be an easier workaround vs the steps above

https://github.com/cds-snc/platform-forms-client/issues/3877#issuecomment-2318452992

jprince-cds commented 1 month ago

@timarney

3877 and #3878 are different issues.

3877 affects workstations running in both English or French. The file opens up correctly on its own in Excel, however accents are not showing up properly. There is no other usability issue.

3878 only affects French workstations since they have a different delimiter set in their regional settings, and this prevents the CSV file from opening correctly at all. The columns become rows.

timarney commented 3 weeks ago

@Abi-Nada @srtalbot

A possible solution could be looking at allowing a user change the field delimiter when a file is being downloaded.

Per the library we use o write the CSV's

We can use , (which is the default)

or ; which sounds like it's the default on the French workstations.

Screenshot 2024-09-03 at 1 49 17 PM
srtalbot commented 3 weeks ago

Product to write requirements to provide an option for ";" delimiter