codeforIATI / iati-tables

https://iati-tables.codeforiati.org
MIT License
1 stars 0 forks source link

numbers with trailing 0 don't format in csv export #36

Closed stevieflow closed 2 months ago

stevieflow commented 5 months ago

This isn't strictly a bug or the fault of IATI Tables - but wanted to log and see if there may be a way around it

Example

Some publishers have poorly constructed organisation references in their data, that start with a 0 or three:

Example activity:

Firefox_Screenshot_2024-02-22T12-40-20 607Z

In tables datasette, this is as published:

Firefox_Screenshot_2024-02-22T12-41-16 774Z

If I then download the CSV for that query, the 0010 opens as 10

I know this is a spreadsheet issue - but wondered if there is anything that can be done in the export file?

Note - whilst this org reference is invalid it is useful to work with and analyse, to then give feedback

robredpath commented 5 months ago

This is actually correct in the CSV, so this is a result of spreadsheet software interpreting 00010 as a number. How silly of it!

Screenshot 2024-02-22 at 12 51 21

Is there anything we can do to make the CSV give better hints about how to treat this column? Or offer xlsx ?

I feel like this is something that asking around the co-op would get lots of useful experience and stories around!

tillywoodfield commented 5 months ago

@stevieflow are you using Google Sheets to view the file? Instead of opening the file directly, if you create a new sheet and then go File -> Import and select the file, you can untick "Convert text to numbers, dates and formulas". I would imagine other tools have some similar option as well

stevieflow commented 5 months ago

thanks @robredpath @tillywoodfield yeah, it's something to work with/around

Ill try that too @tillywoodfield

I guess this might be more of a documentation issue, eventually @robredpath ?

tillywoodfield commented 2 months ago

@stevieflow @robredpath I've added this to the IATI Tables Docs, are you happy for us to close the issue?

stevieflow commented 2 months ago

Excellent, thanks @tillywoodfield !